Update WebOsVideo.js#128
Open
cmax24 wants to merge 1 commit intoStremio:masterfrom
Open
Conversation
cmax24
commented
Mar 6, 2026
- Improves webOS compatibility by updating codec handling, event logic, and capability detection.
- Fixes incorrect event handler usage by replacing canplaythrough with the correct oncanplaythrough event.
- Adds enhanced codec capability detection, combining EDID checks and webOS.deviceInfo() to properly enable model‑specific codecs (e.g., DTS, DTS‑HD, DTS:X, AC‑4).
- Introduces codec normalization, mapping inconsistent codec labels (e.g., “DTS‑HD MA”, “TrueHD Atmos”) into unified identifiers so the filtering logic works consistently.
- Implements probe‑and‑fallback logic for audio tracks: when selectTrack fails, the codec is marked as unsupported and the player automatically falls back to a compatible track.
- Adds playback‑speed gating: setPlayRate now applies only to progressive sources (MP4/MKV), avoiding failures on HLS/DASH streams which do not support rate changes reliably.
- Increases robustness of mediaId acquisition with extended retry logic (12 attempts ≈ 3.6s).
- Reduces event noise via buffered‑event throttling (250 ms).
- Adds optional forceEnableCodecs parameter for advanced/edge‑case configurations (e.g., rooted TVs or known‑supported codecs not advertised by EDID).
- Keeps full backward compatibility with previous webOS versions and existing app behavior.
64e6eb5 to
3035ba2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.