mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-14 15:56:38 +03:00
27ed71e791
Closes #10042 Adds a `textDisplayer.suspendRenderingWhenHidden` config flag that gates the IntersectionObserver-based render suspension introduced in #9545. - Defaults to `true` (existing behavior preserved for browsers/desktop). - Defaults to `false` on TV devices (detected via `shaka.device.DeviceFactory.getDevice().getDeviceType() === DeviceType.TV`). Some TV browsers (e.g. older Tizen WebKit) misreport `IntersectionObserver` visibility for transformed/absolute-positioned player containers, leading to permanently suspended caption rendering. Disabling suspension on TVs sidesteps the platform bug at the cost of running one DOM update per `captionsUpdatePeriod` (default 0.25s) while the player is off-screen. Externs updated at `externs/shaka/player.js`. When the flag is `false`, `applyVisibility_` short-circuits to "always visible" so the IO observer can never suspend rendering. --------- Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>