as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
该类实现SourceBuffer接口。它使用EventEmitter来发出事件

扩展

  • EventAttributes

实现

构造函数

new SourceBufferImpl()

new SourceBufferImpl(mediaElement, mediaSource, sourceBufferId, type): SourceBufferImpl

参数

mediaElement
NativeInterfaces.NativeMediaElement | null
mediaSource
MediaSource
sourceBufferId
string
type
string

返回值

SourceBufferImpl

方法

abort()

abort(): void

addEventListener()

addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions | undefined): void

参数

type
string
listener
EventListener
options?
boolean | AddEventListenerOptions | undefined

appendBuffer()

appendBuffer(data: ArrayBuffer | Uint8Array<ArrayBufferLike>): void

参数

data
ArrayBuffer | Uint8Array<ArrayBufferLike>

changeType()

changeType(type: string): void

参数

type
string

checkforValidNumber()

checkforValidNumber(value: number): boolean

参数

value
number

返回值

boolean

getId()

getId(): string

返回值

string

handleEvent()

handleEvent(event: NativeInterfaces.NativeMediaElementEvent): void

参数

event
NativeInterfaces.NativeMediaElementEvent

remove()

remove(start: number, end: number): void

参数

start
number
end
number

removeEventListener()

removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions | undefined): void

参数

type
string
listener
EventListener
options?
boolean | EventListenerOptions | undefined
最后修改于 2026年10月26日