Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. AudioScheduledSourceNode

AudioScheduledSourceNode

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨September 2020⁩.

TheAudioScheduledSourceNode 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 thestart() andstop() methods, as well as theended event.

Note:You can't create anAudioScheduledSourceNode object directly. Instead, use an interface which extends it, such asAudioBufferSourceNode,OscillatorNode orConstantSourceNode.

Unless stated otherwise, nodes based uponAudioScheduledSourceNode output silence when not playing (that is, beforestart() is called and afterstop() is called). Silence is represented, as always, by a stream of samples with the value zero (0).

EventTarget AudioNode AudioScheduledSourceNode

Instance properties

Inherits properties from its parent interface,AudioNode.

Instance 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.

Events

Listen to these events usingaddEventListener() or by assigning an event listener to theoneventname property of this interface:

ended

Fired when the source node has stopped playing, either because it's reached a predetermined stop time, the full duration of the audio has been performed, or because the entire buffer has been played.

Specifications

Specification
Web Audio API
# AudioScheduledSourceNode

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp