Forum Discussion

bandal's avatar
bandal
Visitor
13 years ago

Need help exiting video in videoplayer to go to home screen

I need help on how to get videoplayer with categories and leafs to go back to the Main Screen of Icons after pressing the Back button or the movie stops playing at the end. I do not want to exit the channel, just go to the Home screen.

DA

5 Replies

  • You need to return a code (you choose what that code is and its meaning)from the ShowVideoScreen and check the value of that code in the showDetailScreen function and depending on the code, return to the home screen. An example:

    in showVideoScreen:

    if msg.isScreenClosed()
    print "Screen closed"
    return -2

    in showDetailScreen:

    code=showVideoScreen(showList[showIndex])
    if code=-2 then
    return -2
    end if


    However it is not standard to return to the top, instead you should return to your springboard screen.

    - Joel
  • Thanks, it is a request from a customer that wants it this way. I agree we should return to the springboard screen.

    Update: I tried it but still pops back to the Resume Playing and Play. versus to the main Category Icons.
  • You need to have every condition that exits the video return a -2, so msg.isfullresult() msg.isrequestfailed() msg.is requestsucceeded() should all return a -2, and of course your test in the showDetailsScreen function should be immediately after the video playback functino returns. Also you'll probably want to modify the showVideoScreen function like:

    function showVideoScreen(episode as object) as integer


    - Joel
  • destruk's avatar
    destruk
    Streaming Star
    It's not standard coding, but you could also simply use the External Control Protocol to re-launch your channel which would 'indubitably' bring them to the home screen rather than stepping up the tree closing all the screens in sequence to the home screen. 🙂