javascript - webrtc - voice does not work -
I want to use webRTC to show videos from my camera and want to hear sound from my microphone but voice does not work Does you have any idea why my code does not work properly?
JS
if (navigator.getUserMedia) {navigator.getUserMedia ({video: true, audio: true}, onsput, on error); } Else {console.log ('Tooza Prejalagarka Nai Obliggege WebRTC - GuestUsermedia'); } Success on the ceremony {stream} {var video = document.getElementById ('webcam'), VideoSRC; // audiocontax, // mediastream source; If (window.webkitURL) {videoSource = window.webkitURL.createObjectURL (stream); } And {videoSource = stream; } Video.autoplay = true; Video src = videoSource; Var in audiocontext = 'audioconnect' window? New audiotent (): (('WebKitAudioContact' window)? New WebKitAudioContact (): Null); If (audiocontext) {var mediaStreamSource = AudioContext.createMediaStreamSource (stream); MediaStreamSource.connect (audioContext.destination); } Else {// ...}}
before Chrome version 27.0.1436.1 For video elements associated with LocalMediaStreams, set the 'Silent' attribute by default, video.muted = false should enable the local audio playout. See more for more information.
Comments
Post a Comment