Hello,
I am unable to load another content once I load a content that fails on Roku. It seems that once an error occurs, the player consistently errors out on any subsequent loads of content. I have tried to unload the content before attempting to load another one, but it made no difference.
I noticed the same issue was resolved on the ios implementation, and need the same thing implemented on the Roku sdk:
sub onVideoError(event as object)
playerError = event.getData()
?lt(m.top.id);" ===onVideoError: playerError= ";playerError
if (m.top.is4kAttempt)
m.bitmovinplayer.callFunc(m.BitmovinFunctions.UNLOAD)
else
' push out the error to messaging
?lt(m.top.id);" ===onVideoError - sending command 'showGenericVideoErrorScreen' "
m.top.control = "close"
m.global.videoPlayControl = {cmd: "showGenericVideoErrorScreen", msg: "Video Error"}
end if
end sub
sub onBitmovinSourceUnloaded(event as Object)
if (m.tries < m.MAXTRIES)
attemptTryOn4kPlaybackBySource(m.currPriority, false)
else
m.currPriority = m.currPriority + 1
if (m.currPriority <= m.maxPriority)
m.tries = 0
attemptTryOn4kPlaybackBySource(m.currPriority, false)
else
m.top.is4kAttempt = false
attemptPlayback(m.videoInfo, false)
end if
end if
end sub
m.bitmovinPlayer.callFunc("setup", m.playerConfig)
m.top.appendChild(m.bitmovinPlayer)
m.bitmovinPlayer.visible = false
m.BitmovinPlayerState = m.bitmovinPlayer.BitmovinPlayerState
m.bitmovinPlayer.ObserveField(m.BitmovinFields.PLAYER_STATE, "onPlayerState")
m.bitmovinPlayer.ObserveField(m.BitmovinFields.ERROR, "onVideoError")
m.bitmovinPlayer.ObserveField(m.BitmovinFields.SEEK, "onSeek")
m.bitmovinPlayer.ObserveField(m.BitmovinFields.SEEKED, "onSeeked")
m.bitmovinPlayer.ObserveField(m.BitmovinFields.TIME_CHANGED, "onPlayTimeChanged")
m.bitmovinPlayer.ObserveField(m.BitmovinFields.AD_BREAK_STARTED, "onBitmovinAdBreakStarted")
m.bitmovinPlayer.ObserveField(m.BitmovinFields.AD_BREAK_FINISHED, "onBitmovinAdBreakComplete")
m.bitmovinPlayer.ObserveField(m.BitmovinFields.AD_SKIPPED, "onBackDuringAd")
m.bitmovinPlayer.ObserveField(m.BitmovinFields.SOURCE_UNLOADED, "onBitmovinSourceUnloaded")
I realize there is a large amount of detail missing, however, at the root of the issue is the above code, where once an error occurs on attempting to play a stream (“network error: 1000”), loading of any other stream results in the same error.
When I attempt to load a stream that works on the first attempt, it plays.
Kind regards,
Mike