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: 
matrixebiz
Roku Guru

How to display a jpg on Roku?

Hello, I currently have my Roku reading an xml file with video content like below;

<item sdImg="pkg:/images/SD/video.jpg" hdImg="pkg:/images/HD/video.jpg">
            <title>Video</title>
            <description></description>
            <streamFormat>hls</streamFormat>
            <media>
                <streamQuality>HD</streamQuality>
                <streamBitrate>0</streamBitrate>
                <streamUrl>http://server.com/video.m3u8</streamUrl>
            </media>
            <synopsis></synopsis>
            <live>True</live>
         </item>


but how to I change the above code if I just want to show a jpg picture instead of a video? Thank you
0 Kudos
10 REPLIES 10
matrixebiz
Roku Guru

Re: How to display a jpg on Roku?

Hello, just wondering if anyone knows how to display a jpg called from within the xml file?
0 Kudos
Tyler_Smith
Binge Watcher

Re: How to display a jpg on Roku?

Are you using Scene Graph or Vanilla BrightScript?
How are you ingesting your XML?
Tyler Smith
0 Kudos
matrixebiz
Roku Guru

Re: How to display a jpg on Roku?

Hello, I'm using Brightscript that parces the XML. 
What would I also change to display a mp4 video?
0 Kudos
matrixebiz
Roku Guru

Re: How to display a jpg on Roku?

Hi Tyler, you around?
0 Kudos
matrixebiz
Roku Guru

Re: How to display a jpg on Roku?

If there is some missing information to my question, please let me know. This should be an easy answer for any programmer.  
Not sure why tickets have to be open comming up on a month, before an answer is given, if at all. Is there a more active Roku forum out there? Thx
0 Kudos
EnTerr
Roku Guru

Re: How to display a jpg on Roku?

"matrixebiz" wrote:
If there is some missing information to my question, please let me know. This should be an easy answer for any programmer.  
Not sure why tickets have to be open comming up on a month, before an answer is given, if at all. Is there a more active Roku forum out there? Thx

No, there is no better forum on Roku. There are however paid "evangelists" on staff at RokuCo that whose job is to help people like you but are rather reclusive for some reason. Everybody else whose name does not start with "Roku" - we are just volunteers in answering questions, can't be compelled.

Sorry for the situation. I think the reason is that your first question shows big confusion about Roku development (how do i show picture instead of video - that's apples and oranges), then you did not know if your code is SDK1 or SDK2... and people are "i am not touching this, will take too much effort explaining". Re mp4, should be as easy as changing <streamFormat> from hls to mp4 and then in <streamUrl> changing from the m3u8 URL to a mp4 URL.
0 Kudos
RokuChrisT
Visitor

Re: How to display a jpg on Roku?

Hi guys,

Apologies for a delay and I accept your feedback. I don't love the term reclusive but yes we are understaffed at the moment and working to grow the team. Currently our developer relations team (3 of us) is handling all certifications (thousands every quarter) in addition to the new content we've been writing. We have a lot coming down the road and we've written over 90 new guides in the last 4 months. You can clone the github repo to track the work in progress: https://github.com/rokudev/docs

To answer your question - there are two options:

SceneGraph (XML) - I'd highlight suggest you move your app to our current framework. It would enable you to simply create a poster (very close to an img tag in XML): https://sdkdocs.roku.com/display/sdkdoc/Poster

For legacy BrightScript-only channels aka "SDK1" - give roImageCanvas a try. https://sdkdocs.roku.com/display/sdkdoc/roImageCanvas

Also would love feedback on the simple channel building guide: https://github.com/rokudev/docs/tree/master/develop/sdk-development
0 Kudos
matrixebiz
Roku Guru

Re: How to display a jpg on Roku?

Okay, thanks for the info, I'll check out https://github.com/rokudev/docs/tree/master/develop/sdk-development


and for getting back to my original question, I don't know all the various Roku programming out there but I'm pretty sure I'm using "Brightscript" I just assumed a programmer would know what I was asking by looking at the code in the first post and if not then ask me more question to try and narrow down what I need instead of just ignoring the question. I posted the code that calls a hls and mp4 so didn't think it would be so difficult to show me how to change it to display a jpg instead, when the user clicks on the play button. If you need more info, let me know. I'm trying to go through the Roku Development Guide to figure out the code/programming but it's not making sense :(
0 Kudos
RokuMarkn
Visitor

Re: How to display a jpg on Roku?

You didn't post any code, you posted some xml which is data.  Tyler asked what kind of code you're using, SceneGraph or something else, and you didn't answer that question.  I imagine most people at that point decided, as EnTerr suggested, that it would take too much effort to clear things up.

Basically to display a jpg you have a choice of using either ImageCanvas, roScreen or SceneGraph.  Probably ImageCanvas is the simplest approach for someone without much experience.

--Mark
0 Kudos