
Browser support
HLS
| Browser | Implementation | Status |
|---|---|---|
| Chrome / Edge | hls.js 1.7.2 (embedded locally) | Works |
| Firefox | hls.js 1.7.2 | Works |
| Desktop macOS Safari | hls.js 1.7.2 (to match Chrome/Firefox: ‘Full Quality’ menu, advanced subtitle formatting) | 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 | Implementation | Status |
|---|---|---|
| Chrome / Edge | dash.js 5.2.1 (modern UMD) | Works |
| Firefox | dash.js 5.2.1 | Works |
| Safari | dash.js 5.2.1 | 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.7.2 (release build) |
The ‘Vendored’ file refers to the published version 1.7.2, 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.7.2/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 located at Resources/Public/JavaScript/vidply/)
The renderer decides for itself 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.jsfor full feature parity – 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 visible subtitle UI, ensuring 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 segments are loaded for long or live streams. The same event is triggered by the native iOS path during cuechange.
Live Stream User Interface
In the case of liveStream: 'auto' (the default in the bundled player), VidPly detects HLS live playlists and adapts the control bar:
- ‘LIVE’ badge instead of the total duration
- ‘Restart’ and ‘Playback speed’ are hidden
- ‘Skip forward’ and ‘Go live’ are only available if the viewer is more than a few seconds behind the live feed
- VOD HLS sources (finite playlists) retain the standard seek controls – detection is based on the
liverather than the temporaryInfinityduration on start-up
Import live TV streams as video media records so that the HLS renderer is used even if the URL also matches the audio domain’s allowlists.
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.1 (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.1/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 provided 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 does not, by default,cdn.jsdelivr.netscripts by default.
Why these instructions are necessary:
media-src 'blob:'—hls.js/dash.jsSet ablob:URL<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 prioritises 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 continue to 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 they are 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 – Standalone VidPly embeds can load specified versions from jsDelivr;
mpc-vidplyhls.js 1.7.2 and dash.js 5.2.1 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