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

Re: XML Syntax for Deeper Category Levels

http://vpforums.org/destruk/DynamicSubmenus.zip

Perhaps a fully working, fleshed out example would get you in the right direction?
AppHomeScreen.brs is the full channel code.
Category.brs is the xml parsing
The other files are unchanged.

direct xml links to look at:
http://vpforums.org/destruk/xml/categories.xml -- this one is loaded first
http://vpforums.org/destruk/xml/morevideos.xml -- this is a submenu of three video entries
http://vpforums.org/destruk/xml/submenu.xml -- this is a submenu of a menu entry and two video entries
0 Kudos
claudioc
Visitor

Re: XML Syntax for Deeper Category Levels

im going to check it out right now, i seriously cant tell you how much i appreciate the extra effort on your part, your incredibly kind to take your free time to help me out in this manor pal. ill check back with you, havent slept yet but im excited to test this out now 😆

*PS* i have seen some of the help you have given to others compared to the actual rokunamed people here, and your assistance isnt read section 4.5 of blah blah, you give legit help no disrespect to the roku team themselves but they have very little interest as it seems in giving such detailed assistance 😆
0 Kudos
claudioc
Visitor

Re: XML Syntax for Deeper Category Levels

i have tested the sample app it naturally works as you intended it to, so now im going to test it with my own stuff now, and ill report back, thanks again man really.
0 Kudos
destruk
Streaming Star

Re: XML Syntax for Deeper Category Levels

You're welcome. In Roku's defense - you can probably imagine how many times they get asked for help - they can't possibly be expected to give out much more than they already do. The SDK and example apps and documentation is sufficient to develop most of the necessary pieces to create what you need - these more complete examples simply accelerate the process and take a bit of time to debug into 'releasable' code.
0 Kudos
claudioc
Visitor

Re: XML Syntax for Deeper Category Levels

oki fully working sub menus and my videos play back absolutely fine. working perfectly. only thing i noticed is even though i added my images to the images folder and removed yours, the background is a blue header at the top and grey background, despite my images already being layed out a certain way, i looked through the *.brs files to make sure it's not pointing to something different, and i see no details that can explain why this is happening, you have any idea ? thats really the main design features left is the art, and since i have it made already i just wanna see it looking pretty hehe.
0 Kudos
claudioc
Visitor

Re: XML Syntax for Deeper Category Levels

hey just checking in again, how would i go about adding "hls" as an option for the menu items i was able to make a rudimentary option with simplevideoplayer example. but that is using appmain.brs and it completely takes over the situation, doesnt the hls function just work when noted as the streaming type, thats whats confusing about it not being an option in the dynamic example you gave me, would be greatful for the help, being able to add menu items as live *.m3u8 playlists (i completely understand the server side and i already configured it and have that all working perfectly, i just would prefer everything be in 1 app instead of having to use 2, so any help would be appreciated bud. Thanks in advance.
0 Kudos
destruk
Streaming Star

Re: XML Syntax for Deeper Category Levels

search the script for "force" - remove the forced mp4 specification which is probably in the videoplayer script file, add the type to the xml, and to the parser.

Sub showVideoScreen(episode As Object)
port=CreateObject("roMessagePort")
screen=CreateObject("roVideoScreen")
screen.SetMessagePort(port)
episode.StreamFormat = "mp4" 'force video type to mp4


So you'll need to add StreamFormat to the parser and xml.
0 Kudos
claudioc
Visitor

Re: XML Syntax for Deeper Category Levels

one sec im going to give it a try and see if i can do it thanks for the quick response. one quick question though, "and to the parser." presumably you are refering to the:

episode.StreamFormat = "mp4"

are you saying to completely remove this, and just note the stream type in the xml, this part i believe i understand, but the part im not sure i understand is when you say also to add it to the parser, appHomeScreen.brs is where this is located, what else needs to be changed:

<streamFormat>mp4</streamFormat>
<StreamQuality>SD</StreamQuality>

and

<streamFormat>hls</streamFormat>
<StreamQuality>SD</StreamQuality>

your saying to note it like this now in the xml, if i understand you correctly.

Just need to be clear on what you mean by the parser editing, and then i should be able to do it just fine, thanks for your quick response bud.
0 Kudos
destruk
Streaming Star

Re: XML Syntax for Deeper Category Levels

Anything in the xml needs to be in the parser routine in your script in order to use it

Function ParseCategoryNode(xml As Object) As dynamic
o.Title=validstr(xml.Title.GetText()) 'Give the video icon a name to display on the screen

Without the o.title line your content in the app will not have a title property. You need to add a streamformat property to the parser routine.
o.StreamFormat=validstr(xml.StreamFormat.GetText()) 'Give the video a format type value

That will handle your new xml information like you said.
0 Kudos
claudioc
Visitor

Re: XML Syntax for Deeper Category Levels

i got an error but i actually realized i didnt remove the force for mp4, so live streams are working now, wonderful bro.
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.