22 April 2015
Category:
Arcade Resource
Comments: 4

How To Integrate Veedi Into MyArcadePlugin

Veedi is a popular way to monetize your gaming website. Veedi works by placing a walkthrough video of the game on your website. You make 70% of the revenue that the video generates through advertisements.

On the forum, there were several users looking to integrate Veedi into their websites, and the solution is rather simple. Veedi can be hooked into either the MyArcadePlugin API to retrieve the game name or it can be called using a native WordPress function. For this tutorial, I will use native WordPress functions but keep in mind that you can use the MyArcadePlugin API.

Example Code

<div class="veediInit"><script type="text/javascript" id="veediInit">
var _v,settings = {
game : "<?php the_title(); ?>", // Game name (Variable)
publisherId : 74654141, // Publisher ID (provided by our side)
onVideoFound : function() {
// perform an action if video found
},
onVideoNotFound : function() {
// perform an action if video NOT found
},
width : 300 // Veedi player width
};
(function(settings) {
var vScript = document.createElement('script');
vScript.type = 'text/javascript';
vScript.async = true;
vScript.src = 'http://www.veedi.com/player/embed/veediEmbed.js';
vScript.onload = function(){
_v = new VeediEmbed(settings);
};
var veedi = document.getElementById('veediInit');
veedi.parentNode.insertBefore(vScript, veedi);
})(settings);
</script></div>

The above code is what I used to implement the code onto my own website. As you can see to call the game name I used the WordPress function <?php the_title(); ?>. Now it will show the correct video on every game.

*Red text is what you replace with your own settings such as the width and the publisher ID*

What About For The API?

The reason that this integration did not use the API was because many of the themes are using different versions of the MyArcadePlugin API and this is the best way to get the player to function properly.

Limitations

Some of the limitations with, this integration is that for users using a language other than English it will not load. The Veedi player will only recognize games with an English title, if you are not an English Website, you will have some issues with this integration.

4 responses on “How To Integrate Veedi Into MyArcadePlugin

  1. wizkiller96 says:

    I know this might sound like a stupid question but I was wondering where would this code be put in at like which file.

  2. mitch says:

    With the changes to wordpress you might realize that Veedi is not working anymore
    Here is the fix at the beginning of the code above ad “” with out the quotes
    and at the end of the code above close with “” with out the quotes

Leave a Reply

Read previous post:
FunGames - Responsive Theme
Lazy Loading and Why You Need It

In version 5.4 of FunGames, we released several changes but the biggest one to note is the fact that the...

Close