大网数据广告活动
Web 标准与前端开发

AudioScheduledSourceNode

· 52CE 我爱测

`AudioScheduledSourceNode` 接口作为 web 音频 API 的一部分,是几种具有在特定时刻开始与停止能力的音频源节点接口的父接口。更具体地来说,这个接口定义了AudioScheduledSourceNode.start 和AudioScheduledSourceNode.stop 方法,以及AudioScheduledSourceNode.onended事件

Web Audio API

AudioScheduledSourceNode 接口作为 web 音频 API 的一部分,是几种具有在特定时刻开始与停止能力的音频源节点接口的父接口。更具体地来说,这个接口定义了AudioScheduledSourceNode.start 和AudioScheduledSourceNode.stop 方法,以及AudioScheduledSourceNode.onended事件

[!NOTE] 你不能直接创建AudioScheduledSourceNode。而是应该使用继承于它的子接口,如AudioBufferSourceNode, OscillatorNode和ConstantSourceNode.

除非另有说明,基于AudioScheduledSourceNode节点的输出在没有播放时处于静默状态(这种状态在 start() 之前与 stop() 之后调用)。静默状态总是由一个全 0 值流组成。

Properties

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

Event handlers

  • AudioScheduledSourceNode.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:

  • AudioScheduledSourceNode.start
    • : Schedules the node to begin playing the constant sound at the specified time. If no time is specified, the node begins playing immediately.
  • AudioScheduledSourceNode.stop
    • : Schedules the node to stop playing at the specified time. If no time is specified, the node stops playing at once.

Specification

Browser compatibility

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。