media-track-list
v1.3.0
Published
Implements VideoTrackList/VideoTrack and AudioTrackList/AudioTrack interfaces
Downloads
38
Maintainers
Readme
media-track-list
media-track-list
implements VideoTrackList/AudioTrackList interfaces in JavaScript.
This can be used for extending native HTMLVideoElement API.
Usage
import {
VideoTrackList,
AudioTrackList,
VideoTrack,
AudioTrack,
clearTrackList,
} from 'media-track-list';
const videoTrackList = new VideoTrackList();
const track = new VideoTrack({
id: '0',
width: 1920,
height: 1080,
});
videoTrackList.addTrack(track);
clearTrackList(videoTrackList);