blob: bf3858f373b736ae92cad0ba1cd2ec33b04d55db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
export class TrackHandle extends EventTarget {
constructor(public track: MediaStreamTrack) {
super()
track.onended = () => this.dispatchEvent(new CustomEvent("ended"))
track.onmute = () => this.dispatchEvent(new CustomEvent("mute"))
track.onunmute = () => this.dispatchEvent(new CustomEvent("unmute"))
}
get kind() { return this.track.kind }
get label() { return this.track.label }
get muted() { return this.track.muted }
get id() { return this.track.id }
}
|