Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/types/lib.dom.ts>SourceBuffer

💧EventEmitter's typesafe replacement
Go to Latest
interface SourceBuffer
implements EventTarget
import { type SourceBuffer } from "https://deno.land/x/evt@v2.5.6/lib/types/lib.dom.ts";

A chunk of media to be passed into an HTMLMediaElement and played, via a MediaSource object. This can be made up of one or several media segments.

Properties

appendWindowEnd: number
appendWindowStart: number
readonly
audioTracks: AudioTrackList
readonly
buffered: TimeRanges
onabort: ((this: SourceBuffer, ev: Event) => any) | null
onerror: ((this: SourceBuffer, ev: Event) => any) | null
onupdate: ((this: SourceBuffer, ev: Event) => any) | null
onupdateend: ((this: SourceBuffer, ev: Event) => any) | null
onupdatestart: ((this: SourceBuffer, ev: Event) => any) | null
readonly
textTracks: TextTrackList
timestampOffset: number
readonly
updating: boolean
readonly
videoTracks: VideoTrackList

Methods

abort(): void
appendBuffer(data: BufferSource): void
remove(start: number, end: number): void
addEventListener<K extends keyof SourceBufferEventMap>(
type: K,
listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof SourceBufferEventMap>(
type: K,
listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void