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: 
destruk
Streaming Star

SceneGraph video playback positioning

My manifest is set to resolutions=fhd, roku3, set to 1080p
If the video component is set to anything other than fullscreen, it appears the buffering bar isn't displayed and trick play doesn't show up either.
When playing a video and you press pause, there is a 2 pixel line at the bottom of the TV - because the progress bar semitransparent rectangle isn't covering it up.
Is there any way to center the buffering bar on the screen instead of where it shows by default?  I tried setting the translation and it didn't work.
Is it possible to bump the progress bar down 1 or 2 pixels?
If the video component is translated outside of the screen area in any form, then the progress and buffering bars aren't rendered either.
(ie setting the video to 1920x1080 and then translating it 1 pixel down with translation=[0,1])
0 Kudos
6 REPLIES 6
destruk
Streaming Star

Re: SceneGraph video playback positioning

Just in case anyone else had these same questions --
There is what I'd call a bug in the video player where it stores the pause state of the video in the current content it is playing.
If you play a video, then press PAUSE so it stops, and then press BACK, and then tell it to play again, the first time you press pause now will be ignored - the progress bar will flash on the screen and shortly thereafter disappear but the video will not pause.
To fix this, when the stop event fires set the video player content to invalid.  And when you want it to play, add the original data back into the video player content.

You will have to make that adjustment before messing with the other options here.

Anyway, to change the progressbar location and settings, you'll need to turn off some of the automatic configurations for the video component first.
Before setting the video control to "play" --
m.video.trickplaybarvisibilityauto=FALSE ' Setting this to false allows you to position and control the progress bar manually
m.video.trickplaybar.translation=[110,900] 'For a 1920x1080 display and the channel manifest set to fhd, the trickplay bar will be centered horizontally at with 110 for the x value, and doing this ALSO gets rid of the opacity rectangle so you don't have stray pixels at the bottom of the screen when it is paused.  Adjust the location as you prefer, but if it is placed out of bounds then the entire thing won't be drawn.

Use
m.video.trickplaybar.visible=FALSE
For the state update callback routine for "error", "stopped", "buffering", "playing", and "finished"

Then for the On key event, it appears most of the time the key pres events are missed, but key release or keyup appears to always get reported here, so use the press=false section and add
		If m.video.state="paused"
If key="play"
If m.video.trickplaybar.visible=FALSE
m.video.trickplaybar.visible=TRUE
Else
m.video.trickplaybar.visible=FALSE
End If
Else If key="right"
If m.video.trickplaybar.visible=FALSE m.video.trickplaybar.visible=TRUE
m.video.control="pause"
Else If key="left"
If m.video.trickplaybar.visible=FALSE m.video.trickplaybar.visible=TRUE
m.video.control="pause"
Else If key="rewind"
m.video.control="pause"
If m.video.trickplaybar.visible=FALSE m.video.trickplaybar.visible=TRUE
Else If key="fastforward"
m.video.control="pause"
If m.video.trickplaybar.visible=FALSE m.video.trickplaybar.visible=TRUE
End If
End If

destruk
Streaming Star

Re: SceneGraph video playback positioning

What I mean by "You will have to make that adjustment before messing with the other options here." -- is if you don't then in that situation described, pressing pause will display the progress bar but not pause the video, pressing it again will pause the video but not display the progress bar - it's really annoying.  So just go ahead and change it to invalid first, re-add the content, and off you go as it will save you headaches later.
0 Kudos
destruk
Streaming Star

Re: SceneGraph video playback positioning

The first time you play the current video it will display a retrievingbar.  If you back and play it again then it will show a bufferingbar.
If you set
m.video.retrievingBarVisibilityAuto=FALSE

Then it will use the default buffering bar the first time the video loads, but without the buffering "Loading..." text
If you want to get rid of that text for the buffering bar when it is loaded later or rebuffered later, an easy way is to set the color to 0 --
m.video.bufferingtextcolor="0x000000"

Anyway, that's all I've got here for now.  I'll be messing with this a bit more to get what I need.
0 Kudos
drinkrain
Visitor

Re: SceneGraph video playback positioning

Thanks you for all of this.. I am trying to create a custom Videoplayer Ui this very moment and this thread is very insightful. If you have any more tips let me know 😄
0 Kudos
SECHIN_SUNNY
Visitor

Re: SceneGraph video playback positioning

Please can you describe the process on how to position each video component field in a custom manner .
Thanks
Regards
Sechin Sunny
0 Kudos
destruk
Streaming Star

Re: SceneGraph video playback positioning

I don't know - you would need to print out each component section, and each child's translation values, and see what moves what.
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.