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: 
shess
Visitor

Scene Graph Video PlayStart?

Hi,

I'm trying to set the PlayStart for a Video node using SceneGraph.  However, when I set a field called PlayStart on the content node like so:

contentNode.PlayStart = m.savedPosition

I get a compile error:

--- Syntax Error. Builtin function call expected. (compile error &h9d)

I get the same when I try to specify a BookmarkPosition.  I'm assuming this means both are built-in keywords, but how else to specify the start position for a Video node?

Thanks for any help!
0 Kudos
4 REPLIES 4
squirreltown
Roku Guru

Re: Scene Graph Video PlayStart?

m.videoPlayer   =   m.top.findNode("VideoPlayer")

m.videoplayer.position = (current position)
m.videoplayer.seek = 1000    (will set it to 1000 secs.)

trickplay needs to be set to true in your video node

 <!-- Playback node -->

    <Video
      id="VideoPlayer"
      visible="false"
      enableTrickPlay="true"
      translation="[0, 0]"
      width="1920"
      height="1080" />
Kinetics Screensavers
0 Kudos
destruk
Binge Watcher

Re: Scene Graph Video PlayStart?

Does Playstart even work in the content node metadata?  If not for scenegraph then it should be noted in the SDK as it is listed implying it ought to work.  But yes, I always used seek and it has done its job for me.
0 Kudos
shess
Visitor

Re: Scene Graph Video PlayStart?

Thanks... I feel silly, but it was the variable I was using - pos - that was causing the compile error.  So PlayStart *does* work for SceneGraph, but it has the consequence that you can't rewind earlier than that point.  So it looks like seek is the better approach anyway.

Thanks for the help!
0 Kudos
destruk
Binge Watcher

Re: Scene Graph Video PlayStart?

That explains a lot Shess!  Thanks.  There was at least one other post where the developer couldn't rewind the video prior to the start point of a resumed video and this explains why.
0 Kudos