mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-29 00:51:29 +08:00
* added hls.js definition * changed to new tslint format * fixing lint errors * changed definition structure based on PR comment
12 lines
322 B
TypeScript
12 lines
322 B
TypeScript
import * as Hls from 'hls.js';
|
|
|
|
if (Hls.isSupported) {
|
|
const video = <HTMLVideoElement> document.getElementById('video');
|
|
const hls = new Hls();
|
|
hls.loadSource('http://www.streambox.fr/playlists/test_001/stream.m3u8');
|
|
hls.attachMedia(video);
|
|
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
|
video.play();
|
|
});
|
|
}
|