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: 
dynamitemedia
Binge Watcher

Re: Pre/Post Roll Ads?

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.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
dynamitemedia
Binge Watcher

Re: Pre/Post Roll Ads?

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
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Pre/Post Roll Ads?

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.
0 Kudos
dynamitemedia
Binge Watcher

Re: Pre/Post Roll Ads?

thanks Chris will give that a whirl tomorrow....
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
dynamitemedia
Binge Watcher

Re: Pre/Post Roll Ads?

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...
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
renojim
Community Streaming Expert

Re: Pre/Post Roll Ads?

videoArray is an array, so you need:
vidTitle = videoArray[0].Title ' gives "Dan Gilbert"
vidTitle = videoArray[1].Title ' gives "Seth Godin"

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
dynamitemedia
Binge Watcher

Re: Pre/Post Roll Ads?

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
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
destruk
Streaming Star

Re: Pre/Post Roll Ads?

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?
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.