diff --git a/api-extractor/report/hls.js.api.md b/api-extractor/report/hls.js.api.md index b54101eff27..818e11d0f31 100644 --- a/api-extractor/report/hls.js.api.md +++ b/api-extractor/report/hls.js.api.md @@ -1592,6 +1592,8 @@ class Hls implements HlsEventEmitter { // Warning: (ae-setter-with-docs) The doc comment for the property "firstLevel" must appear on the getter, not the setter. set firstLevel(newLevel: number); get forceStartLoad(): boolean; + static getMediaSource(): typeof MediaSource | undefined; + static isMSESupported(): boolean; static isSupported(): boolean; get latency(): number; // (undocumented) diff --git a/docs/API.md b/docs/API.md index ef8fc0d64fb..56ea1780170 100644 --- a/docs/API.md +++ b/docs/API.md @@ -190,17 +190,28 @@ First include `https://cdn.jsdelivr.net/npm/hls.js@1` (or `/hls.js` for unminifi ``` -Invoke the following static method: `Hls.isSupported()` to check whether your browser is supporting [MediaSource Extensions](http://w3c.github.io/media-source/). +Invoke the following static method: `Hls.isSupported()` to check whether your browser supports [MediaSource Extensions](http://w3c.github.io/media-source/) with any baseline codecs. ```html ``` +If you want to test for MSE support without testing for baseline codecs, use `isMSESupported`: + +```js +if ( + Hls.isMSESupported() && + Hls.getMediaSource().isTypeSupported('video/mp4;codecs="av01.0.01M.08"') +) { + console.log('Hello AV1 playback! AVC who?'); +} +``` + ### Second step: instantiate Hls object and bind it to `