Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kidasov
Channel Surfer

Video state is changing very slowly if there is no internet connection

Hello everyone! I have an application with a lot of videos. There is a case when I for example lose internet connection. And when I start playing the video I can see that the video player state can change after several minutes (sometimes it takes 5-7 minutes). How I can improve user experience because official documentation doesn't mention anything to help. Any help will be highly appreciated!

sub onVideoPlayerStateChange()
    if m.videoPlayer.state = "finished"
        'hide vide player if video is finished
        m.videoPlayer.visible = false
    else if  m.videoPlayer.state = "playing"
    else if m.videoPlayer.state = "error"
        ' I can get there after 5-7 minutes which is unbearable for me)
        m.top.dialog = m.errorDialog
        m.errorDialog.message = "Unable to open video"
        m.errorDialog.visible = true
        m.errorDialog.setFocus(true)
    end if
  end sub
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.