Skip to content

Commit b387430

Browse files
authored
Merge pull request #4 from maiermic/patch-1
fix video call
2 parents c0d7d79 + 08a2fac commit b387430

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/plainwebrtc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function enableChat() {
1717
}
1818
enableChat();
1919

20+
2021
navigator.mediaDevices.getUserMedia({ audio: true, video: true }).then(stream => {
2122
localStream = stream;
2223
micused.innerHTML = localStream.getAudioTracks()[0].label;
@@ -57,6 +58,7 @@ pc.onicecandidate = function(e) {
5758
pc.oniceconnectionstatechange = function() {
5859
console.log('iceconnectionstatechange: ', pc.iceConnectionState);
5960
}
61+
6062
pc.onaddstream = function(e) {
6163
console.log('remote onaddstream', e.stream);
6264
remote.srcObject = e.stream;

0 commit comments

Comments
 (0)