AudioScheduledSourceNode
interface—part of the Web Audio API—is a parent interface for several types of audio source node interfaces which share the ability to be started and stopped, optionally at specified times. Specifically, this interface defines the
start()
and
stop()
methods, as well as the
onended
event handler.
You can't create an
AudioScheduledSourceNode
object directly. Instead, use the interface which extends it, such as
AudioBufferSourceNode
,
OscillatorNode
,和
ConstantSourceNode
.
Unless stated otherwise, nodes based upon
AudioScheduledSourceNode
output silence when not playing (that is, before
start()
is called and after
stop()
is called). Silence is represented, as always, by a stream of samples with the value zero (0).
继承来自其父级接口的特性,
AudioNode
.
Inherits methods from its parent interface,
AudioNode
, and adds the following methods:
start()
Schedules the node to begin playing the constant sound at the specified time. If no time is specified, the node begins playing immediately.
stop()
Schedules the node to stop playing at the specified time. If no time is specified, the node stops playing at once.
监听这些事件使用
addEventListener()
或通过把事件监听器赋值给
on
eventname
property of this interface:
ended
onended
event handler property.
| 规范 | 状态 | 注释 |
|---|---|---|
|
Web 音频 API
The definition of 'AudioScheduledSourceNode' in that specification. |
工作草案 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
AudioScheduledSourceNode
|
Chrome
57
|
Edge ≤79 |
Firefox
53
|
IE 不支持 No |
Opera
44
|
Safari ? |
WebView Android
57
|
Chrome Android
57
|
Firefox Android
53
|
Opera Android
44
|
Safari iOS ? |
Samsung Internet Android
7.0
|
ended
event
|
Chrome 14 | Edge ≤79 | Firefox 53 | IE 不支持 No | Opera 15 | Safari ? | WebView Android Yes | Chrome Android 18 | Firefox Android 25 | Opera Android 14 | Safari iOS ? | Samsung Internet Android 1.0 |
onended
|
Chrome 14 | Edge ≤79 | Firefox 53 | IE 不支持 No | Opera 15 | Safari ? | WebView Android Yes | Chrome Android 18 | Firefox Android 25 | Opera Android 14 | Safari iOS ? | Samsung Internet Android 1.0 |
start
|
Chrome 14 | Edge ≤79 | Firefox 53 | IE 不支持 No | Opera 15 | Safari ? | WebView Android Yes | Chrome Android 18 | Firefox Android 25 | Opera Android 14 | Safari iOS ? | Samsung Internet Android 1.0 |
stop
|
Chrome 14 | Edge ≤79 | Firefox 53 | IE 不支持 No | Opera 15 | Safari ? | WebView Android Yes | Chrome Android 18 | Firefox Android 25 | Opera Android 14 | Safari iOS ? | Samsung Internet Android 1.0 |
完整支持
不支持
兼容性未知
使用非标名称。
AudioScheduledSourceNode
AnalyserNode
AudioBuffer
AudioBufferSourceNode
AudioContext
AudioContextOptions
AudioDestinationNode
AudioListener
AudioNode
AudioNodeOptions
AudioParam
AudioProcessingEvent
AudioWorklet
AudioWorkletGlobalScope
AudioWorkletNode
AudioWorkletProcessor
BaseAudioContext
BiquadFilterNode
ChannelMergerNode
ChannelSplitterNode
ConstantSourceNode
ConvolverNode
DelayNode
DynamicsCompressorNode
GainNode
IIRFilterNode
MediaElementAudioSourceNode
MediaStreamAudioDestinationNode
MediaStreamAudioSourceNode
OfflineAudioCompletionEvent
OfflineAudioContext
OscillatorNode
PannerNode
PeriodicWave
StereoPannerNode
WaveShaperNode