Interface: HlsSource
Defined in: ../node_modules/.pnpm/@videojs+hlsjs-video@10.0.1/node_modules/@videojs/hlsjs-video/dist/dev/adapter.d.ts:44
Structured HLS source: which source to play, plus how to play it.
Playback options are namespaced by engine. There are two paths here — hls.js and the browser's own HLS support — and only one of them runs, so a source describes both without either engine reading the other's options.
preferPlayback and the engine options are all read when the engine is constructed, so changing any of them recreates it.
Properties
capRenditionToPlayerSize?
optionalcapRenditionToPlayerSize?:boolean
Defined in: ../node_modules/.pnpm/@videojs+hlsjs-video@10.0.1/node_modules/@videojs/hlsjs-video/dist/dev/adapter.d.ts:96
Whether the element's rendered size caps automatic selection. Defaults to true.
A 400px-wide player has no use for a 4K rendition, so selection is held to the smallest rendition that still covers the element, measured in device pixels — a 2 device pixel ratio asks for twice what a CSS measurement would. The cap follows the element as it resizes, and minAutoResolution bounds how far down it can go. Set it to false for a player whose layout size understates what it needs, such as one that goes fullscreen without a resize.
Which rendition covers the element is hls.js's own judgement, weighed on the largest dimension rather than pixel area, so it can land elsewhere than maxAutoResolution would for the same ladder.
Applied live — changing it never rebuilds the playback engine. Requires the hls.js (MSE) engine; native HLS playback ignores it. Setting hls.js's own capLevelToPlayerSize through source.engine.hlsJs is a different thing: it stops the loop every cap here is evaluated on, and takes a rebuild.
drm?
optionaldrm?:Partial<Record<KeySystem,DrmSystemConfig>>
Defined in: ../node_modules/.pnpm/@videojs+hlsjs-video@10.0.1/node_modules/@videojs/hlsjs-video/dist/dev/adapter.d.ts:66
License servers for protected content, keyed by EME key system id.
Engine neutral, because which engine plays is decided later: hls.js is handed every system named here (with EME switched on), and native playback negotiates the com.apple.fps entry itself. Name every system you hold a license server for — which one is used is the browser's choice.
engine?
optionalengine?:HlsEngineConfig
Defined in: ../node_modules/.pnpm/@videojs+hlsjs-video@10.0.1/node_modules/@videojs/hlsjs-video/dist/dev/adapter.d.ts:116
Playback options, keyed by the engine that reads them. Only one of the two engines below ends up playing, and each reads only its own key.
maxAutoResolution?
optionalmaxAutoResolution?:MediaResolution
Defined in: ../node_modules/.pnpm/@videojs+hlsjs-video@10.0.1/node_modules/@videojs/hlsjs-video/dist/dev/adapter.d.ts:80
Highest resolution adaptive bitrate selection may choose on its own.
A ceiling on automatic selection, not a filter on what is available: renditions above it stay in videoRenditions and can still be selected by hand. Matching is by pixel area, so a '720p' cap admits any rendition at or below 1280×720 worth of pixels. When every rendition sits above the cap, the smallest one is used.
Applied live — changing it never rebuilds the playback engine. Requires the hls.js (MSE) engine; native HLS playback ignores it.
For Mux sources this is distinct from playback.maxResolution, which asks Mux to leave higher renditions out of the manifest altogether.
minAutoResolution?
optionalminAutoResolution?:MediaResolution
Defined in: ../node_modules/.pnpm/@videojs+hlsjs-video@10.0.1/node_modules/@videojs/hlsjs-video/dist/dev/adapter.d.ts:111
Lowest resolution capRenditionToPlayerSize may cap down to. Defaults to '720p'.
Not a quality floor. It bounds the size-derived cap and nothing else: when bandwidth is poor, adaptive selection still drops below it, because the cap is a ceiling and selection stays free underneath. Nor does it raise an explicit maxAutoResolution — asking for at most '360p' alongside a '720p' floor yields '360p'.
The default exists because the low rungs of a ladder are there for poor network conditions, and capping a small player to them looks worse than its size suggests. Name a lower rung to weaken the floor, or '270p' to lift it for any real ladder.
Applied live — changing it never rebuilds the playback engine. Requires the hls.js (MSE) engine; native HLS playback ignores it.
preferPlayback?
optionalpreferPlayback?:PlaybackType
Defined in: ../node_modules/.pnpm/@videojs+hlsjs-video@10.0.1/node_modules/@videojs/hlsjs-video/dist/dev/adapter.d.ts:58
Preferred playback path: 'mse' for hls.js, 'native' for the browser's own HLS support. Ignored when the preferred path cannot play the source.
src?
optionalsrc?:string
Defined in: ../node_modules/.pnpm/@videojs+hlsjs-video@10.0.1/node_modules/@videojs/hlsjs-video/dist/dev/adapter.d.ts:46
Manifest URL. Mirrors the host's src property.
type?
optionaltype?:SourceType
Defined in: ../node_modules/.pnpm/@videojs+hlsjs-video@10.0.1/node_modules/@videojs/hlsjs-video/dist/dev/adapter.d.ts:53
MIME type of the source. Takes precedence over inference from src.
Matched case-insensitively, and the legacy HLS spellings (application/x-mpegURL, audio/mpegurl, …) count as application/vnd.apple.mpegurl. Anything unrecognized is treated as a URL the browser plays on its own.