mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-11 23:18:11 +00:00
🚴🕴 Checkpoint
./public/main.js:5975361/820
This commit is contained in:
parent
9a33ce12fc
commit
2449ae42cf
1 changed files with 10 additions and 3 deletions
|
|
@ -304,7 +304,7 @@ var app = new Vue({
|
|||
const audioSource = document.querySelector('select#audioSource').value;
|
||||
const constraints = {
|
||||
audio: {deviceId: audioSource ? {exact: audioSource} : undefined},
|
||||
video: null
|
||||
// video: null
|
||||
};
|
||||
const audioStream = await navigator.mediaDevices.getUserMedia(constraints).catch(this.handleError);
|
||||
console.log('GOT AUDIO STREAM', audioStream);
|
||||
|
|
@ -323,8 +323,15 @@ var app = new Vue({
|
|||
},
|
||||
shareScreen: async function shareScreen() {
|
||||
if (!this.displayMediaStream) {
|
||||
const displayMediaStream = await navigator.mediaDevices.getDisplayMedia();
|
||||
console.log('screenShare', displayMediaStream)
|
||||
try {
|
||||
const displayMediaStream = await navigator.mediaDevices.getDisplayMedia();
|
||||
console.log('screenShare', displayMediaStream);
|
||||
this.videoCalls.forEach(call => {
|
||||
this.outgoingScreenShareCalls.push(this.peer.call(call.peer, displayMediaStream));
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('shareScreen', e);
|
||||
}
|
||||
} else {
|
||||
// TODO stop stream
|
||||
this.displayMediaStream = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue