dash.js
Open Source Media Player
Seamless and reliable DASH streaming on any browser-based device
View onGitHub
5501
1729
475.8k
Sponsors
Trusted by the industry leaders
Latest updates from GitHub
[DASH] MEDIA_ERR_DECODE when manifest transitions from dynamic to static (live-to-VOD)Description:
When a DASH manifest transitions from type="dynamic" (live) to type="static" (VOD),
VHS detects excessive audio segment downloading and blacklists all available playlists,
resulting in a fatal MEDIA_ERR_DECODE with no recovery path.
Steps to Reproduce:
Load a DASH stream with type="dynamic" (live stream)
Wait for the manifest to transition to type="static" (VOD/live-to-VOD)
Audio segments are repeatedly re-downloaded
Player throws fatal error
Expected Behavior:
Automatically re-parse manifest as VOD
Resume playback without fatal error
Actual Behavior
Excessive audio segment downloading detected.
Switching to playlist 0-placeholder-uri-0.
Playback cannot continue. No available working or supported playlists.
MediaError { code: 3, message: 'Playback cannot continue...' }
Opened by rakeshLogituit—21 hours ago
UI tweaks in a leftside Options panel to compact textsNew Nightly(AI-generated) UI tweaks in a leftside Options panel
https://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Left side panel of `Playback` has few options to wrap two lines, it creates a scrollbar but its just one option row hidden(atm) so not the best UI experience.
Options have a tooltip to give the extensive help text. Use compact texts such as this:
`Reuse Existing SourceBuffers` -> `Reuse Existing Buffers` or `Reuse Existing SBs`
`Calc Seg Avail From Timeline` -> `Calc Avail From Timeline`
`MediaSource Inf Duration` -> `Use Infinity Duration`
`Reset SB on Incompat Track` -> `Reset SB if Incompatible`
Opened by Murmur—3 days ago
Reduce bundle size: replace ua-parser-js dependency (-26 KB / -2.6%)**Description**
`ua-parser-js` adds **25.8 KB** to the minified modern bundle (`dash.all.min.js`). The package is a full-featured User-Agent parser that detects browser, OS, device, CPU, and rendering engine.
dash.js uses it in **one utility method** (`Utils.parseUserAgent()`), called from **2 locations**, both of which only read `ua.browser.name`:
| File | Line | Usage |
|------|------|-------|
| `CatchupController.js` | 125 | `ua.browser.name === 'safari'` — Safari detection for live catchup behavior |
| `ProtectionController.js` | 1491 | `ua.browser.name === 'edge'` — Edge detection for a PlayReady DRM workaround |
None of the other `ua-parser-js` capabilities (OS, device, CPU, engine detection) are used anywhere in dash.js source code. The `parseUserAgent` method is not part of the public API.
**Solution**
Replace the `ua-parser-js` import with a lightweight regex-based browser detection directly in `Utils.parseUserAgent()`. The two consumers only need Safari and Edge detection, which can be done with simple regex tests on `navigator.userAgent`.
The return type (`{ browser: { name: string } }`) stays identical so the two call sites don't need to change.
Measured on `development` branch (v5.2.0), modern prod build:
| | Current | After removal | Diff |
|---|---------|---------------|------|
| `dash.all.min.js` | 983,658 B | 957,803 B | **-25,855 B (-2.6%)** |
| `dash.all.debug.js` | 3,503,300 B | 3,431,577 B | **-71,723 B (-2.0%)** |
**Alternatives**
- **Keep `ua-parser-js` as-is**: no risk, but 25.8 KB of unused parsing capability stays in the bundle.
- **Lazy-load `ua-parser-js`**: possible, but adds complexity for a dependency that can be trivially replaced. `CatchupController` calls `parseUserAgent()` at initialization, so lazy-loading would complicate startup.
- **Use `navigator.userAgentData` (UA-CH API)**: modern API but not available on Smart TVs or older browsers. Would still need a regex fallback.Opened by PascalThuet—6 days ago






