No audio from WebRCT stream without audio tag
Reported by
merag...@gmail.com,
Nov 19
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0 Steps to reproduce the problem: I have web application to make audio calls between clients. As server I use FreeSwitch with SIP (using SIP.js) through secure web socket. When I make call between firefox and firefox everything works fine, but when I make call between firefox and chrome I do not hear anything on chrome client. On firefox client I can hear what was send from chrome. Using Wireshark I found that stream reach client machine and is correct. After long trial and error I found that creating audio tag in js code and assigning remote stream to it as srcObject helps (adapting solution from WebRTC doesn't work with AudioContext). What is the expected behavior? Hearing audio on chrome without setting srcObject in audio element What went wrong? No audio without setting srcObject in audio element and without audio element Did this work before? N/A Does this work in other browsers? Yes Chrome version: 70.0.3538.102 Channel: stable OS Version: 10.0 Flash Version: const audioContext = (window.AudioContext || window.webkitAudioContext || window.mozAudioContext || window.oAudioContext || window.msAudioContext); var aaaudio = new Audio(); <--- adding those lines helps aaaudio.srcObject = sipSession.mediaHandler.getRemoteStreams()[0]; <--- adding those lines helps audioContext.createMediaStreamSource(sipSession.mediaHandler.getRemoteStreams()[0]) var gainNode = ctx.createGain(); gainNode.gain.value = .5; source.connect(gainNode); gainNode.connect(ctx.destination);
,
Nov 19
,
Nov 20
Thanks for filing the issue.. @reporter: Could you please provide a sample file or URL that reproduces the issue, so that it would be really helpful for triaging the issue.
,
Nov 27
I am sorry for the late reply, but I had a lot of work in job. I prepare sample demo, which connect to my internal FreeSWITCH (version 1.6.20) using sip.js (version 0.7.8). In this demo I registered myself and configure acceptance callbacks. Also there is button to make call to another user. In both situation (demo calling to another, demo accepting other call) there was no sound on chrome without adding Audio element. When I run demo on firefox everything work. With adding Audio element (lines 32, 33 in demo.js) it works on chrome too. I am trying to find public freeSWITCH instance but I haven't found anything
,
Nov 27
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 28
According to #4, when you assign the stream to an audio element it plays as expected. So, IIUC, the "bug" is that it doesn't play on a video element. The reason for this is that, according to the HTML spec, a video element cannot start playing until the video metadata (e.g., its dimension) is known. If the stream never sends at least a frame of video, so that metadata can be known, the video element will not start playing. See https://html.spec.whatwg.org/multipage/media.html#dom-media-have_metadata Closing since this is WAI. If you think the spec is wrong, please file a spec bug at https://github.com/whatwg/html/issues/ and maybe also at https://github.com/w3c/mediacapture-main/issues Related (but not the same) issue: https://github.com/whatwg/html/issues/4215 |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dtapu...@chromium.org
, Nov 19