Can anyone help me understand the TextOverLay component and how to use it with the Daviant Art example? I have read the SDK and tried 100 different ways to add the command but cannot. I am trying to import the info from a php file (http://www.abigailradio.com/Abigail/demo.php) that parses the SONGTITLE field of a Shoutcast stream. I was hoping to overlay this info in the DA example. I just really need to know what code to add and where to add it to get this to work. Any help at all would be greatly appreciated.
Thanks and I hope everyone is having a great weekend.
I’ve never looked closely at the Deviant Art example specifically. To implement the text overlay features of roSlideshow, you would need to call the SetTextOverlayVisible() function of your roSlideshow object with an argument of true. Then you would need to make sure that the content-meta-data objects you’re displaying with that roSlideshow object are populated with values for one or more of these attributes: textOverlayUL, textOverlayUR, and textOverlayBody.
Function DisplaySetup(port as object)
slideshow = CreateObject("roSlideShow")
slideshow.SetMessagePort(port)
slideshow.SetUnderscan(5.0) ' shrink pictures by 5% to show a little bit of border (no overscan)
slideshow.SetBorderColor("#000000")
slideshow.SetMaxUpscale(8.0)
slideshow.SetDisplayMode("best-fit")
slideshow.SetPeriod(9)
slideshow.SetTextOverlayVisible(true)
slideshow.Show()
return slideshow
End Function
and
Sub DisplayUserFavorites()
slideshow = DisplaySetup(m.port)
photolist=m.GetPhotoListFromFeed("http://backend.deviantart.com/rss.xml?q=favby%3Alolly%2F359519")
pictitle=m.TextOverlayBody("text here")
m.DisplaySlideShow(slideshow, photolist, pictitle)
End Sub
As always, I apologize for my lack of depth in getting this. If I do get it, I will be bringing some great content to our Rokus…
The content meta data parameters that the overlay uses on the roSlideShow component are:
TextOverlayUL
TextOverlayUR
TextOverlayBody
Make sure to set the values you desire for each slide… It doesn’t look like your code snippet here does that. The assignment is probably part of your GetPhotoListFromFeed() function below:
Thank you Kevin- I think the problem I have is knowing how to format the comand. I want to put TxetOverlayBody in the roSlideShow function- but I am not sure where and how to code it. Is it just "TexOverlayBody = “Hi there” or something else. Do I need to put the “slideshow.” prefix on it in that function? By values, I assume you mean the “Hi there”? Or should that text ciome from somewhere else?
If I only had an example to see in the sdk…
I would also need to place “setTextOverlayVisible(true)” somewhere. I have no idea where though.
as for the setTextOverlayVisible(true) … is it formatted right? should this go on the xml?
Also, while we are talking about xmls, I am experimenting a little with xspf files on our server, will they work with roku? same headers as xmls and can be generated each session.
Just to be clear – brightscript can PARSE xspf files, since they are just a type of XML. You could parse the xspf yourself and play the files individually (with buffering between each file). But if you want to pass in a playlist and have the video player play all the files in sequence, you need to use m3u8 (HLS).
“RokuMarkn” wrote:
Just to be clear – brightscript can PARSE xspf files, since they are just a type of XML. You could parse the xspf yourself and play the files individually (with buffering between each file). But if you want to pass in a playlist and have the video player play all the files in sequence, you need to use m3u8 (HLS).
Theoretically one could parse and convert an XSPF into a m3u8 HLS file, right (or is some essential info missing)?
I remember reading here about there being problems mixing different video files in the m3u8, is that a limitation in the HLS spec or in Roku’s implementation? If the latter, is there an ETR? It just seems like ads injected into m3u8 files would really provide the best user experience all around.
“RokuMarkn” wrote:
Just to be clear – brightscript can PARSE xspf files, since they are just a type of XML. You could parse the xspf yourself and play the files individually (with buffering between each file). But if you want to pass in a playlist and have the video player play all the files in sequence, you need to use m3u8 (HLS).
Theoretically one could parse and convert an XSPF into a m3u8 HLS file, right (or is some essential info missing)?
I remember reading here about there being problems mixing different video files in the m3u8, is that a limitation in the HLS spec or in Roku’s implementation? If the latter, is there an ETR? It just seems like ads injected into m3u8 files would really provide the best user experience all around.
If I’m not mistaken, the HLS spec requires that all video segments be of the same length (time, not size), so you couldn’t just build an M3U8 with various video clips. It might work, depending on the implementation, but if it’s not to spec, you should plan on it not working at some point in the future.
“RokuMarkn” wrote:
Just to be clear – brightscript can PARSE xspf files, since they are just a type of XML. You could parse the xspf yourself and play the files individually (with buffering between each file). But if you want to pass in a playlist and have the video player play all the files in sequence, you need to use m3u8 (HLS).
Theoretically one could parse and convert an XSPF into a m3u8 HLS file, right (or is some essential info missing)?
I remember reading here about there being problems mixing different video files in the m3u8, is that a limitation in the HLS spec or in Roku’s implementation? If the latter, is there an ETR? It just seems like ads injected into m3u8 files would really provide the best user experience all around.
If I’m not mistaken, the HLS spec requires that all video segments be of the same length (time, not size), so you couldn’t just build an M3U8 with various video clips. It might work, depending on the implementation, but if it’s not to spec, you should plan on it not working at some point in the future.
That’s right, forgot about that. That’s Roku specific though, isn’t it? The Pantos draft includes a EXT-X-DISCONTINUITY tag to tell the client that a different file is following, right? I haven’t done anything with HLS yet, so my practical experience is nil, I could easily be misinterpreting it’s real use…
“TheEndless” wrote:
If I’m not mistaken, the HLS spec requires that all video segments be of the same length (time, not size), so you couldn’t just build an M3U8 with various video clips. It might work, depending on the implementation, but if it’s not to spec, you should plan on it not working at some point in the future.
That’s right, forgot about that. That’s Roku specific though, isn’t it? The Pantos draft includes a EXT-X-DISCONTINUITY tag to tell the client that a different file is following, right? I haven’t done anything with HLS yet, so my practical experience is nil, I could easily be misinterpreting it’s real use…
The EXT-X-DISCONTINUITY tag indicates a new clip, but I’m pretty sure it still requires that the length be the same, as that’s specified in the EXT-X-TARGETDURATION tag, which I don’t think can be changed mid-file. In most of the M3U8 files I’ve worked with, EXT-X-DISCONTINUITY is usually used for pre-roll, mid-roll, and post-roll video (i.e., commercials), but the segments that make up those ads are still broken into EXT-X-TARGETDURATION segments…
Per the spec:
The EXT-X-DISCONTINUITY tag indicates that the media file following
it has different characteristics than the one that preceded it. The
set of characteristics that MAY change is:
o file format
o number and type of tracks
o encoding parameters
o encoding sequence
o timestamp sequence
The EXT-X-DISCONTINUITY tag indicates a new clip, but I’m pretty sure it still requires that the length be the same, as that’s specified in the EXT-X-TARGETDURATION tag, which I don’t think can be changed mid-file. In most of the M3U8 files I’ve worked with, EXT-X-DISCONTINUITY is usually used for pre-roll, mid-roll, and post-roll video (i.e., commercials), but the segments that make up those ads are still broken into EXT-X-TARGETDURATION segments…
Yeah, I guess that would cause a problem.
It would be nice it the Roku could automatically start buffering a new clip in the background when the current clip buffering reaches the end (but the clip is still playing). Maybe Roku can throw that into 2.9, since they obviously aren’t busy enough…
I was able to get some text to show on screen, but TextOverlayUR puts the text in the upper right of a long skinny translucent rectangle at the bottom of the image. It does not put the text in the upper right of the screen. Can I control the size of that text box and where it is on the screen?
So I basically just switched to a timed loop with some roImageCanvas layers of image and text. Seems to work just like the slide show only I have more control over the elements. Is there a way to cache these images?