rokudev / SceneGraphDeveloperExtensions

Other
114 stars 65 forks source link

render failure 0: failed to create media player #6

Open sujithdb opened 5 years ago

sujithdb commented 5 years ago

I am relatively new to Roku. Currently trying out the Basic_Channel sample to be used with RAF. I cloned the 2_Basic+Channel sample into my local and followed the below steps and encountered the error.

Steps:

  1. Cloned the sample channel [2_Basic+Channel]

  2. In the components\contents\RootHandler.brs file add the below code between lines 28-29 (updated file attached). Note: Code used from Roku_Recommends sample in the same repo.

    
                        itemNode.addFields({
                            handlerConfigRAF: {
                                name: "HandlerRAF"
                                fields: {
                                    contentId: "ID"
                                }
                            }
                        })


3. Place the files (HandlerRAF.brs, HandlerRAF.xml) in the folder components\contents. Note: I took these files from the Roku_Recommends sample in the same repo.

4. Open the file components\SGDEX\Views\VideoView\VideoView.brs and commented out the line# 524 currentItem.handlerConfigRAF = invalid. 
**Note**: The Ads would not play unless you comment out this line.

5. Sideload the channel and play the movie (Twitch sample)

**Result:**
You will get the following error in your Telnet session. The Ad plays, but there is NO Video for Ad

**Error:**

> [RAF] showAds(): rendering preroll pod of 1 ads
> [RAF] render.renderTypeChanged("client-inserted")
> [RAF] render.renderTypeChanged("client-inserted")
> [RAF.err] handleAdError(); render failure 0: failed to create media player
> [RAF] fireBeacon("http://pubads.g.doubleclick.net/pagead/conversion/?ai=BXK2UgPrHXLH7CYvOuQT8qLDIA-WY2qZFAAAAEAEgvfnFJTgAWPya1_6CBGDlyuWDtA6yAQhyb2t1LmNvbboBDTE5MjB4MTA4MF94bWzIAQXaARBodHRwOi8vcm9rdS5jb20vwAIC4AIA6gIXLzgyMTE0MjY5L3JyYWZjcy9xYS9kZXb4AvzRHoADAZADmgiYA-ADqAMB4AQB0gUGEMvW3OERkAYBoAYj2AYF2AcB4AcL0ggHCIBhEAEYDw&sigh=GQ5eQ7PrPbM&label=videoplayfailed405")
> [RAF.err] showVideoAd(): excessive video buffering detected, canceling ad play
> [RAF] fireBeacon("http://pubads.g.doubleclick.net/pagead/conversion/?ai=BXK2UgPrHXLH7CYvOuQT8qLDIA-WY2qZFAAAAEAEgvfnFJTgAWPya1_6CBGDlyuWDtA6yAQhyb2t1LmNvbboBDTE5MjB4MTA4MF94bWzIAQXaARBodHRwOi8vcm9rdS5jb20vwAIC4AIA6gIXLzgyMTE0MjY5L3JyYWZjcy9xYS9kZXb4AvzRHoADAZADmgiYA-ADqAMB4AQB0gUGEMvW3OERkAYBoAYj2AYF2AcB4AcL0ggHCIBhEAEYDw&sigh=GQ5eQ7PrPbM&label=videoplayfailed402")
> [SGDEX] video.errorCode ==  0 video.errorMsg == failed to create media player

-------------

Thank you.
RokuChris commented 5 years ago

I can't reproduce exactly what you describe, but there is definitely something not right with ads in v1.1. My guess is that it's a regression introduced by the new preloading feature. Ads do work as expected in v1.0. I'll open a ticket internally and we'll get it fixed in the next release.

sujithdb commented 5 years ago

Thanks Chris for the response.

To reproduce the error, I have forked the repo and made the changes. You may clone it from below link and sideload the 2nd sample (2_Basic+Channel) https://github.com/sujithdb/SceneGraphDeveloperExtensions

Notes:

  1. The video is missing only for the 1st Ad play. In case I am playing back to back videos as in a "Comedy" category, the for the rest of the videos plays, the Ad displays without any problem.

  2. In a forum, it was mentioned that there could be a possibility of the VideoPlayer getting initiated twice. Sorry, I was not able to figure it out, but may be you could.

In short, what I feel is that the current sample and RAF version is fine, but somewhere there is a VideoPlayer initializing issue.

Thanks again.