RESOLVED FIXED Bug 207041
Audio is not played from an audio element when the srcObject object has unstarted video tracks
https://bugs.webkit.org/show_bug.cgi?id=207041
Summary Audio is not played from an audio element when the srcObject object has unsta...
Philipp Hancke
Reported 2020-01-31 06:55:17 PST
Once upon a time Chrome didn’t play audio on an audio element when the element’s srcObject contained a video track that hadn’t sent any data: https://bugs.chromium.org/p/chromium/issues/detail?id=738379 The reason was/is that for *video* elements loadedmetadata/onresize need to be fired which are not known without a (key)frame. Since audio elements don't fire these events they can just play. This is still an issue in Safari as demonstrated by this fiddle: https://jsfiddle.net/47uvs3gt/ This reproduces a situation where a MediaStream with audio and video tracks is created on the receiving end but the sender does not send rtp packets. This can very easily happen from Firefox (see https://github.com/w3c/mediacapture-main/issues/642) and also when an implementation makes an effort to ensure the camera light is turned off in other browsers. https://jsfiddle.net/kcutdvhe/ - the stream splitting approach which used to work in Chrome also seems to work but would be great to avoid. Note that https://jsfiddle.net/23s0odra/ which attempts to reproduce this without a RTCPeerConnection in between still works. But maybe because the video track readyState is ended?
Attachments
Patch (10.75 KB, patch)
2020-03-16 06:33 PDT, youenn fablet
no flags
Radar WebKit Bug Importer
Comment 1 2020-01-31 21:54:26 PST
youenn fablet
Comment 2 2020-03-16 06:33:14 PDT
WebKit Commit Bot
Comment 3 2020-03-16 09:36:42 PDT
Comment on attachment 393651 [details] Patch Clearing flags on attachment: 393651 Committed r258503: <https://trac.webkit.org/changeset/258503>
WebKit Commit Bot
Comment 4 2020-03-16 09:36:44 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.