0

HD1010 video pause and resume



Struggling with keyboard control on HD1010 for playing videos assigned to a number on the numeric keypad.

Not sure if pause and resume is supported at this point, but when using the code below, my 1010 crashes.
Also, after pause(), it looks like the image on screen pauses, but the video is still playing, because when resumed video jumps to a later point down the video timeline.

'Pause and Resume CRASH!!!
if chr(msg) = "-" then video.Pause():print "Pausing ";nextVideo
if chr(msg) = "+" then video.Resume():print "Resuming ";nextVideo
if chr(msg) = "*" then video.Stop():print "Stoping ";nextVideo

Thanks for looking
Udi

2 comments

  • 0
    Avatar
    RokuLyndon


    It's not supported. That's why it's not documented. The resume doesn't work.





    If that's all of your script, then yes it would crash. You need to listen for input, and return to the listening position after going through the checks for which digit was received. DO you have the full script?
  • 0
    Avatar
    udi


    'Full script with crashing part commented out



    ' This may look familiar <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->



    video1="springs.ts"

    video2="top.ts"

    video3="ColorBar.m2t"



    nextVideo=video1



    videoStatus="idle"



    EnableZoneSupport(true)



    CR=13



    mode=CreateObject("roVideoMode")

    'mode.SetMode("1920x1080x29.97p")

    mode.SetMode("1280x720x60p")



    kyb=CreateObject("roKeyboard")

    video=CreateObject("roVideoPlayer")

    p=CreateObject("roMessagePort")

    kyb.SetPort(p)

    video.SetPort(p)



    ' Not using this but so I do not forget

    VideoEnd=8





    i=CreateObject("roImagePlayer")

    print ""

    print "Now showing Logo"

    i.DisplayFile("logo.png")

    sleep(2000)

    i.StopDisplay()

    print "Removing Logo"



    video.SetLoopMode(true)

    video.PlayFile(nextVideo)



    wait_for_keyboard:



    msg = wait(0,p)



    if type(msg) = "roKeyboardPress" then



    'Any key will stop image display

    'i.StopDisplay()



    print "Key: ";chr(msg)



    if chr(msg) = "1" then nextVideo=video1:print "Loading ";nextVideo : video.SetLoopMode(false)

    if chr(msg) = "2" then nextVideo=video2:print "Loading ";nextVideo : video.SetLoopMode(false)

    if chr(msg) = "3" then nextVideo=video3:print "Loading ";nextVideo : video.SetLoopMode(true)



    if msg.GetInt() = CR then video.PlayFile(nextVideo):print "Playing ";nextVideo



    'Pause and Resume CRASH!!!

    'if chr(msg) = "-" then video.Pause():print "Pausing ";nextVideo

    'if chr(msg) = "+" then video.Resume():print "Resuming ";nextVideo



    if chr(msg) = "0" then video.StopClear():print "Stoping and clearing ";nextVideo

    if chr(msg) = "." then video.Stop():print "Stoping ";nextVideo





    'if chr(msg) = "4" then i.DisplayFile("PM5644.PNG")

    'if chr(msg) = "5" then i.DisplayFile("scaling.png")





    endif

    goto wait_for_keyboard
Please sign in to leave a comment.