Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cuechange event not firing on chromium browsers when minimized #7902

Closed
Brad-Goodlett opened this issue Aug 30, 2022 · 1 comment
Closed
Labels

Comments

@Brad-Goodlett
Copy link

Brad-Goodlett commented Aug 30, 2022

Description

When using chromium based browsers, the "cuechange" event for a hidden text track is not firing properly when the browser is minimized. This causes the hidden text tracks containing metadata not work properly. The expected behavior when the browser is minimized is that the cuechange events fire at the proper time instead of being skipped.

In my testing, I have been able to reproduce the issue on all versions since 7.19.0. On 7.18.1 and previous version, the "cuechange" event fires properly when the page is minimized and the metadata in the text tracks are being loaded properly. I have been able to reproduce this issue in MS Edge and Chrome (Windows and Mac).

I have confirmed that the video is still playing as expected while the page is minimized, with the exception of the cuechange event not firing. All sound is playing as normal, the playhead is updating properly and when un-minimizing the browser the video is at the expected playback time.

Our player is being defined with very little configuration:
player = videojs(playerElementId, { controls: true, autoplay: false, preload: 'auto', });

Reduced test case

No response

Steps to reproduce

  1. Play a video with a hidden text track which has a cuechange event listener
  2. Minimize the browser while the video is playing
  3. Observe dev tools for calls to the "cuechange" event handler

Errors

No response

What version of Video.js are you using?

7.20.1

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

Chrome 104.0.5112.102 (also 102), Edge 104.0.1293.70

What OS(es) and version(s) does this occur with?

windows, mac

@Brad-Goodlett Brad-Goodlett added bug needs: triage This issue needs to be reviewed labels Aug 30, 2022
@welcome
Copy link

welcome bot commented Aug 30, 2022

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@gkatsev gkatsev closed this as completed in 9b81afe Sep 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2022
misteroneill pushed a commit that referenced this issue Nov 22, 2022
Use the timeupdate event as well as the rvfc and raf callbacks to check cues. This is a bit overkill for "usual" playback but avoids edge cases. If the more preceise callback trigger first the cue will update but the timeupdate event should catch any that were missed, notwithstanding that timeupdate was always somewhat unpredictable.

Fixes #7910 (audio in video els and Samsung being weird) and fixes #7902 (no updates off screen).
@misteroneill misteroneill removed the needs: triage This issue needs to be reviewed label Mar 28, 2023
edirub pushed a commit to edirub/video.js that referenced this issue Jun 8, 2023
Use the timeupdate event as well as the rvfc and raf callbacks to check cues. This is a bit overkill for "usual" playback but avoids edge cases. If the more preceise callback trigger first the cue will update but the timeupdate event should catch any that were missed, notwithstanding that timeupdate was always somewhat unpredictable.

Fixes videojs#7910 (audio in video els and Samsung being weird) and fixes videojs#7902 (no updates off screen).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants