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

Show image on Loading or skipping video

Hi,

Is there a way with an HLS Stream to have VideoPlayer show an image instead of a full black screen? I have tried various things with events and ImageCanvas, but sometimes the video starts and the canvas elements linger which I was clearing at progress=100.

Thanks
- Daniel
http://dbulli.com
0 Kudos
6 REPLIES 6
Anonymous
Visitor

Re: Show image on Loading or skipping video

Hello,

Using roScreen rather than roImageCanvas is more performant and would give you slightly better timing for dismissal, however, roScreen cannot be used along with greater than 720P video playback. If you know your streams are 720P or lower resolution, then you should try switching to roScreen for your image display and make sure you use the SetMaxVideoDecodeResolution API on the player to manage buffer allocations properly.

Cheers,
Jon
0 Kudos
dbulli
Visitor

Re: Show image on Loading or skipping video

Thanks. Will look into that SetMaxVideoDecodeResolution. Not really using that.. but when I tried using it I never saw any difference using it. The documentation is very vague about it.
- Daniel
http://dbulli.com
0 Kudos
dbulli
Visitor

Re: Show image on Loading or skipping video

Another weird annoying thing is there is a pause in between when steam stars and when there is start of play, and nothing is drawing to the screen Sometimes it's brief other times it's long. Any ideas?

'Output events for debug
print msg.GetType(); ","; msg.GetIndex(); ": ["; msg.GetMessage();"]"



20, 0: [Stream started.]
11, 330: [startup progress]
11, 339: [startup progress]
11, 346: [startup progress]
11, 350: [startup progress]
11, 355: [startup progress]
11, 426: [startup progress]
11, 769: [startup progress]
11, 999: [startup progress]
11, 999: [startup progress]
11, 1000: [startup progress]
11, 0: [start of play]
- Daniel
http://dbulli.com
0 Kudos
TheEndless
Channel Surfer

Re: Show image on Loading or skipping video

With the roVideoPlayer, you have to custom draw all screen graphics. In your example, you would need to draw the buffering bar on an roImageCanvas overlayed on top of the roVideoPlayer.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
dbulli
Visitor

Re: Show image on Loading or skipping video

Thanks Endless. I will try again but in between the stream started and the start play, nothing was displayed on the screen.
- Daniel
http://dbulli.com
0 Kudos
TheEndless
Channel Surfer

Re: Show image on Loading or skipping video

"dbulli" wrote:
Thanks Endless. I will try again but in between the stream started and the start play, nothing was displayed on the screen.

The output you're seeing in the debug console is the buffer progress (0 to 1000, so divide by 10 for the percentage). That is being written in the IsStatusMessage event in the event loop. You'd need to insert code in there to draw a buffer bar to an image canvas on top of your video screen.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos