Forum Discussion

JasonM's avatar
JasonM
Visitor
14 years ago

Time out Period

I have a private channel but have an issue with my customers. When I disconnect a customer's account they are still able to view the content on their Roku box unless they exit my channel to Roku's main menu. They can remain in my channel indefinitely thereby watching my content continuously unless they have drop in their internet or interruption in their power supply to their Roku box. My channel developers are having difficulty iwith the following:

1) Adjusting the settings to automatically force the user off the channel after an inactive period of time

2)To refresh the available content list during a live connection to the roku box after being logged in.

Look forward to your help guys

2 Replies

  • So you need to first modify any loop that your users are likely to leave the channel in when not watching so that instead of waiting indefinitely, msg=wait(0,port) it waits just short period, like msg=wait(100,port).

    Then you need to set a timer so that your channel checks if it is authorized, every 15 minutes or so, you would create and set the timer before the loop:

    timer=createobject("rotimespan")
    timer.mark()


    then within the loop, when the timer reaches 15 minutes,you check if the channel is authorized, the same way you check when the channel starts:


    timer=createobject("rotimespan")
    timer.mark()
    while true
    msg=wait(100,port)
    if timer.totalseconds() > 900 then
    test=checkauthorization()
    timer.mark()
    if not test then
    ?"not authorized, exiting"
    end
    end if
    end if


    Depending on what the output of your authorization test is, you may need to modify this a bit, for example, if the returned value is a number and not a boolean true/false.

    - Joel
  • Joel,

    Thanks alot buddy for the timely and efficient response. I just sent the info to my team already. Will keep you posted.

    - Jason