Ensure videoplayer is valid before setting allowCaptions
This commit is contained in:
parent
49608d906f
commit
8ded797668
|
@ -540,9 +540,11 @@ function CreateVideoPlayerGroup(video_id, mediaSourceId = invalid, audio_stream_
|
|||
startMediaLoadingSpinner()
|
||||
' Video is Playing
|
||||
video = VideoPlayer(video_id, mediaSourceId, audio_stream_idx, defaultSubtitleTrackFromVid(video_id), forceTranscoding, showIntro, allowResumeDialog)
|
||||
video.allowCaptions = true
|
||||
|
||||
if video = invalid then return invalid
|
||||
|
||||
video.allowCaptions = true
|
||||
|
||||
if video.errorMsg = "introaborted" then return video
|
||||
video.observeField("selectSubtitlePressed", m.port)
|
||||
video.observeField("selectPlaybackInfoPressed", m.port)
|
||||
|
|
|
@ -332,7 +332,9 @@ function PlayIntroVideo(video_id, audio_stream_idx) as boolean
|
|||
if lcase(introVideos.items[0].name) = "rick roll'd" then return true
|
||||
|
||||
introVideo = VideoPlayer(introVideos.items[0].id, introVideos.items[0].id, audio_stream_idx, defaultSubtitleTrackFromVid(video_id), false, false)
|
||||
introVideo.allowCaptions = false
|
||||
if isValid(introVideo)
|
||||
introVideo.allowCaptions = false
|
||||
end if
|
||||
|
||||
port = CreateObject("roMessagePort")
|
||||
introVideo.observeField("state", port)
|
||||
|
|
Loading…
Reference in New Issue
Block a user