diff --git a/components/manager/ViewCreator.bs b/components/manager/ViewCreator.bs index ebee6b3a..214712b4 100644 --- a/components/manager/ViewCreator.bs +++ b/components/manager/ViewCreator.bs @@ -99,6 +99,13 @@ sub processSubtitleSelection() ' The playbackData is now outdated and must be refreshed m.playbackData = invalid + ' Find previously selected subtitle and identify if it was encoded + for each item in m.view.fullSubtitleData + if item.index = m.view.selectedSubtitle + m.view.previousSubtitleWasEncoded = item.IsEncoded + end if + end for + if LCase(m.selectedSubtitle.track.description) = "none" m.view.globalCaptionMode = "Off" m.view.subtitleTrack = "" diff --git a/components/video/VideoPlayerView.bs b/components/video/VideoPlayerView.bs index c2a89306..9bc49fee 100644 --- a/components/video/VideoPlayerView.bs +++ b/components/video/VideoPlayerView.bs @@ -256,8 +256,17 @@ end sub ' Event handler for when selectedSubtitle changes sub onSubtitleChange() - ' If the global caption mode is on, that means Roku can display the subtitles natively and doesn't need a video stop/start - if LCase(m.top.globalCaptionMode) = "on" then return + switchWithoutRefresh = true + + if m.top.SelectedSubtitle <> -1 + ' If the global caption mode is off, then Roku can't display the subtitles natively and needs a video stop/start + if LCase(m.top.globalCaptionMode) <> "on" then switchWithoutRefresh = false + end if + + ' If previous sustitle was encoded, then we need to a video stop/start to change subtitle content + if m.top.previousSubtitleWasEncoded then switchWithoutRefresh = false + + if switchWithoutRefresh then return ' Save the current video position m.global.queueManager.callFunc("setTopStartingPoint", int(m.top.position) * 10000000&) diff --git a/components/video/VideoPlayerView.xml b/components/video/VideoPlayerView.xml index e33724b0..bd35744d 100644 --- a/components/video/VideoPlayerView.xml +++ b/components/video/VideoPlayerView.xml @@ -7,6 +7,7 @@ +