hls-video-element
Advanced tools
Comparing version 1.1.0 to 1.1.1
import { CustomVideoElement } from 'custom-media-element'; | ||
import Hls from 'hls.js'; | ||
declare class HLSVideoElement extends CustomVideoElement { | ||
type HlsVideoElementConstructor<T> = { new(): T }; | ||
export function HlsVideoMixin(superclass: any): HlsVideoElementConstructor<HLSVideoElement>; | ||
export class HLSVideoElement extends CustomVideoElement { | ||
/** | ||
@@ -22,7 +26,2 @@ * The current instance of the HLS.js library. | ||
/** | ||
* Loads the HLS.js instance and attach it to the video element. | ||
*/ | ||
load(): Promise<void>; | ||
/** | ||
* Unloads the HLS.js instance and detaches it from the video element. | ||
@@ -29,0 +28,0 @@ */ |
@@ -95,5 +95,10 @@ import { CustomVideoElement } from 'custom-media-element'; | ||
const videoTrack = this.addVideoTrack('main'); | ||
videoTrack.selected = true; | ||
let videoTrack = this.videoTracks.getTrackById('main'); | ||
if (!videoTrack) { | ||
videoTrack = this.addVideoTrack('main'); | ||
videoTrack.id = 'main'; | ||
videoTrack.selected = true; | ||
} | ||
for (const [id, level] of data.levels.entries()) { | ||
@@ -100,0 +105,0 @@ const videoRendition = videoTrack.addRendition( |
{ | ||
"name": "hls-video-element", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Custom element (web component) for playing video using the HTTP Live Streaming (HLS) format. Uses HLS.js.", | ||
@@ -13,4 +13,4 @@ "type": "module", | ||
"lint": "npx eslint *.js -c ./node_modules/wet-run/.eslintrc.json", | ||
"test": "wet run --coverage", | ||
"dev": "wet serve" | ||
"test": "wet test --coverage", | ||
"dev": "wet serve --cors --livereload" | ||
}, | ||
@@ -30,3 +30,3 @@ "repository": "muxinc/hls-video-element", | ||
"devDependencies": { | ||
"wet-run": "^0.9.2" | ||
"wet-run": "^1.0.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13033
212