
Browser support
HLS
| Browser | Implementation | Status |
|---|---|---|
| Chrome / Edge | hls.js 1.6.16 (embedded locally) | Works |
| Firefox | hls.js 1.6.16 | Works |
| Desktop macOS Safari | hls.js 1.6.16 (to match Chrome/Firefox: ‘Full Quality’ menu, advanced styling options for subtitles) | Works |
| iOS / iPadOS Safari | Native HLS (<video> MSE is not available on iOS) – VidPly integrates native TextTrack API into the user interface for subtitles, transcripts and quality | Works |
DASH
| Browser | implementation | Status |
|---|---|---|
| Chrome / Edge | dash.js 5.2.0 (modern UMD) | Works |
| Firefox | dash.js 5.2.0 | Works |
| Safari | dash.js 5.2.0 | Works |
Technical facilities
HLS
1. hls.js library
Loaded locally from mpc-vidply via Resources/Private/Partials/VidPly/Assets.html if a .m3u8 source from the VidPlyProcessor:
| vendored file | Resources/Public/JavaScript/hls.min.js |
| Specified version | hls.js 1.6.16 (release build) |
The ‘Vendored’ file refers to the published version 1.6.16, not a local
mastercheckout of a branch of hls.js. When upgrading, copy the release artefact (npm / GitHub tag) intoResources/Public/JavaScript/hls.min.js.
VidPly’s CDN fallback (only used if hls.js is not already present on the page, e.g. for standalone embeds):
cdn.jsdelivr.net/npm/hls.js@1.6.16/dist/hls.min.js
2. VidPly HLS Renderer
File: .libs/vidply/src/renderers/HLSRenderer.ts (Source code of the standalone player; the delivered build is available at Resources/Public/JavaScript/vidply/)
The renderer decides automatically whether to hls.js or the browser’s native HLS support should be used:
- On iOS / iPadOS (
/iPad|iPhone|iPod/UA or iPad in desktop mode:MacIntel+maxTouchPoints > 1) MSE is not available, so the renderer uses the native<video>HLS playback viaHTML5Renderer. - On all other platforms (Chrome, Firefox, Edge and desktop Safari on macOS),
hls.jsthe Native HLS bridge is used to ensure full feature parity – including the quality menu, advanced subtitle styling and a consistent user experience across all browsers.
Native HLS bridge for iOS / iPadOS
If the native approach is chosen, the renderer adds listeners to HTMLMediaElement.textTracks so that VidPly’s subtitle menu, interactive transcript and quality menu continue to function:
this.media.textTracks.addEventListener('addtrack', checkTracks);
this.media.textTracks.addEventListener('removetrack', checkTracks);
this.media.addEventListener('loadedmetadata', checkTracks);
Each addtrack burst (one per subtitle variant in the manifest) is debounced (~150 ms) before VidPly recalculates the user interface for visible subtitles, ensuring that the menu is rendered in a single pass, even for multilingual streams.
Updates to live transcripts and subtitles
The renderer monitors Hls.Events.SUBTITLE_FRAG_PROCESSED and emits a generic textcuesupdate event, ensuring that the interactive transcript and live subtitles remain synchronised whilst new subtitle fragments are loaded for long-form or live streams. The same event is triggered by the native iOS path for cuechange.
DASH
1. ‘dash.js’ library
Loaded locally from mpc-vidply via Resources/Private/Partials/VidPly/Assets.html , when a .mpd source is detected:
| Vendored file | Resources/Public/JavaScript/dash.all.min.js |
| Specified version | dash.js 5.2.0 (modern UMD build) |
VidPly’s CDN fallback (only used if ‘dash.js’ is not already present on the page):
cdn.jsdelivr.net/npm/dashjs@5.2.0/dist/modern/umd/dash.all.min.js
2. VidPly DASH renderer
File: .libs/vidply/src/renderers/DASHRenderer.ts (Source code of the standalone player; the delivered build is described under Resources/Public/JavaScript/vidply/)
Features:
- Adaptive bitrate streaming with automatic quality switching
- TTML/STPP subtitles (rendered natively by dash.js)
- WebVTT subtitles (processed by the VidPly subtitle system + interactive transcript)
- Integration of the user interface for quality selection
- Robust teardown (
dash.reset()thendash.destroy()), toSourceBuffererrors during stream switching - Speed control for DASH streams hidden by default (
hideSpeedForDash: true)
Content Security Policy
File: Configuration/ContentSecurityPolicies.php
Required CSP directives (common to both HLS and DASH):
'media-src' => ['blob:', 'data:', 'https:'],
'worker-src' => ['blob:'],
'connect-src' => ['blob:', 'data:', 'https:'],
'script-src-elem' => ["'self'"],
Note:
mpc-vidplyhls.js and dash.js are served locally (Resources/Public/JavaScript/). The jsDelivr URLs mentioned elsewhere in this file serve solely as a fallback for standalone VidPly embeds – they are not required when using the TYPO3 extension with the supplied scripts. Since version 1.2.6, the extension has added CSPcdn.jsdelivr.netwhitelists scripts by default.
Why these directives are required:
media-src 'blob:'—hls.js/dash.jsIf you set ablob:URL during<video>.srcplayback.media-src 'data:'— Some HLS variants embed init segments / WebVTT inline asdata:URIs.worker-src 'blob:'—hls.js/dash.jsExtractblob:URLs for demuxing.connect-src 'https:'— Retrieving segments and manifests from any CDNs.script-src-elem 'self'— As a vendor libraryhls.min.js/dash.all.min.jsfrom the extension.script-src-elem 'https://cdn.jsdelivr.net'— Only required if you are using VidPly’s CDN fallback instead of the embedded files.
Usage
Backend
HLS and DASH are not standalone media types. Instead, streaming sources are added as files within the ‘Video’ or ‘Audio’ media type.
Adding HLS/DASH to a video record:
- Create a VidPly media record of the “Video” type
- Add an
.m3u8(HLS) or.mpd(DASH) file as a media source - Optionally add progressive fallbacks (MP4, WebM) – the player prefers DASH → HLS → progressive
- Optionally, add local VTT files to override embedded subtitles
- Add a poster image (supported formats:
png,jpg,jpeg,webp,svg) - Save
Add HLS/DASH to an audio entry:
- Create a VidPly media record of type ‘Audio’
- Add an
.m3u8(HLS) or.mpd(DASH) file as a media source - Optionally, add progressive fallbacks (MP3, OGG)
- Save
Frontend
- Automatically detects the stream type based on the MIME type or the URL extension (
.m3u8for HLS.mpdfor DASH) - Source priority: DASH → HLS → progressive fallback
- iOS / iPadOS use native HLS, but still display subtitles, transcripts and quality via the VidPly user interface; all other browsers use
hls.js. All browsers usedash.jsfor DASH. - Embedded subtitles from HLS/DASH manifests are used by default; local VTT files serve as optional overrides
- Quality switching available (provided the stream offers multiple levels)
- A centred buffer indicator is automatically displayed whilst the stream is buffering
Test
ddev typo3 cache:flush
HLS test URLs:
- Apple demo:
devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8 - Akamai demo:
cph-p2p-msl.akamaized.net/hls/live/2000341/test/master.m3u8
DASH test URLs:
Troubleshooting
Stream won’t play:
- Check that the URL is publicly accessible
- Check the CORS headers on the stream server (including
Access-Control-Allow-OriginforRangerequests) - Check the CSP configuration (including
blob:,data:,worker-src 'blob:') - Check for JavaScript console errors
No ‘Quality’ button:
- Check whether the stream offers multiple quality levels
- Check whether
hls.min.js/dash.all.min.jsit loads correctly (the ‘Network’ tab) - On iOS: Quality options are only displayed if the manifest specifies them via native
TextTrack– VidPly detects them automatically viaaddtrack
Subtitles/transcripts are not displayed with iOS HLS:
- Check whether the manifest
#EXT-X-MEDIA:TYPE=SUBTITLEScontains variants - Subtitles appear shortly after
loadedmetadata(with a delay of approx. 150 ms) – give the player a moment after pressing the play button
CSP error:
- Check whether
ContentSecurityPolicies.phpwhether present and registered - Clear all caches
- Check
blob:anddata:are for bothmedia-srcandconnect-src
Performance
- Adaptive bitrate – Automatically adjusts the quality (HLS and DASH)
- Buffering optimisation – Seamless playback
- CDN delivery – Stand-alone VidPly embeds can load specified versions from jsDelivr;
mpc-vidplyhls.js 1.6.16 and dash.js 5.2.0 are served locally - Minimal overhead –
hls.js/dash.jsis only loaded if a.m3u8/.mpdsource is actually being used - Conditional loading —
hls.jsanddash.jsare loaded independently of one another, based on theVidPlyProcessor - Native HLS on iOS – Avoids the overhead of running
hls.json devices where it cannot run anyway, whilst retaining the full VidPly user interface via the nativeTextTrackbridge