1
0
Fork 0
mirror of https://api.glitch.com/git/yaswvc synced 2026-01-12 17:38:11 +00:00

Compare commits

..

5 commits

Author SHA1 Message Date
Glitch (peerjs-video)
6ace8df5d4 🍦🙎 Checkpoint
./public/main.js:5975361/22
2020-09-09 13:02:46 +00:00
Glitch (peerjs-video)
2eed250da1 🌝🏤 Checkpoint
./public/main.js:5975361/1673
2020-09-09 12:51:41 +00:00
Glitch (peerjs-video)
e87ec769a1 🚖🕹 Checkpoint
./public/main.js:5975361/608
2020-09-09 08:39:30 +00:00
Glitch (peerjs-video)
64a6e81e7d 🐦🍛 Checkpoint
./public/main.js:5975361/876
2020-09-09 08:28:17 +00:00
Glitch (peerjs-video)
684e163d96 🌄👸 Checkpoint
./public/index.html:5975361/6
./public/main.js:5975361/296
2020-09-09 08:16:22 +00:00
2 changed files with 28 additions and 2 deletions

View file

@ -49,7 +49,7 @@
<!-- self -->
<div class="col-6">
<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">
<details>
<summary class="card-title">It'se me!</summary>

View file

@ -5,7 +5,29 @@ var app = new Vue({
data: {
peer: new Peer(localStorage.getItem('yaswvc-peerId'), {
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,
calls: [],
@ -22,6 +44,10 @@ var app = new Vue({
document.querySelector(selector).srcObject = stream;
},
connectToPeer: function(peerId) {
if (peerId === this.peer.id) {
this.logMessage(`You played yourself! Can't connect to yourself.`);
return;
};
this.logMessage(`Connecting to ${peerId}...`);
let conn = this.peer.connect(peerId);