3

RAF fails to render the mediaPlayer for ads and idles on the buffering screen. I can still exit video playback without issues. This is when I make the call to showAds().

if adPod <> invalid AND adPod.count() > 0
    ? "Playing pre-roll ad"
    keepPlaying = m.RAF.showAds(adPod, invalid, m.video.anchor)
end if

The debug console gives me this :

RAF.showAds(); rendering preroll pod of 1 ads
rafrndr-renderTypeChanged() - client-inserted
added child: Rectangle id: 1 subtype: Rectangle
added child: Rectangle id: 2 subtype: Rectangle
check layer: 1 visible: true
check layer: 2 visible: true
Roku_Ads_showVideoAd: isRequestFailed(): index = 0; message = failed to create media player
RAF handleAdError(); render failure: failed to create media player

I am unsure what is causing this error. I have implemented this framework successfully several times before. Any ideas?

2 Answers2

2

I have an observer set on the content field of the Video node. Whenever the content is set, the control field of the Video node is set to prebuffer. This is what was causing the issue. By setting the control of the Video node to "stop" before initializing RAF, this got rid of the issue.

0

In my case, I had another video player playing in background unnoticed. So Roku was not allowing a new video player to start .When I stopped the old player, I could start new video. Stopping any other video or video instance if already exists, is one solution.

Nijil Raj
  • 11
  • 2