AudioScheduledSourceNode

The 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, and 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).

Properties

Inherits properties from its parent interface, AudioNode, and adds the following properties:

Event handlers

onended
A function to be called when the ended event is fired, indicating that the node has finished playing.

Methods

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.

Specification

Specification Status Comment
Web Audio API
The definition of 'AudioScheduledSourceNode' in that specification.
Working Draft  

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support

57

14 — 561

?

53

25 — 521

No

44

15 — 431

?
onended

57

14 — 562

?53 No15 ?
start

57

14 — 562

?53 No15 ?
stop

57

14 — 562

?53 No15 ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support

57

14 — 561

57

14 — 561

?

53

25 — 521

44

15 — 431

?7.0
onended

57

14 — 562

57

14 — 562

?2515 ? Yes
start

57

14 — 562

57

14 — 562

?2515 ? Yes
stop

57

14 — 562

57

14 — 562

?2515 ? Yes

1. Supported as AudioSourceNode.

2. Before version 57, this event was implemented on AudioBufferSourceNode, OscillatorNode, and ConstantSourceNode, which are now children of this class.

See also

Document Tags and Contributors

Contributors to this page: fscholz, notoriousb1t, jpmedley, Sheppy
Last updated by: fscholz,