Rewarded Video AdMob for Cocoon (Plugins)

Discuss Scirra's 2D Asset Store

Post » Sat Jun 17, 2017 1:16 pm

GoodOldGames wrote:Hi Toby, thank you for your prompt reply. I have figured out the reason and now the video is able to be shown. It was due to Admob filtering settings.

Regarding the error message, it was shown whenever I tried to initiate the C2 "Run Layout" function:

Javascript error!
Uncaught TypeError: Cannot read property "load" of undefined http://localhost:50000/CocoonRewardedVideo_plugin.js, line 151 (col31)

Not sure if this is related to what you have mentioned above?

Kind Regards,

Paul


Hi Paul,

Glad to hear everything works fine for you now. Yes the JS error is exactly what I was talking about. The library is attached during wrapping on Cocoon server, which means it's not available in the preview on PC.

The quickest solution is to add condition that checks if the project runs on PC or mobile and trigger "load" action only when it's on mobile as in the example below:
Image
ImageImage
B
27
S
16
G
68
Posts: 934
Reputation: 38,577

Post » Sat Jun 17, 2017 2:40 pm

BackendFreak wrote:
Hi @Hardty,

The condition you mention is there already
Image

It triggers once the video is preloaded. If this is not what you need, then please explain in more details and I'll try to add it ASAP.

Yes I know that condition, but it can't used in a Triggered sub event, I want to use this plugin as an alternative of rewarded ads if Unity Ads didnt loaded.
It seems like this :
On button click >
UnityAds is loaded > Play unity Ads
else > play Admob Ads
~Everyone can make GAMEs~
B
54
S
10
G
1
Posts: 411
Reputation: 5,655

Post » Sat Jun 17, 2017 7:36 pm

I'm not quite sure if I understand what you need exactly but if you want to be able to trigger the video under else condition than you can use a variable to indicate if the video is loaded or not as on the example below.
Image
ImageImage
B
27
S
16
G
68
Posts: 934
Reputation: 38,577

Post » Sun Jun 18, 2017 8:18 pm

I've just uploaded version 1.1 to store (will take up to few days to be approved to store I guess).

Added Is video loaded condition which returns true if video is preloaded and ready to show, or false if it's not ready yet.

Image

This will simplify the process I mentioned in previous post, so no variable is needed any more.
ImageImage
B
27
S
16
G
68
Posts: 934
Reputation: 38,577

Post » Mon Jun 19, 2017 5:03 am

BackendFreak wrote:I've just uploaded version 1.1 to store (will take up to few days to be approved to store I guess).

Added Is video loaded condition which returns true if video is preloaded and ready to show, or false if it's not ready yet.

Image

This will simplify the process I mentioned in previous post, so no variable is needed any more.

Aha! That what I mean! :D Thank you! :mrgreen:
~Everyone can make GAMEs~
B
54
S
10
G
1
Posts: 411
Reputation: 5,655

Previous

Return to Scirra Store

Who is online

Users browsing this forum: No registered users and 0 guests