mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-12 05:08:11 +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;
|
document.querySelector(selector).srcObject = stream;
|
||||||
},
|
},
|
||||||
connectToPeer: function(peerId) {
|
connectToPeer: function(peerId) {
|
||||||
|
if (!peerId) return;
|
||||||
if (peerId === this.peer.id) {
|
if (peerId === this.peer.id) {
|
||||||
this.logMessage(`You played yourself! Can't connect to yourself.`);
|
this.logMessage(`You played yourself! Can't connect to yourself.`);
|
||||||
return;
|
return;
|
||||||
|
|
@ -67,6 +68,7 @@ var app = new Vue({
|
||||||
this.handleCall(call);
|
this.handleCall(call);
|
||||||
},
|
},
|
||||||
connectToPeer2: async function(peerId) {
|
connectToPeer2: async function(peerId) {
|
||||||
|
if (!peerId) return;
|
||||||
if (peerId === this.peer.id) {
|
if (peerId === this.peer.id) {
|
||||||
this.logMessage(`You played yourself! Can't connect to yourself.`);
|
this.logMessage(`You played yourself! Can't connect to yourself.`);
|
||||||
return;
|
return;
|
||||||
|
|
@ -97,12 +99,11 @@ var app = new Vue({
|
||||||
const audioStream = await this.getAudioStream();
|
const audioStream = await this.getAudioStream();
|
||||||
let audioCall = this.peer.call(peerId, audioStream);
|
let audioCall = this.peer.call(peerId, audioStream);
|
||||||
console.log('Started audioCall', audioCall);
|
console.log('Started audioCall', audioCall);
|
||||||
this.calls.push(audioCall);
|
this.handleCall(audioCall);
|
||||||
const videoStream = await this.getVideoStream();
|
const videoStream = await this.getVideoStream();
|
||||||
let videoCall = this.peer.call(peerId, videoStream);
|
let videoCall = this.peer.call(peerId, videoStream);
|
||||||
console.log('Started videoCall', videoCall);
|
console.log('Started videoCall', videoCall);
|
||||||
this.calls.push(videoCall);
|
this.handleCall(videoCall);
|
||||||
// this.handleCall(call);
|
|
||||||
},
|
},
|
||||||
hangUp: function() {
|
hangUp: function() {
|
||||||
this.calls.forEach(c => {
|
this.calls.forEach(c => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue