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

Trying to get RAF2 with hero-grid-template

I'm using this template: https://github.com/rokudev/RAF4RSG-sample

From RAF4RSG project I took the Player.brs, Player.xml, PlayerTask.brs, PlayerTask.xml and VideoContent.xml and put them in the Component folder of the hero-grid-template. 
In the DetailsScreen.brs I replaced "videoPlayer" with "Player". I am able to sideload and install it successfully but I'm not able to get a preroll ad before it plays a video. When I select "Play" on the roku from the Description when it is on screen it launches and plays the video with a preroll ad. 

I'm not sure where I'm missing a reference for the correct component. 

on  "onItemSelected" should call the "Player" node but I might be missing a step. Anyone experience this? 

Sub onItemSelected()
  print "DetailsScreen.brs - [onItemSelected]"
  first button is Play
     if m.top.itemSelected = 0
        m.Player.visible = true
        m.Player.setFocus(true)
        m.Player.control = "play"
        m.Player.observeField("state", "OnPlayerStateChange")
    end if
End Sub

Thanks in advance
If were easy, everyone would do it. Problems are opportunities to learn, but there is a lot of banging your head against the wall to get there.
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.