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

In video.js, when the source content type is "audio/mp3", the subtitle of the track is not updated. #7910

Closed
iranika opened this issue Sep 2, 2022 · 6 comments · Fixed by #7918
Labels

Comments

@iranika
Copy link

iranika commented Sep 2, 2022

Description

I am trying to add subtitles to audio.
In video.js, when the source content type is "audio/mp3", the subtitle of the track is not updated.

We have prepared a Demo page.

Demo page.
https://iranika.github.io/videojs-debug/

Souce Code.
https://github.com/iranika/videojs-debug

What is interesting is that when you change the caption or operate the fullscrean, the subtitle will be displayed.
However, the subtitle is not updated.
In Chrome. ( Firefox is not occurred.)
It's not detecting the cuechange Event, i think well...

Is this a bug?

Reduced test case

https://github.com/iranika/videojs-debug

Steps to reproduce

Demo page.
https://iranika.github.io/videojs-debug/

Souce Code.
https://github.com/iranika/videojs-debug

Errors

No response

What version of Video.js are you using?

latest 7.10.2

Video.js plugins used.

No response

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

Chrome 105.0.5195.53

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

Windows11

@iranika iranika added bug needs: triage This issue needs to be reviewed labels Sep 2, 2022
@welcome
Copy link

welcome bot commented Sep 2, 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.

@locpd
Copy link

locpd commented Sep 8, 2022

After updating from 7.9.7 to 7.20.2, I also experience this problem of subtitle not updating on Samsung TV (Tizen OS). When I switched subtitle for a video with multiple subtitles, the current cue would show (if there was an active one) and it just stayed there forever, switching to another subtitle and the same thing happened. I think it has something to do with the 'cuechange' event.

My content is H264 video with AAC LC 6 channel audio, so I don't think the content type matters.

@mister-ben
Copy link
Contributor

It's to do with using requestVideoFrameCallback and requestAnaimationFrame for more precise and reliable cues than can be achieved timeupdate. Although we don't use requestVideoFrameCallback with audio elements, an audio-only source in a video element as in the example won't trigger any frame updates.

The video on Samsung doesn't really make sense, but TVs do do strange things. I think we'll just have to use timeupdate for cues as well to cover all the edge cases.

gkatsev pushed a commit that referenced this issue Sep 9, 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).
@iranika
Copy link
Author

iranika commented Sep 11, 2022

Problem solved :)
Good job, and thanks!

@locpd
Copy link

locpd commented Sep 11, 2022

I can confirm subtitle now works again on Samsung TV, and Sony TV too.

@yassinox1234
Copy link

Hello
Does anyone have a good iptv player app for samsung tv that can play subtitles too, all apps i've tried on my samsung don't play subtitles at all

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).
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 29, 2022
@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

Successfully merging a pull request may close this issue.

5 participants