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: 
tmat1075
Visitor

RAF - can still hear ad audio on main screen (link to repo included)

Here's the repo: https://github.com/matula/roku-video-playlist

Steps to replicate:
1) Go to a video and click "Play". (The Brooklyn 99 one is pretty short)
2) When the video is done, there will be a short 'blip' of the next video but then the ad will play.
3) Press the "back" button... it will go back to the menu screen, but the ad is still playing.

I'm sure I'm just missing something with the threaded nature of Roku development, but nothing I've tried has worked.  Thanks for any help!
0 Kudos
7 REPLIES 7
RokuNB
Roku Guru

Re: RAF - can still hear ad audio on main screen (link to repo included)

I had a quick glance and seem you are hiding the player on "finished"
https://github.com/matula/roku-video-pl ... en.brs#L74
Maybe you should do that on done/stop, as the sample app?
https://github.com/rokudev/RAF4RSG-samp ... ne.brs#L73
0 Kudos
tmat1075
Visitor

Re: RAF - can still hear ad audio on main screen (link to repo included)

Thanks! I updated it to check for a "done" state.    The issue still happens.
0 Kudos
tmat1075
Visitor

Re: RAF - can still hear ad audio on main screen (link to repo included)

I'm still getting the ad audio issue.  😞

Also, whenever I exit out of the video, then choose the next video from the main menu, the 'contentIndex' from the original playlist persists and it starts playing THAT video. So if I'm at contentIndex = 3, then choose the next playlist, I expect it should restart at 0, but it instead starts at 3. 
0 Kudos
destruk
Binge Watcher

Re: RAF - can still hear ad audio on main screen (link to repo included)

The contentindex isn't reliable or as fast as we would prefer.  It usually changes moments AFTER the video has started playing.  You'll need to work around that by monitoring the player state field.  If contentisplaylist=true, then "playing" fires once and plays the playlist item [0].  When the contentindex changes on video #2 in the list it is contentindex[1], and when it's done with the playlist it will be the last item in the playlist when the state reports "finished".  It is tricky to set up but it's possible.  I basically delete the playlist contentnodes when it's done and recreate them before setting the video control to "play" and that appears to fix itself.
0 Kudos
tmat1075
Visitor

Re: RAF - can still hear ad audio on main screen (link to repo included)

I was able to fix the contentIndex issue, by invalidating the Video node in the DetailsScreen. repo updated: https://github.com/matula/roku-video-playlist 

Still getting the original issue of the ad audio playing after backing out of it. I can't figure out which thread it's running on and how to shut it down. 
0 Kudos
tmat1075
Visitor

Re: RAF - can still hear ad audio on main screen (link to repo included)

>>> HomeScene >> OnkeyEvent
in HeroScene.xml onKeyEvent back true
------ [back pressed] ------
DetailsScreen.brs - [OnFocusedChildChange]
DetailsScreen.brs - [onVisibleChange]
Player.brs [controlChanged]
Player.brs [exitPlayer]
DetailsScreen.brs - [OnVideoPlayerStateChange]
DetailsScreen.brs - [OnFocusedChildChange]
DetailsScreen.brs - [OnVideoPlayerStateChange]
******* CREATE PLAYER ***********
Player.brs [init]
DetailsScreen.brs - [OnFocusedChildChange]
>>> HomeScene >> OnkeyEvent
in HeroScene.xml onKeyEvent back false
FadingBackground.brs - [OnBackgroundLoaded]
FadingBackground.brs - [OnBackgroundLoaded]
PlayerTask: mid-roll finished, seek to  0


After I click "<-", it does hit the 'exitPlayer()' sub, and I'm invalidating the PlayerTask there... but it looks like the PlayerTask node is still there, even though I set it to "invalid"
0 Kudos
manishDev
Visitor

Re: RAF - can still hear ad audio on main screen (link to repo included)

Did you ever find a solution to it?
0 Kudos