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

Fix forced subs #104

Merged
merged 5 commits into from
Dec 27, 2024
Merged

Fix forced subs #104

merged 5 commits into from
Dec 27, 2024

Conversation

jimdogx
Copy link

@jimdogx jimdogx commented Dec 17, 2024

Fix forced subs not showing up automatically.

Changes

Forces subtitles on if the subtitles are "Forced". Remembers global Roku subtitle settings so they can be returned when the video is done playing.

Issues

Subtitles will not be returned to their original settings if the user hits "Home" from the playing video.

@1hitsong
Copy link
Owner

1hitsong commented Dec 19, 2024

Is this confirmed as an issue in viv?

I think a better spot for the change would be in defaultSubtitleTrack in components\ItemGrid\LoadVideoContentTask.bs

If subtitles aren't getting auto turned on for forced subtitles, that sounds more like a bug somewhere in the logic than a need to add additional check for isforced all the way up in the video player view.

@jimdogx
Copy link
Author

jimdogx commented Dec 20, 2024

Is this confirmed as an issue in viv?

100% reproducible. I have "only forced" and watching a show with "Forced" subtitles still requires me to manually turn on subtitles (and rewind the show to re-watch what I couldn't understand) 😄

I think a better spot for the change would be in defaultSubtitleTrack in components\ItemGrid\LoadVideoContentTask.bs

If subtitles aren't getting auto turned on for forced subtitles, that sounds more like a bug somewhere in the logic than a need to add additional check for isforced all the way up in the video player view.

DefaultSubtitleTrack is doing its job already:

           else if subtitleMode = "onlyforced" and item.IsForced
                ' Return first forced subtitle track
                return item.Index

The correct subtitle track is returned. The problem is, you have to actually turn "on" subtitles on the Roku for anything to show up:

"Therefore setting the global setting every time you adjust a local setting is required."

Source: https://developer.roku.com/docs/developer-program/media-playback/closed-caption.md

Viv already does this for "not encoded" subtitles, but it wasn't doing it for "forced" subtitles. So I only modified the section that was already doing this 😄

Copy link
Owner

@1hitsong 1hitsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subtitles will not be returned to their original settings if the user hits "Home" from the playing video.

That's fine.

components/video/VideoPlayerView.bs Outdated Show resolved Hide resolved
components/video/VideoPlayerView.bs Outdated Show resolved Hide resolved
@jimdogx jimdogx requested a review from 1hitsong December 27, 2024 14:11
Copy link
Owner

@1hitsong 1hitsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works perfectly!

@1hitsong 1hitsong merged commit 8ae04a8 into 1hitsong:master Dec 27, 2024
@jimdogx jimdogx deleted the viv-fix-forced-subs branch December 27, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants