Your Digital Media Has Never Looked So Good

 
tmat1075
Topic Author
Posts: 27
Joined: Mon Apr 17, 2017 9:35 am

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

Tue May 09, 2017 10:19 am

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!
 
User avatar
RokuNB
Posts: 220
Joined: Fri Mar 31, 2017 2:22 pm

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

Tue May 09, 2017 5:52 pm

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
 
tmat1075
Topic Author
Posts: 27
Joined: Mon Apr 17, 2017 9:35 am

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

Wed May 10, 2017 8:00 am

Thanks! I updated it to check for a "done" state.    The issue still happens.
 
tmat1075
Topic Author
Posts: 27
Joined: Mon Apr 17, 2017 9:35 am

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

Fri May 12, 2017 1:31 pm

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. 
 
User avatar
destruk
Posts: 2440
Joined: Sat Dec 18, 2010 4:58 pm

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

Fri May 12, 2017 1:35 pm

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.
 
tmat1075
Topic Author
Posts: 27
Joined: Mon Apr 17, 2017 9:35 am

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

Mon May 15, 2017 11:09 am

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. 
 
tmat1075
Topic Author
Posts: 27
Joined: Mon Apr 17, 2017 9:35 am

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

Mon May 15, 2017 11:16 am

>>> 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"

Who is online

Users browsing this forum: btpoole and 5 guests