mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-12 03:18:10 +00:00
🐞🗃 Checkpoint
./public/main.js:5975361/118
This commit is contained in:
parent
27e91cc10f
commit
bdfc9215df
1 changed files with 4 additions and 3 deletions
|
|
@ -35,6 +35,7 @@ var app = new Vue({
|
|||
document.querySelector(selector).srcObject = stream;
|
||||
},
|
||||
connectToPeer: function(peerId) {
|
||||
if (!peerId) return;
|
||||
if (peerId === this.peer.id) {
|
||||
this.logMessage(`You played yourself! Can't connect to yourself.`);
|
||||
return;
|
||||
|
|
@ -67,6 +68,7 @@ var app = new Vue({
|
|||
this.handleCall(call);
|
||||
},
|
||||
connectToPeer2: async function(peerId) {
|
||||
if (!peerId) return;
|
||||
if (peerId === this.peer.id) {
|
||||
this.logMessage(`You played yourself! Can't connect to yourself.`);
|
||||
return;
|
||||
|
|
@ -97,12 +99,11 @@ var app = new Vue({
|
|||
const audioStream = await this.getAudioStream();
|
||||
let audioCall = this.peer.call(peerId, audioStream);
|
||||
console.log('Started audioCall', audioCall);
|
||||
this.calls.push(audioCall);
|
||||
this.handleCall(audioCall);
|
||||
const videoStream = await this.getVideoStream();
|
||||
let videoCall = this.peer.call(peerId, videoStream);
|
||||
console.log('Started videoCall', videoCall);
|
||||
this.calls.push(videoCall);
|
||||
// this.handleCall(call);
|
||||
this.handleCall(videoCall);
|
||||
},
|
||||
hangUp: function() {
|
||||
this.calls.forEach(c => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue