mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-12 22:38:11 +00:00
Compare commits
5 commits
9bc41435e3
...
6ace8df5d4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ace8df5d4 | ||
|
|
2eed250da1 | ||
|
|
e87ec769a1 | ||
|
|
64a6e81e7d | ||
|
|
684e163d96 |
2 changed files with 28 additions and 2 deletions
|
|
@ -49,7 +49,7 @@
|
||||||
<!-- self -->
|
<!-- self -->
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="card text-dark">
|
<div class="card text-dark">
|
||||||
<video id="localVideo" class="card-img-top" autoplay></video>
|
<video id="localVideo" class="card-img-top" autoplay muted></video>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<details>
|
<details>
|
||||||
<summary class="card-title">It'se me!</summary>
|
<summary class="card-title">It'se me!</summary>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,29 @@ var app = new Vue({
|
||||||
data: {
|
data: {
|
||||||
peer: new Peer(localStorage.getItem('yaswvc-peerId'), {
|
peer: new Peer(localStorage.getItem('yaswvc-peerId'), {
|
||||||
host: '/',
|
host: '/',
|
||||||
path: '/peerjs/myapp'
|
path: '/peerjs/myapp',
|
||||||
|
config: {
|
||||||
|
'iceServers': [
|
||||||
|
{ urls: 'stun:stun.l.google.com:19302' },
|
||||||
|
{ urls: 'stun:stun.stunprotocol.org:3478' },
|
||||||
|
{ urls: 'stun:stun.sipnet.net:3478' },
|
||||||
|
{ urls: 'stun:stun.ideasip.com:3478' },
|
||||||
|
{ urls: 'stun:stun.iptel.org:3478' },
|
||||||
|
{ urls: 'turn:numb.viagenie.ca', username: 'imvasanthv@gmail.com', credential: 'd0ntuseme' },
|
||||||
|
{
|
||||||
|
urls: [
|
||||||
|
'turn:173.194.72.127:19305?transport=udp',
|
||||||
|
'turn:[2404:6800:4008:C01::7F]:19305?transport=udp',
|
||||||
|
'turn:173.194.72.127:443?transport=tcp',
|
||||||
|
'turn:[2404:6800:4008:C01::7F]:443?transport=tcp'
|
||||||
|
],
|
||||||
|
username: 'CKjCuLwFEgahxNRjuTAYzc/s6OMT',
|
||||||
|
credential: 'u1SQDR/SQsPQIxXNWQT7czc/G4c='
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'sdpSemantics': 'unified-plan',
|
||||||
|
},
|
||||||
|
debug: 3
|
||||||
}),
|
}),
|
||||||
stream: null,
|
stream: null,
|
||||||
calls: [],
|
calls: [],
|
||||||
|
|
@ -22,6 +44,10 @@ var app = new Vue({
|
||||||
document.querySelector(selector).srcObject = stream;
|
document.querySelector(selector).srcObject = stream;
|
||||||
},
|
},
|
||||||
connectToPeer: function(peerId) {
|
connectToPeer: function(peerId) {
|
||||||
|
if (peerId === this.peer.id) {
|
||||||
|
this.logMessage(`You played yourself! Can't connect to yourself.`);
|
||||||
|
return;
|
||||||
|
};
|
||||||
this.logMessage(`Connecting to ${peerId}...`);
|
this.logMessage(`Connecting to ${peerId}...`);
|
||||||
|
|
||||||
let conn = this.peer.connect(peerId);
|
let conn = this.peer.connect(peerId);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue