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

RAF givng "Problem displaying MediaFile"

I can get the FullRAFSeceneGraphSample project working and showing ads correctly.  When I integrate the code into my Scene Graph app I get the following error when trying to play the ad.  The black screen with "Your program will begin after thsi message" shows but it just freezes on this screen.  No progres bar at the bottom showing ad loading progress either.

I had this all working in my app but all of a sudden it stopped. I can't figure out what change I made broke the pre-roll ads via RAF.  Here is my debug output.  Firmware ver 7.5 is what I'm on


Roku_Ads Framework version 1.9
Roku_Ads library version: 1.9
[size=100]Roku_Ads_util_getStringFromUrl: requesting URL: http://1c6e2.v.fwmrm.net/ad/g/1?nw=116450&ssnw=116450&asnw=116450&caid=493509699603&csid=fxn_shows_roku&prof=116450:Fox_Live_Roku&resp=vast&metr=1031&flag=+exvt+emcr+sltp&;_fw_ae=d8b58f7bfce28eefcc1cdd5b95c3b663;app_id=ROKU_ADS_APP_ID[/size]
Roku_Ads_util_getStringFromUrl: requesting URL: http://pubads.g.doubleclick.net/gampad/ads?slotname=/82114269/rrafcs/bf/dev&sz=1920x1080&tfcd=0&url=http://roku.com&unviewed_position_start=1&output=vast&impl=s&env=vp&gdfp_req=1&ad_rule=0&description_url=http%3A%2F%2Fapps.roku.com&vad_type=linear&nofb=0&sdkv=roku&min_ad_duration=0&max_ad_duration=60000&rdid=567d5eb6-c584-52d6-8acb-72593eb24f47&is_lat=0&idtype=rida&correlator=1479941773771&scor=1479941773771&pod=POD_NUM&ppos=POD_POSITION&cust_params=genre%3DROKU_ADS_CONTENT_GENRE%26ua%3DRoku%252FDVP-7.50%2520%2528247.50E04096A%2529%26ai%3Ddev
m56s14 [PlayAd] adPods.count:  1
RAF 1.9; rendering preroll pod of 1 ads
Roku_Ads_showVideoAd: isRequestFailed(): index = 0; message = failed to create media player
RAF 1.9; render failure: failed to create media player
m56s14 [PlayAd] Error. Obj: invalid ][ Error ][ <Component: roAssociativeArray> =
{
    ad: <Component: roAssociativeArray>
    adindex: 1
    duration: 30
    errcode: "405"
    errmsg: "Problem displaying MediaFile"
    type: "Error"
}
Roku_Ads_util_getNoResponseFromUrl: requesting URL: http://pubads.g.doubleclick.net/pagead/conversion/?ai=Bt7fYjR42WJHLHM-V-QLsgJDIAe3appYJAAAAEAEgvfnFJTgAWI2j3ZK2A2DJjuWJlKSQE7IBCHJva3UuY29tugENMTkyMHgxMDgwX3htbMgBBdoBEGh0dHA6Ly9yb2t1LmNvbS_AAgLgAgDqAhcvODIxMTQyNjkvcnJhZmNzL2JmL2RldvgC_NEekAPoApgDpAOoAwHQBJBO4AQB0gUFEKX233KQBgGgBiPYBgXYBwHgBws&sigh=2LT9AwrZpOw&label=videoplayfailed



Any idea why this would happen?
0 Kudos
4 REPLIES 4
rynop
Visitor

Re: RAF givng "Problem displaying MediaFile"

I figured out the issue.  Problem was I'm setting the video.control state to "prebuffer" before calling raf.showAds(adPods)

When RAF tries to render the ad it thinks that a video is already playing.

How can I pre-buffer my video while the ad is playing? 
0 Kudos
EnTerr
Roku Guru

Re: RAF givng "Problem displaying MediaFile"

Am i getting this right - you are using RSG (scenography) for your main UI, plus RAF in the main thread - so it's essentially "hybrid" mode, right? And if you set "prebuffer" for roSgNode Video, somehow through quantum entanglement (Einstein's "Spooky Action at a Distance") that (d)effects the RAF play??

How very interesting!
0 Kudos
rynop
Visitor

Re: RAF givng "Problem displaying MediaFile"

You used a few acronyms there that I'm not familiar with. I am using a scene graph application with a RowList element.  When an item in that RowList is hovered over, I set the Video element's "control" state to "prebuffer".

When a user clicks (OK) on the RowList element my main thread gets a message on its port, and kicks off a raf.showAds(adPods).  This causes RAF to throw a "Problem displaying MediaFile" error.

If I remove setting the video state to prebuffer before playing the ad, everything works fine.  I think the issue is the prebuffer holds up control of the video player, not allowing RAF to invoke it.

I want to prebuffer while on hover AND continue to prebuffer while the ad is playing.
0 Kudos
EnTerr
Roku Guru

Re: RAF givng "Problem displaying MediaFile"

Right, i went all jargony on you - sorry!

RSG = "Roku Scene Graph", which i shorten to "scenography" to be a pronounceable word.

By "hybrid" i meant mix of SDK1 (roVideoPlayer, roVideoScreen in main thread) and SDK2 (roSgScreen and roSgNode subclasses like RowList and Video, render thread). And yes, from what i remember RAF is entirely SDK1 affair.

And by "spooky action at a distance" i mean that 2 completely separate objects - in separate threads even - affecting each other. We had a thread on that a few months ago - and my understanding is that
[spoiler=there can be only one:1b1s7scz][youtube:1b1s7scz]sqcLjcSloXs[/youtube:1b1s7scz][/spoiler:1b1s7scz] video player per Roku. Yes, behind the Roku scene there is a singleton media player and if that gets "wedged", bad things happen - incl. device reboots.

So i am not optimistic about being able to do both in parallel. But let's see what Roku* says?
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.