Bug 198284 - Web Audio fed into local <video> via MediaStreamAudioDestinationNode does not play on Mac
Summary: Web Audio fed into local <video> via MediaStreamAudioDestinationNode does not...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: Safari 12
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-28 00:17 PDT by Brion Vibber
Modified: 2020-05-29 11:12 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brion Vibber 2019-05-28 00:17:25 PDT
Web Audio such as an oscillator or script processor node piped into a local <video> through MediaStraemAudioDestinationNode doesn't play in Safari on Mac, but does work on iOS and the iOS Simulator.

Tested Safari 12.1.1 and Technology Preview on macOS 10.14 and 10.13 (no audio), while it works on iOS 12.4.1 and the iOS 12.2 Simulator tested locally.


Test case:

https://jsfiddle.net/0uLg4j3w/

----------
<div>
  <button id=start>Start</button>
<div>
  <video id=sink playsinline controls width=320 height=240></video>
</div>
----------
start.addEventListener('click', function() {
  start.disabled = true;
	var context = new (window.AudioContext || window.webkitAudioContext)();
  var dest = context.createMediaStreamDestination();
  var src = context.createOscillator();
  src.connect(dest);
  src.start();
  sink.srcObject = dest.stream;
  sink.play();
});
----------


Expected results: tone plays
Actual results: no tone plays
Comment 1 Radar WebKit Bug Importer 2019-05-30 22:19:57 PDT
<rdar://problem/51290997>
Comment 2 tobor68 2020-05-29 11:12:08 PDT
I've found this behaviour in iTunes 12.9.5 while playing local media as well as streaming iTunes extras, and webkit based browsers to bluetooth speakers.