Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

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.errorDialog
        m.errorDialog.message = "Unable to open video"
        m.errorDialog.visible = true
    end if
  end sub
0 Kudos