Commit 80a33cc0 authored by Raymond Toy's avatar Raymond Toy Committed by Commit Bot

Deprecate WebAudio Media nodes on an OfflineAudioContext

Print a deprecation message when WebAudio Media nodes
(MediaElementAudioSourceNode, MediaStreamAudioDestinationNode,
MediaStreamAudioSourceNode) are created on an OfflineAudioContext.
Doing so is not allowed in the WebAudio spec.

Intent: https://groups.google.com/a/chromium.org/d/msg/blink-dev/H29uXnsIN54/BKXDqxoJAQAJ
Chrome feature entry: https://www.chromestatus.com/feature/5258622686724096

Bug: 845913
Change-Id: I5247d67456afa11582099f4d52d65a76f788639d
Reviewed-on: https://chromium-review.googlesource.com/1091656
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568124}
parent ffe80a57
CONSOLE WARNING: line 371: Delay.delayTime.value -1 outside nominal range [0, 1.5]; value will be clamped. CONSOLE WARNING: line 209: The Web Audio autoplay policy will be re-enabled in Chrome 70 (October 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu
CONSOLE WARNING: line 371: Delay.delayTime.setValueAtTime value -1 outside nominal range [0, 1.5]; value will be clamped. CONSOLE WARNING: line 392: Delay.delayTime.value -1 outside nominal range [0, 1.5]; value will be clamped.
CONSOLE WARNING: line 383: Delay.delayTime.value 4 outside nominal range [0, 1.5]; value will be clamped. CONSOLE WARNING: line 392: Delay.delayTime.setValueAtTime value -1 outside nominal range [0, 1.5]; value will be clamped.
CONSOLE WARNING: line 383: Delay.delayTime.setValueAtTime value 4 outside nominal range [0, 1.5]; value will be clamped. CONSOLE WARNING: line 404: Delay.delayTime.value 4 outside nominal range [0, 1.5]; value will be clamped.
CONSOLE WARNING: line 371: StereoPanner.pan.value -3 outside nominal range [-1, 1]; value will be clamped. CONSOLE WARNING: line 404: Delay.delayTime.setValueAtTime value 4 outside nominal range [0, 1.5]; value will be clamped.
CONSOLE WARNING: line 371: StereoPanner.pan.setValueAtTime value -3 outside nominal range [-1, 1]; value will be clamped. CONSOLE WARNING: line 392: StereoPanner.pan.value -3 outside nominal range [-1, 1]; value will be clamped.
CONSOLE WARNING: line 383: StereoPanner.pan.value 3 outside nominal range [-1, 1]; value will be clamped. CONSOLE WARNING: line 392: StereoPanner.pan.setValueAtTime value -3 outside nominal range [-1, 1]; value will be clamped.
CONSOLE WARNING: line 383: StereoPanner.pan.setValueAtTime value 3 outside nominal range [-1, 1]; value will be clamped. CONSOLE WARNING: line 404: StereoPanner.pan.value 3 outside nominal range [-1, 1]; value will be clamped.
CONSOLE WARNING: line 371: DynamicsCompressor.threshold.value -201 outside nominal range [-100, 0]; value will be clamped. CONSOLE WARNING: line 404: StereoPanner.pan.setValueAtTime value 3 outside nominal range [-1, 1]; value will be clamped.
CONSOLE WARNING: line 371: DynamicsCompressor.threshold.setValueAtTime value -201 outside nominal range [-100, 0]; value will be clamped. CONSOLE WARNING: line 392: DynamicsCompressor.threshold.value -201 outside nominal range [-100, 0]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.threshold.value 1 outside nominal range [-100, 0]; value will be clamped. CONSOLE WARNING: line 392: DynamicsCompressor.threshold.setValueAtTime value -201 outside nominal range [-100, 0]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.threshold.setValueAtTime value 1 outside nominal range [-100, 0]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.threshold.value 1 outside nominal range [-100, 0]; value will be clamped.
CONSOLE WARNING: line 371: DynamicsCompressor.knee.value -1 outside nominal range [0, 40]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.threshold.setValueAtTime value 1 outside nominal range [-100, 0]; value will be clamped.
CONSOLE WARNING: line 371: DynamicsCompressor.knee.setValueAtTime value -1 outside nominal range [0, 40]; value will be clamped. CONSOLE WARNING: line 392: DynamicsCompressor.knee.value -1 outside nominal range [0, 40]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.knee.value 81 outside nominal range [0, 40]; value will be clamped. CONSOLE WARNING: line 392: DynamicsCompressor.knee.setValueAtTime value -1 outside nominal range [0, 40]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.knee.setValueAtTime value 81 outside nominal range [0, 40]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.knee.value 81 outside nominal range [0, 40]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.ratio.value 41 outside nominal range [1, 20]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.knee.setValueAtTime value 81 outside nominal range [0, 40]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.ratio.setValueAtTime value 41 outside nominal range [1, 20]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.ratio.value 41 outside nominal range [1, 20]; value will be clamped.
CONSOLE WARNING: line 371: DynamicsCompressor.attack.value -1 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.ratio.setValueAtTime value 41 outside nominal range [1, 20]; value will be clamped.
CONSOLE WARNING: line 371: DynamicsCompressor.attack.setValueAtTime value -1 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 392: DynamicsCompressor.attack.value -1 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.attack.value 3 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 392: DynamicsCompressor.attack.setValueAtTime value -1 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.attack.setValueAtTime value 3 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.attack.value 3 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 371: DynamicsCompressor.release.value -1 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.attack.setValueAtTime value 3 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 371: DynamicsCompressor.release.setValueAtTime value -1 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 392: DynamicsCompressor.release.value -1 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.release.value 3 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 392: DynamicsCompressor.release.setValueAtTime value -1 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 383: DynamicsCompressor.release.setValueAtTime value 3 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.release.value 3 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 371: BiquadFilter.frequency.value -1 outside nominal range [0, 24000]; value will be clamped. CONSOLE WARNING: line 404: DynamicsCompressor.release.setValueAtTime value 3 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 371: BiquadFilter.frequency.setValueAtTime value -1 outside nominal range [0, 24000]; value will be clamped. CONSOLE WARNING: line 392: BiquadFilter.frequency.value -1 outside nominal range [0, 24000]; value will be clamped.
CONSOLE WARNING: line 383: BiquadFilter.frequency.value 48001 outside nominal range [0, 24000]; value will be clamped. CONSOLE WARNING: line 392: BiquadFilter.frequency.setValueAtTime value -1 outside nominal range [0, 24000]; value will be clamped.
CONSOLE WARNING: line 383: BiquadFilter.frequency.setValueAtTime value 48001 outside nominal range [0, 24000]; value will be clamped. CONSOLE WARNING: line 404: BiquadFilter.frequency.value 48001 outside nominal range [0, 24000]; value will be clamped.
CONSOLE WARNING: line 371: Oscillator.frequency.value -48001 outside nominal range [-24000, 24000]; value will be clamped. CONSOLE WARNING: line 404: BiquadFilter.frequency.setValueAtTime value 48001 outside nominal range [0, 24000]; value will be clamped.
CONSOLE WARNING: line 371: Oscillator.frequency.setValueAtTime value -48001 outside nominal range [-24000, 24000]; value will be clamped. CONSOLE WARNING: line 392: Oscillator.frequency.value -48001 outside nominal range [-24000, 24000]; value will be clamped.
CONSOLE WARNING: line 383: Oscillator.frequency.value 48001 outside nominal range [-24000, 24000]; value will be clamped. CONSOLE WARNING: line 392: Oscillator.frequency.setValueAtTime value -48001 outside nominal range [-24000, 24000]; value will be clamped.
CONSOLE WARNING: line 383: Oscillator.frequency.setValueAtTime value 48001 outside nominal range [-24000, 24000]; value will be clamped. CONSOLE WARNING: line 404: Oscillator.frequency.value 48001 outside nominal range [-24000, 24000]; value will be clamped.
CONSOLE WARNING: line 302: Delay.delayTime.setValueAtTime value -1 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 404: Oscillator.frequency.setValueAtTime value 48001 outside nominal range [-24000, 24000]; value will be clamped.
CONSOLE WARNING: line 303: Delay.delayTime.linearRampToValueAtTime value 2 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 323: Delay.delayTime.setValueAtTime value -1 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 304: Delay.delayTime.exponentialRampToValue value 3 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 324: Delay.delayTime.linearRampToValueAtTime value 2 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 305: Delay.delayTime.setTargetAtTime value -1 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 325: Delay.delayTime.exponentialRampToValue value 3 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 306: Delay.delayTime.setValueCurveAtTime value 1.5 outside nominal range [0, 1]; value will be clamped. CONSOLE WARNING: line 326: Delay.delayTime.setTargetAtTime value -1 outside nominal range [0, 1]; value will be clamped.
CONSOLE WARNING: line 327: Delay.delayTime.setValueCurveAtTime value 1.5 outside nominal range [0, 1]; value will be clamped.
This is a testharness.js-based test. This is a testharness.js-based test.
PASS # AUDIT TASK RUNNER STARTED. PASS # AUDIT TASK RUNNER STARTED.
PASS > [initialize] PASS > [initialize]
PASS Create context for tests did not throw an exception. PASS Create offline context for tests did not throw an exception.
PASS < [initialize] All assertions passed. (total 1 assertions) PASS Create online context for tests did not throw an exception.
PASS > [createGain] PASS < [initialize] All assertions passed. (total 2 assertions)
PASS > [Offline createGain]
PASS GainNode.gain.minValue is equal to -3.4028234663852886e+38. PASS GainNode.gain.minValue is equal to -3.4028234663852886e+38.
PASS GainNode.gain.maxValue is equal to 3.4028234663852886e+38. PASS GainNode.gain.maxValue is equal to 3.4028234663852886e+38.
PASS GainNode.gain.minValue = Math.PI is not equal to 3.141592653589793. PASS GainNode.gain.minValue = Math.PI is not equal to 3.141592653589793.
...@@ -50,8 +52,8 @@ PASS GainNode.gain.minValue is read-only is equal to true. ...@@ -50,8 +52,8 @@ PASS GainNode.gain.minValue is read-only is equal to true.
PASS GainNode.gain.maxValue = Math.PI is not equal to 3.141592653589793. PASS GainNode.gain.maxValue = Math.PI is not equal to 3.141592653589793.
PASS GainNode.gain.maxValue is read-only is equal to true. PASS GainNode.gain.maxValue is read-only is equal to true.
PASS Nominal ranges for AudioParam(s) of GainNode are correct PASS Nominal ranges for AudioParam(s) of GainNode are correct
PASS < [createGain] All assertions passed. (total 7 assertions) PASS < [Offline createGain] All assertions passed. (total 7 assertions)
PASS > [createDelay] PASS > [Offline createDelay]
PASS DelayNode.delayTime.minValue is equal to 0. PASS DelayNode.delayTime.minValue is equal to 0.
PASS DelayNode.delayTime.maxValue is equal to 1.5. PASS DelayNode.delayTime.maxValue is equal to 1.5.
PASS DelayNode.delayTime.minValue = Math.PI is not equal to 3.141592653589793. PASS DelayNode.delayTime.minValue = Math.PI is not equal to 3.141592653589793.
...@@ -62,8 +64,8 @@ PASS Set DelayNode.delayTime.value = -1 is equal to 0. ...@@ -62,8 +64,8 @@ PASS Set DelayNode.delayTime.value = -1 is equal to 0.
PASS Set DelayNode.delayTime.value = 4 is equal to 1.5. PASS Set DelayNode.delayTime.value = 4 is equal to 1.5.
PASS DelayNode.delayTimewas clipped to lie within the nominal range is equal to true. PASS DelayNode.delayTimewas clipped to lie within the nominal range is equal to true.
PASS Nominal ranges for AudioParam(s) of DelayNode are correct PASS Nominal ranges for AudioParam(s) of DelayNode are correct
PASS < [createDelay] All assertions passed. (total 10 assertions) PASS < [Offline createDelay] All assertions passed. (total 10 assertions)
PASS > [createBufferSource] PASS > [Offline createBufferSource]
PASS AudioBufferSourceNode.playbackRate.minValue is equal to -3.4028234663852886e+38. PASS AudioBufferSourceNode.playbackRate.minValue is equal to -3.4028234663852886e+38.
PASS AudioBufferSourceNode.playbackRate.maxValue is equal to 3.4028234663852886e+38. PASS AudioBufferSourceNode.playbackRate.maxValue is equal to 3.4028234663852886e+38.
PASS AudioBufferSourceNode.playbackRate.minValue = Math.PI is not equal to 3.141592653589793. PASS AudioBufferSourceNode.playbackRate.minValue = Math.PI is not equal to 3.141592653589793.
...@@ -77,8 +79,8 @@ PASS AudioBufferSourceNode.detune.minValue is read-only is equal to true. ...@@ -77,8 +79,8 @@ PASS AudioBufferSourceNode.detune.minValue is read-only is equal to true.
PASS AudioBufferSourceNode.detune.maxValue = Math.PI is not equal to 3.141592653589793. PASS AudioBufferSourceNode.detune.maxValue = Math.PI is not equal to 3.141592653589793.
PASS AudioBufferSourceNode.detune.maxValue is read-only is equal to true. PASS AudioBufferSourceNode.detune.maxValue is read-only is equal to true.
PASS Nominal ranges for AudioParam(s) of AudioBufferSourceNode are correct PASS Nominal ranges for AudioParam(s) of AudioBufferSourceNode are correct
PASS < [createBufferSource] All assertions passed. (total 13 assertions) PASS < [Offline createBufferSource] All assertions passed. (total 13 assertions)
PASS > [createStereoPanner] PASS > [Offline createStereoPanner]
PASS StereoPannerNode.pan.minValue is equal to -1. PASS StereoPannerNode.pan.minValue is equal to -1.
PASS StereoPannerNode.pan.maxValue is equal to 1. PASS StereoPannerNode.pan.maxValue is equal to 1.
PASS StereoPannerNode.pan.minValue = Math.PI is not equal to 3.141592653589793. PASS StereoPannerNode.pan.minValue = Math.PI is not equal to 3.141592653589793.
...@@ -89,8 +91,8 @@ PASS Set StereoPannerNode.pan.value = -3 is equal to -1. ...@@ -89,8 +91,8 @@ PASS Set StereoPannerNode.pan.value = -3 is equal to -1.
PASS Set StereoPannerNode.pan.value = 3 is equal to 1. PASS Set StereoPannerNode.pan.value = 3 is equal to 1.
PASS StereoPannerNode.panwas clipped to lie within the nominal range is equal to true. PASS StereoPannerNode.panwas clipped to lie within the nominal range is equal to true.
PASS Nominal ranges for AudioParam(s) of StereoPannerNode are correct PASS Nominal ranges for AudioParam(s) of StereoPannerNode are correct
PASS < [createStereoPanner] All assertions passed. (total 10 assertions) PASS < [Offline createStereoPanner] All assertions passed. (total 10 assertions)
PASS > [createDynamicsCompressor] PASS > [Offline createDynamicsCompressor]
PASS DynamicsCompressorNode.threshold.minValue is equal to -100. PASS DynamicsCompressorNode.threshold.minValue is equal to -100.
PASS DynamicsCompressorNode.threshold.maxValue is equal to 0. PASS DynamicsCompressorNode.threshold.maxValue is equal to 0.
PASS DynamicsCompressorNode.threshold.minValue = Math.PI is not equal to 3.141592653589793. PASS DynamicsCompressorNode.threshold.minValue = Math.PI is not equal to 3.141592653589793.
...@@ -137,8 +139,8 @@ PASS Set DynamicsCompressorNode.release.value = -1 is equal to 0. ...@@ -137,8 +139,8 @@ PASS Set DynamicsCompressorNode.release.value = -1 is equal to 0.
PASS Set DynamicsCompressorNode.release.value = 3 is equal to 1. PASS Set DynamicsCompressorNode.release.value = 3 is equal to 1.
PASS DynamicsCompressorNode.releasewas clipped to lie within the nominal range is equal to true. PASS DynamicsCompressorNode.releasewas clipped to lie within the nominal range is equal to true.
PASS Nominal ranges for AudioParam(s) of DynamicsCompressorNode are correct PASS Nominal ranges for AudioParam(s) of DynamicsCompressorNode are correct
PASS < [createDynamicsCompressor] All assertions passed. (total 46 assertions) PASS < [Offline createDynamicsCompressor] All assertions passed. (total 46 assertions)
PASS > [createBiquadFilter] PASS > [Offline createBiquadFilter]
PASS BiquadFilterNode.frequency.minValue is equal to 0. PASS BiquadFilterNode.frequency.minValue is equal to 0.
PASS BiquadFilterNode.frequency.maxValue is equal to 24000. PASS BiquadFilterNode.frequency.maxValue is equal to 24000.
PASS BiquadFilterNode.frequency.minValue = Math.PI is not equal to 3.141592653589793. PASS BiquadFilterNode.frequency.minValue = Math.PI is not equal to 3.141592653589793.
...@@ -167,8 +169,8 @@ PASS BiquadFilterNode.gain.minValue is read-only is equal to true. ...@@ -167,8 +169,8 @@ PASS BiquadFilterNode.gain.minValue is read-only is equal to true.
PASS BiquadFilterNode.gain.maxValue = Math.PI is not equal to 3.141592653589793. PASS BiquadFilterNode.gain.maxValue = Math.PI is not equal to 3.141592653589793.
PASS BiquadFilterNode.gain.maxValue is read-only is equal to true. PASS BiquadFilterNode.gain.maxValue is read-only is equal to true.
PASS Nominal ranges for AudioParam(s) of BiquadFilterNode are correct PASS Nominal ranges for AudioParam(s) of BiquadFilterNode are correct
PASS < [createBiquadFilter] All assertions passed. (total 28 assertions) PASS < [Offline createBiquadFilter] All assertions passed. (total 28 assertions)
PASS > [createOscillator] PASS > [Offline createOscillator]
PASS OscillatorNode.frequency.minValue is equal to -24000. PASS OscillatorNode.frequency.minValue is equal to -24000.
PASS OscillatorNode.frequency.maxValue is equal to 24000. PASS OscillatorNode.frequency.maxValue is equal to 24000.
PASS OscillatorNode.frequency.minValue = Math.PI is not equal to 3.141592653589793. PASS OscillatorNode.frequency.minValue = Math.PI is not equal to 3.141592653589793.
...@@ -185,8 +187,8 @@ PASS OscillatorNode.detune.minValue is read-only is equal to true. ...@@ -185,8 +187,8 @@ PASS OscillatorNode.detune.minValue is read-only is equal to true.
PASS OscillatorNode.detune.maxValue = Math.PI is not equal to 3.141592653589793. PASS OscillatorNode.detune.maxValue = Math.PI is not equal to 3.141592653589793.
PASS OscillatorNode.detune.maxValue is read-only is equal to true. PASS OscillatorNode.detune.maxValue is read-only is equal to true.
PASS Nominal ranges for AudioParam(s) of OscillatorNode are correct PASS Nominal ranges for AudioParam(s) of OscillatorNode are correct
PASS < [createOscillator] All assertions passed. (total 16 assertions) PASS < [Offline createOscillator] All assertions passed. (total 16 assertions)
PASS > [createPanner] PASS > [Offline createPanner]
PASS PannerNode.positionX.minValue is equal to -3.4028234663852886e+38. PASS PannerNode.positionX.minValue is equal to -3.4028234663852886e+38.
PASS PannerNode.positionX.maxValue is equal to 3.4028234663852886e+38. PASS PannerNode.positionX.maxValue is equal to 3.4028234663852886e+38.
PASS PannerNode.positionX.minValue = Math.PI is not equal to 3.141592653589793. PASS PannerNode.positionX.minValue = Math.PI is not equal to 3.141592653589793.
...@@ -224,8 +226,8 @@ PASS PannerNode.orientationZ.minValue is read-only is equal to true. ...@@ -224,8 +226,8 @@ PASS PannerNode.orientationZ.minValue is read-only is equal to true.
PASS PannerNode.orientationZ.maxValue = Math.PI is not equal to 3.141592653589793. PASS PannerNode.orientationZ.maxValue = Math.PI is not equal to 3.141592653589793.
PASS PannerNode.orientationZ.maxValue is read-only is equal to true. PASS PannerNode.orientationZ.maxValue is read-only is equal to true.
PASS Nominal ranges for AudioParam(s) of PannerNode are correct PASS Nominal ranges for AudioParam(s) of PannerNode are correct
PASS < [createPanner] All assertions passed. (total 37 assertions) PASS < [Offline createPanner] All assertions passed. (total 37 assertions)
PASS > [createConstantSource] PASS > [Offline createConstantSource]
PASS ConstantSourceNode.offset.minValue is equal to -3.4028234663852886e+38. PASS ConstantSourceNode.offset.minValue is equal to -3.4028234663852886e+38.
PASS ConstantSourceNode.offset.maxValue is equal to 3.4028234663852886e+38. PASS ConstantSourceNode.offset.maxValue is equal to 3.4028234663852886e+38.
PASS ConstantSourceNode.offset.minValue = Math.PI is not equal to 3.141592653589793. PASS ConstantSourceNode.offset.minValue = Math.PI is not equal to 3.141592653589793.
...@@ -233,40 +235,40 @@ PASS ConstantSourceNode.offset.minValue is read-only is equal to true. ...@@ -233,40 +235,40 @@ PASS ConstantSourceNode.offset.minValue is read-only is equal to true.
PASS ConstantSourceNode.offset.maxValue = Math.PI is not equal to 3.141592653589793. PASS ConstantSourceNode.offset.maxValue = Math.PI is not equal to 3.141592653589793.
PASS ConstantSourceNode.offset.maxValue is read-only is equal to true. PASS ConstantSourceNode.offset.maxValue is read-only is equal to true.
PASS Nominal ranges for AudioParam(s) of ConstantSourceNode are correct PASS Nominal ranges for AudioParam(s) of ConstantSourceNode are correct
PASS < [createConstantSource] All assertions passed. (total 7 assertions) PASS < [Offline createConstantSource] All assertions passed. (total 7 assertions)
PASS > [createBuffer] PASS > [Offline createBuffer]
PASS AudioBuffer has no AudioParams as expected PASS AudioBuffer has no AudioParams as expected
PASS < [createBuffer] All assertions passed. (total 1 assertions) PASS < [Offline createBuffer] All assertions passed. (total 1 assertions)
PASS > [createIIRFilter] PASS > [Offline createIIRFilter]
PASS IIRFilterNode has no AudioParams as expected PASS IIRFilterNode has no AudioParams as expected
PASS < [createIIRFilter] All assertions passed. (total 1 assertions) PASS < [Offline createIIRFilter] All assertions passed. (total 1 assertions)
PASS > [createWaveShaper] PASS > [Offline createWaveShaper]
PASS WaveShaperNode has no AudioParams as expected PASS WaveShaperNode has no AudioParams as expected
PASS < [createWaveShaper] All assertions passed. (total 1 assertions) PASS < [Offline createWaveShaper] All assertions passed. (total 1 assertions)
PASS > [createConvolver] PASS > [Offline createConvolver]
PASS ConvolverNode has no AudioParams as expected PASS ConvolverNode has no AudioParams as expected
PASS < [createConvolver] All assertions passed. (total 1 assertions) PASS < [Offline createConvolver] All assertions passed. (total 1 assertions)
PASS > [createAnalyser] PASS > [Offline createAnalyser]
PASS AnalyserNode has no AudioParams as expected PASS AnalyserNode has no AudioParams as expected
PASS < [createAnalyser] All assertions passed. (total 1 assertions) PASS < [Offline createAnalyser] All assertions passed. (total 1 assertions)
PASS > [createScriptProcessor] PASS > [Offline createScriptProcessor]
PASS ScriptProcessorNode has no AudioParams as expected PASS ScriptProcessorNode has no AudioParams as expected
PASS < [createScriptProcessor] All assertions passed. (total 1 assertions) PASS < [Offline createScriptProcessor] All assertions passed. (total 1 assertions)
PASS > [createPeriodicWave] PASS > [Offline createPeriodicWave]
PASS PeriodicWave has no AudioParams as expected PASS PeriodicWave has no AudioParams as expected
PASS < [createPeriodicWave] All assertions passed. (total 1 assertions) PASS < [Offline createPeriodicWave] All assertions passed. (total 1 assertions)
PASS > [createChannelSplitter] PASS > [Offline createChannelSplitter]
PASS ChannelSplitterNode has no AudioParams as expected PASS ChannelSplitterNode has no AudioParams as expected
PASS < [createChannelSplitter] All assertions passed. (total 1 assertions) PASS < [Offline createChannelSplitter] All assertions passed. (total 1 assertions)
PASS > [createChannelMerger] PASS > [Offline createChannelMerger]
PASS ChannelMergerNode has no AudioParams as expected PASS ChannelMergerNode has no AudioParams as expected
PASS < [createChannelMerger] All assertions passed. (total 1 assertions) PASS < [Offline createChannelMerger] All assertions passed. (total 1 assertions)
PASS > [createMediaElementSource] PASS > [Online createMediaElementSource]
PASS MediaElementAudioSourceNode has no AudioParams as expected PASS MediaElementAudioSourceNode has no AudioParams as expected
PASS < [createMediaElementSource] All assertions passed. (total 1 assertions) PASS < [Online createMediaElementSource] All assertions passed. (total 1 assertions)
PASS > [createMediaStreamDestination] PASS > [Online createMediaStreamDestination]
PASS MediaStreamAudioDestinationNode has no AudioParams as expected PASS MediaStreamAudioDestinationNode has no AudioParams as expected
PASS < [createMediaStreamDestination] All assertions passed. (total 1 assertions) PASS < [Online createMediaStreamDestination] All assertions passed. (total 1 assertions)
PASS > [AudioListener] PASS > [AudioListener]
PASS AudioListener.positionX.minValue is equal to -3.4028234663852886e+38. PASS AudioListener.positionX.minValue is equal to -3.4028234663852886e+38.
PASS AudioListener.positionX.maxValue is equal to 3.4028234663852886e+38. PASS AudioListener.positionX.maxValue is equal to 3.4028234663852886e+38.
......
...@@ -14,8 +14,9 @@ ...@@ -14,8 +14,9 @@
// Some arbitrary sample rate for the offline context. // Some arbitrary sample rate for the offline context.
let sampleRate = 48000; let sampleRate = 48000;
// The actual offline context // The actual contexts to use
let context; let offlineContext;
let onlineContext;
// The set of all methods that we've tested for verifying that we tested // The set of all methods that we've tested for verifying that we tested
// all of the necessary objects. // all of the necessary objects.
...@@ -31,8 +32,11 @@ ...@@ -31,8 +32,11 @@
let audit = Audit.createTaskRunner(); let audit = Audit.createTaskRunner();
// Array describing the tests that should be run. // Array describing the tests that should be run. |testOfflineConfigs| is
let testConfigs = [ // for tests that can use an offline context. |testOnlineConfigs| is for
// tests that need to use an online context. Offline contexts are
// preferred when possible.
let testOfflineConfigs = [
{ {
// The name of the method to create the particular node to be tested. // The name of the method to create the particular node to be tested.
creator: 'createGain', creator: 'createGain',
...@@ -186,27 +190,44 @@ ...@@ -186,27 +190,44 @@
creator: 'createChannelMerger', creator: 'createChannelMerger',
args: [], args: [],
}, },
];
let testOnlineConfigs = [
{creator: 'createMediaElementSource', args: [new Audio()]}, {creator: 'createMediaElementSource', args: [new Audio()]},
{creator: 'createMediaStreamDestination', args: []} {creator: 'createMediaStreamDestination', args: []}
// Can't currently test MediaStreamSource because we're using an offline // Can't currently test MediaStreamSource because we're using an offline
// context. // context.
]; ];
// Create the context so we can use it in the following test. // Create the contexts so we can use it in the following test.
audit.define('initialize', (task, should) => { audit.define('initialize', (task, should) => {
// Just any context so that we can create the nodes. // Just any context so that we can create the nodes.
should(() => { should(() => {
context = new OfflineAudioContext(1, 1, sampleRate); offlineContext = new OfflineAudioContext(1, 1, sampleRate);
}, 'Create context for tests').notThrow(); }, 'Create offline context for tests').notThrow();
should(() => {
onlineContext = new AudioContext();
}, 'Create online context for tests').notThrow();
task.done(); task.done();
}); });
// Create a task for each entry in testConfigs // Create a task for each entry in testOfflineConfigs
for (let test in testConfigs) { for (let test in testOfflineConfigs) {
let config = testConfigs[test] let config = testOfflineConfigs[test]
audit.define(config.creator, (function(c) { audit.define('Offline ' + config.creator, (function(c) {
return (task, should) => {
let node = offlineContext[c.creator](...c.args);
testLimits(should, c.creator, node, c.limits);
task.done();
};
})(config));
}
for (let test in testOnlineConfigs) {
let config = testOnlineConfigs[test]
audit.define('Online ' + config.creator, (function(c) {
return (task, should) => { return (task, should) => {
let node = context[c.creator](...c.args); let node = onlineContext[c.creator](...c.args);
testLimits(should, c.creator, node, c.limits); testLimits(should, c.creator, node, c.limits);
task.done(); task.done();
}; };
...@@ -215,7 +236,7 @@ ...@@ -215,7 +236,7 @@
// Test the AudioListener params that were added for the automated Panner // Test the AudioListener params that were added for the automated Panner
audit.define('AudioListener', (task, should) => { audit.define('AudioListener', (task, should) => {
testLimits(should, '', context.listener, { testLimits(should, '', offlineContext.listener, {
positionX: { positionX: {
minValue: -mostPositiveFloat, minValue: -mostPositiveFloat,
maxValue: mostPositiveFloat, maxValue: mostPositiveFloat,
...@@ -261,8 +282,8 @@ ...@@ -261,8 +282,8 @@
audit.define('verifyTests', (task, should) => { audit.define('verifyTests', (task, should) => {
let allNodes = new Set(); let allNodes = new Set();
// Create the set of all "create" methods from the context. // Create the set of all "create" methods from the context.
for (let method in context) { for (let method in offlineContext) {
if (typeof context[method] === 'function' && if (typeof offlineContext[method] === 'function' &&
method.substring(0, 6) === 'create') { method.substring(0, 6) === 'create') {
allNodes.add(method); allNodes.add(method);
} }
...@@ -295,7 +316,7 @@ ...@@ -295,7 +316,7 @@
// Just use a DelayNode for testing because the audio param has finite // Just use a DelayNode for testing because the audio param has finite
// limits. // limits.
should(() => { should(() => {
let d = context.createDelay(); let d = offlineContext.createDelay();
// The console output should have the warnings that we're interested // The console output should have the warnings that we're interested
// in. // in.
......
CONSOLE WARNING: line 22: The Web Audio autoplay policy will be re-enabled in Chrome 70 (October 2018). Please check that your website is compatible with it. https://goo.gl/7K7WLu
Tests garbage collection of MediaElementAudioSourceNode. Tests garbage collection of MediaElementAudioSourceNode.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
} }
audioElement = document.createElement('audio'); audioElement = document.createElement('audio');
context = new OfflineAudioContext(1, 1000, 44100); context = new AudioContext();
source = context.createMediaElementSource(audioElement); source = context.createMediaElementSource(audioElement);
audioElement = null; audioElement = null;
context = null; context = null;
......
...@@ -1939,6 +1939,9 @@ enum WebFeature { ...@@ -1939,6 +1939,9 @@ enum WebFeature {
kTextToSpeech_SpeakCrossOrigin = 2472, kTextToSpeech_SpeakCrossOrigin = 2472,
kTextToSpeech_SpeakDisallowedByAutoplay = 2473, kTextToSpeech_SpeakDisallowedByAutoplay = 2473,
kStaleWhileRevalidateEnabled = 2474, kStaleWhileRevalidateEnabled = 2474,
kMediaElementSourceOnOfflineContext = 2475,
kMediaStreamDestinationOnOfflineContext = 2476,
kMediaStreamSourceOnOfflineContext = 2477,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -567,6 +567,25 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) { ...@@ -567,6 +567,25 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) {
WillBeRemoved("Anonymous named getter of HTMLFrameSetElement", WillBeRemoved("Anonymous named getter of HTMLFrameSetElement",
kM70, "5235521668251648")}; kM70, "5235521668251648")};
case WebFeature::kMediaElementSourceOnOfflineContext:
return {"MediaElementAudioSourceNode", kM70,
WillBeRemoved("Creating a MediaElementAudioSourceNode on an "
"OfflineAudioContext",
kM70, "5258622686724096")};
case WebFeature::kMediaStreamDestinationOnOfflineContext:
return {"MediaStreamAudioDestinationNode", kM70,
WillBeRemoved("Creating a MediaStreamAudioDestinationNode on an "
"OfflineAudioContext",
kM70, "5258622686724096")};
case WebFeature::kMediaStreamSourceOnOfflineContext:
return {
"MediaStreamAudioSourceNode", kM70,
WillBeRemoved(
"Creating a MediaStreamAudioSourceNode on an OfflineAudioContext",
kM70, "5258622686724096")};
// Features that aren't deprecated don't have a deprecation message. // Features that aren't deprecated don't have a deprecation message.
default: default:
return {"NotDeprecated", kUnknown, ""}; return {"NotDeprecated", kUnknown, ""};
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.h" #include "third_party/blink/renderer/modules/webaudio/media_element_audio_source_node.h"
#include "third_party/blink/public/platform/task_type.h" #include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/core/frame/deprecation.h"
#include "third_party/blink/renderer/core/html/media/html_media_element.h" #include "third_party/blink/renderer/core/html/media/html_media_element.h"
#include "third_party/blink/renderer/core/inspector/console_message.h" #include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/modules/webaudio/audio_node_output.h" #include "third_party/blink/renderer/modules/webaudio/audio_node_output.h"
...@@ -249,6 +250,11 @@ MediaElementAudioSourceNode* MediaElementAudioSourceNode::Create( ...@@ -249,6 +250,11 @@ MediaElementAudioSourceNode* MediaElementAudioSourceNode::Create(
media_element.SetAudioSourceNode(node); media_element.SetAudioSourceNode(node);
// context keeps reference until node is disconnected // context keeps reference until node is disconnected
context.NotifySourceNodeStartedProcessing(node); context.NotifySourceNodeStartedProcessing(node);
if (!context.HasRealtimeConstraint()) {
Deprecation::CountDeprecation(
node->GetExecutionContext(),
WebFeature::kMediaElementSourceOnOfflineContext);
}
} }
return node; return node;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "third_party/blink/renderer/modules/webaudio/media_stream_audio_destination_node.h" #include "third_party/blink/renderer/modules/webaudio/media_stream_audio_destination_node.h"
#include "third_party/blink/public/platform/web_rtc_peer_connection_handler.h" #include "third_party/blink/public/platform/web_rtc_peer_connection_handler.h"
#include "third_party/blink/renderer/core/frame/deprecation.h"
#include "third_party/blink/renderer/modules/webaudio/audio_node_input.h" #include "third_party/blink/renderer/modules/webaudio/audio_node_input.h"
#include "third_party/blink/renderer/modules/webaudio/audio_node_options.h" #include "third_party/blink/renderer/modules/webaudio/audio_node_options.h"
#include "third_party/blink/renderer/modules/webaudio/base_audio_context.h" #include "third_party/blink/renderer/modules/webaudio/base_audio_context.h"
...@@ -181,6 +182,12 @@ MediaStreamAudioDestinationNode* MediaStreamAudioDestinationNode::Create( ...@@ -181,6 +182,12 @@ MediaStreamAudioDestinationNode* MediaStreamAudioDestinationNode::Create(
node->HandleChannelOptions(options, exception_state); node->HandleChannelOptions(options, exception_state);
if (!context->HasRealtimeConstraint()) {
Deprecation::CountDeprecation(
node->GetExecutionContext(),
WebFeature::kMediaStreamDestinationOnOfflineContext);
}
return node; return node;
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "third_party/blink/renderer/modules/webaudio/media_stream_audio_source_node.h" #include "third_party/blink/renderer/modules/webaudio/media_stream_audio_source_node.h"
#include <memory> #include <memory>
#include "third_party/blink/renderer/core/frame/deprecation.h"
#include "third_party/blink/renderer/modules/webaudio/audio_node_output.h" #include "third_party/blink/renderer/modules/webaudio/audio_node_output.h"
#include "third_party/blink/renderer/modules/webaudio/base_audio_context.h" #include "third_party/blink/renderer/modules/webaudio/base_audio_context.h"
#include "third_party/blink/renderer/modules/webaudio/media_stream_audio_source_options.h" #include "third_party/blink/renderer/modules/webaudio/media_stream_audio_source_options.h"
...@@ -165,6 +166,12 @@ MediaStreamAudioSourceNode* MediaStreamAudioSourceNode::Create( ...@@ -165,6 +166,12 @@ MediaStreamAudioSourceNode* MediaStreamAudioSourceNode::Create(
// context keeps reference until node is disconnected // context keeps reference until node is disconnected
context.NotifySourceNodeStartedProcessing(node); context.NotifySourceNodeStartedProcessing(node);
if (!context.HasRealtimeConstraint()) {
Deprecation::CountDeprecation(
node->GetExecutionContext(),
WebFeature::kMediaStreamSourceOnOfflineContext);
}
return node; return node;
} }
......
...@@ -19006,6 +19006,9 @@ Called by update_net_error_codes.py.--> ...@@ -19006,6 +19006,9 @@ Called by update_net_error_codes.py.-->
<int value="2472" label="TextToSpeech_SpeakCrossOrigin"/> <int value="2472" label="TextToSpeech_SpeakCrossOrigin"/>
<int value="2473" label="TextToSpeech_SpeakDisallowedByAutoplay"/> <int value="2473" label="TextToSpeech_SpeakDisallowedByAutoplay"/>
<int value="2474" label="StaleWhileRevalidateEnabled"/> <int value="2474" label="StaleWhileRevalidateEnabled"/>
<int value="2475" label="MediaElementSourceOnOfflineContext"/>
<int value="2476" label="MediaStreamDestinationOnOfflineContext"/>
<int value="2477" label="MediaStreamSourceOnOfflineContext"/>
</enum> </enum>
<enum name="FeedbackSource"> <enum name="FeedbackSource">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment