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: 
Gbenga
Reel Rookie

Hi, please how do i get start time and end time of a video in the roku development. Thank you

Hi, please how do i get start time and end time of a video in the roku development. Thank you

0 Kudos
3 REPLIES 3
philanderson777
Roku Guru

Re: Hi, please how do i get start time and end time of a video in the roku development. Thank you

Hi, sounds like you might need some help getting started on this one as it's not often as simple as ...a.b.c etc ... there are complexities to this player!

 

suggest you first accept an invite to the very helpful Roku Developers Slack channel where if you post in the #general channel you should find a helpful community there.

 

https://join.slack.com/t/rokudevelopers/shared_invite/zt-22n9u11c1-zoqCczrSTRiMxid4kWBPRA

 

These links may be a bit too deep too quickly but there are certain events we can listen for like

 

https://developer.roku.com/en-gb/docs/references/brightscript/events/rovideoplayerevent.md

isPlaybackPosition() as Boolean

 

to notify of position changed.

 

you can also enable the UI in the player which shows the progress bar, which I think will also have progress events as the video progresses

 

also

 

GetIndex() as Integer
Returns current position in the stream (in seconds) from the beginning.

 

also

 

GetInfo() as Object
Returns an roAssociativeArray array with the following key-value pairs:

Member Type Value
ClipIdx Integer The zero starting index of the item in the content list this event is related to
ClipPos Integer The player position relative to the start of the clip in milliseconds

 

also

 

https://developer.roku.com/en-gb/docs/references/scenegraph/media-playback-nodes/video.md

duration time 0 READ_ONLY The duration of the video being played, specified in seconds. This becomes valid when playback begins and may change if the video is dynamic content, such as a live event.

 

 

as I said it's pretty heavy going even for simple stuff ... hope that helps

 

Phil

0 Kudos
Gbenga
Reel Rookie

Re: Hi, please how do i get start time and end time of a video in the roku development. Thank you

Thank you so much Phil, i really do appreciate. i will do as suggested and dully give you an update.
thank you

philanderson777
Roku Guru

Re: Hi, please how do i get start time and end time of a video in the roku development. Thank you

Not a problem

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.