so seeing some of the responses in the main forum about this, shows this may be a good idea to set up.
I will test it this week, but if Roku could give us a way to work with this in the video player example it would be very helpful.
i tried a few combos but its just isn’t working.
What would be ideal is to be able to add the actual link from the xml.
I want to bump this and see if anyone here can help us with this?
I liek i am assuming many others are, are using the video player example.
the code that was posted here does not work with this example, i have no problem with the buffer if necessary but it would be very nice to get it working to at least test this, i have tried so many combos and none work.
Please this has been mentioned in the main forum as well
If you’re wanting to use roVideoScreen rather than roVideoPlayer, the concepts in this thread (viewtopic.php?f=34&t=32501) could easily be applied to playing pre-roll ads.
thanks Chris will give that a whirl tomorrow…
Ok i have been working with this example here:
this.player = CreateObject("roVideoPlayer")
this.player.SetMessagePort(this.port)
this.player.SetLoop(false)
this.player.SetPositionNotificationPeriod(1)
this.player.SetDestinationRect(this.layout.left)
this.player.SetContentList([
{
Stream: { url: "http://video.ted.com/talks/podcast/DanGilbert_2004_480.mp4" }
StreamFormat: "mp4"
},
{
Stream: { url: "http://video.ted.com/talks/podcast/SethGodin_2003_480.mp4" }
StreamFormat: "mp4"
}
])
this.player.Play()
but modifed the content list like this
videoArray = [
{
Stream: { url: "http://video.ted.com/talks/podcast/DanGilbert_2004_480.mp4" }
StreamFormat: "mp4"
Title: "Dan Gilbert"
},
{
Stream: { url: "http://video.ted.com/talks/podcast/SethGodin_2003_480.mp4" }
StreamFormat: "mp4"
Title: "Seth Godin"
}
]
this.player = CreateObject("roVideoPlayer")
this.player.SetMessagePort(this.port)
this.player.SetLoop(false)
this.player.SetPositionNotificationPeriod(1)
this.player.SetDestinationRect(this.layout.left)
this.player.SetContentList(videoArray)
this.player.Play()
Now no matter what i do i can not get the “Title”
i have tried:
vidTitle = videoArray.Title
vidTitle = this.videoArray.Title
vidTitle = this.player.videoArray.Title
and nothing seems to work, what am i missing here? tried other combos and everyone of them tosses me errors but will still play the video…
videoArray is an array, so you need:
vidTitle = videoArray[0].Title ' gives "Dan Gilbert"
vidTitle = videoArray[1].Title ' gives "Seth Godin"
-JT
thanks JT… but what seems to be the problem here is knowing what is the current video playing.
in this code where would we print the title of the current video playing, using
vidTitle = videoArray[0].Title ' gives "Dan Gilbert"
vidTitle = videoArray[1].Title ' gives "Seth Godin"
works great if you know what your looking for, but i want to know which one is currently playing. I dont think i pointed that out clearly enough, thanks
Wouldn’t you just store the value of the index of the selection being played, so you always know what is playing? You can even build it into the video player routine…
'Uncomment his line to dump the contents of the episode to be played
'PrintAA(episode)
In which case, it’d be “episode.title” within that routine. If you prefer to get the information from the springboard screen before the file begins to play, then “showList[showindex].title” would work there.
Or does the custom video player not allow you that kind of access?