dash.js

Open Source Media Player

Seamless and reliable DASH streaming on any browser-based device

View onGitHub
5497
1729

Sponsors

Trusted by the industry leaders

Latest updates from GitHub

Stylize subtitles, add them to your blockI tried a bunch of listeners, but nothing worked. ``` this.dsh.on(dashjs.MediaPlayer.events.TRACK_CHANGE_RENDERED, (e) => { }); ``` How is it possible to create your own html block and translate subtitles into it?Opened by Zuldek19948223 days ago
Subtitle rendering intermittently stopping during playback on Smart TVsHello , We are facing an occasional issue where subtitles stop displaying while video playback is still running normally. The behavior appears to be random and so far has been difficult to reproduce. What we know so far: - The issue has been reported on Smart TV devices - We currently don’t have any logs that capture the moment when it happens - The reports are based mainly on end-user feedback - Subtitles only reappear after a user interaction, such as seeking in the content We wanted to check whether this is something you have already encountered, and if you might have any ideas or hypotheses about what could cause this kind of behavior. Any insight would be greatly appreciated.Opened by testeur-99022 days ago
Reduce memory allocations in hot paths for Smart TV optimization## Description Several hot code paths in dash.js use `Object.keys()` patterns that create unnecessary array allocations during playback. On resource-constrained devices like Smart TVs, these allocations contribute to garbage collection pressure, potentially causing playback stutters. ## Affected Areas | File | Function | Frequency | Issue | |------|----------|-----------|-------| | `AbrController.js` | `_onVideoElementResized` | Every video resize | Nested `Object.keys().forEach()` | | `EventController.js` | `_iterateAndTriggerCallback` | Every 100ms | `Object.keys()` in nested loops | | `EventController.js` | `_removeOutdatedEventObjects` | Every 100ms | `Object.keys().length === 0` check | | `HTTPLoader.js` | `_addPathwayCloningParameters` | Every HTTP request | `Object.keys().map()` | ## Proposed Solution Replace `Object.keys()` patterns with `for..in` loops which iterate directly without creating intermediate arrays. ## Expected Impact - Reduces ~30-50 array allocations per second during playback - Lower GC pressure on memory-constrained devices - More fluid playback on Smart TVs and embedded devices ## Related PR #4937Opened by PascalThuet22 days ago

More news on

Contributors