as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#sourcebuffer(仅提供英文版)。

扩展

属性

mode

mode: AppendMode 获取或设置附加模式。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-mode。

updating

readonly updating: boolean 检查源缓冲区是否在更新轨道缓冲区。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-updating。

buffered

readonly buffered: TimeRanges 获取缓冲媒体的时间范围。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-buffered。

timestampOffset

timestampOffset: number 获取或设置应用于每个编码帧的时间戳偏移量。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-timestampoffset。

audioTracks

readonly audioTracks: AudioTrackList 获取音轨列表。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-audiotracks。

videoTracks

readonly videoTracks: VideoTrackList 获取视频轨道列表。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-videotracks。

textTracks

readonly textTracks: TextTrackList 获取文本轨道列表。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-texttracks。

appendWindowStart

appendWindowStart: number 获取或设置附加窗口的开始位置(以秒为单位)。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-appendwindowstart。

appendWindowEnd

appendWindowEnd: number 获取或设置附加窗口的结束位置(以秒为单位)。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-appendwindowend。

onupdatestart

onupdatestart: EventListener 有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onupdatestart

onupdate

onupdate: EventListener 有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onupdate

onupdateend

onupdateend: EventListener 有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onupdateend

onerror

onerror: EventListener 有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onerror

onabort

onabort: EventListener 有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-onabort

方法

appendBuffer()

appendBuffer(data: ArrayBuffer | Uint8Array<ArrayBufferLike>): void 附加媒体片段。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-appendbuffer(仅提供英文版)。

参数

data
ArrayBuffer | Uint8Array<ArrayBufferLike>

abort()

abort(): void 中止源缓冲区操作。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-abort。

changeType()

changeType(type: string): void 更改源缓冲区的mime类型。 https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-changetype

参数

type
string

remove()

remove(start: number, end: number): void 从内部轨道缓冲队列中移除介于开始和结束时间戳位置之间的媒体样本。有关更多信息,请参阅https://www.w3.org/TR/media-source-2/#dom-sourcebuffer-remove(仅提供英文版)。

参数

start
number
end
number
最后修改于 2026年10月26日