From 985908138ecfa15a9865ecd0a38c8d58c443faea Mon Sep 17 00:00:00 2001 From: 1hitsong <3330318+1hitsong@users.noreply.github.com> Date: Fri, 12 Jan 2024 16:24:41 -0500 Subject: [PATCH] Ensure caption mode is on when needed --- components/video/VideoPlayerView.bs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/video/VideoPlayerView.bs b/components/video/VideoPlayerView.bs index c2a89306..87b0fdac 100644 --- a/components/video/VideoPlayerView.bs +++ b/components/video/VideoPlayerView.bs @@ -338,7 +338,7 @@ sub onVideoContentLoaded() ' Allow default subtitles m.top.unobserveField("selectedSubtitle") - ' Set subtitleTrack property is subs are natively supported by Roku + ' Set subtitleTrack property if subs are natively supported by Roku selectedSubtitle = invalid for each subtitle in m.top.fullSubtitleData if subtitle.Index = videoContent[0].selectedSubtitle @@ -350,7 +350,10 @@ sub onVideoContentLoaded() if isValid(selectedSubtitle) availableSubtitleTrackIndex = availSubtitleTrackIdx(selectedSubtitle.Track.TrackName) if availableSubtitleTrackIndex <> -1 - m.top.subtitleTrack = m.top.availableSubtitleTracks[availableSubtitleTrackIndex].TrackName + if not selectedSubtitle.IsEncoded + m.top.globalCaptionMode = "On" + m.top.subtitleTrack = m.top.availableSubtitleTracks[availableSubtitleTrackIndex].TrackName + end if end if end if