From 96d299fb2c32616a71b20c3abefb54c8b94a4c24 Mon Sep 17 00:00:00 2001 From: Karan Lyons Date: Fri, 5 Apr 2019 00:46:38 -0700 Subject: [PATCH] Restore hls.media prop and correct type. I erroneously removed this property in my last PR, but it's been brought to my attention by another dev. `media` is unset at construction, but is set to an `HTMLMediaElement` when passed via `attachMedia` and cleared to `null` when `detachMedia` is called. The docs appear to imply that this property is meant to be readonly, and that altering it is to be done with the above referenced methods. --- types/hls.js/index.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/types/hls.js/index.d.ts b/types/hls.js/index.d.ts index a2b6486668..8690b10482 100644 --- a/types/hls.js/index.d.ts +++ b/types/hls.js/index.d.ts @@ -1666,6 +1666,16 @@ declare class Hls { * default valus is hls.firstLevel */ startLevel: number; + /** + * (default: true) + * if set to true, start level playlist and first fragments will be loaded automatically, after triggering of Hls.Events.MANIFEST_PARSED event + * if set to false, an explicit API call (hls.startLoad(startPosition=-1)) will be needed to start quality level/fragment loading. + */ + autoStartLoad: boolean; + /** + * get: Return the bound videoElement from the hls instance + */ + readonly media?: HTMLVideoElement | null; /** * hls.js config */