Files
DefinitelyTyped/types/hls.js/hls.js-tests.ts
John Gainfort 58e2df31f6 new definition file for hls.js (#16028)
* added hls.js definition

* changed to new tslint format

* fixing lint errors

* changed definition structure based on PR comment
2017-04-20 10:54:50 -07:00

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();
});
}