Introduction:
Traffic Counter API with Moyea Web Player provides easy-to-use ways to enable its users to count and display how many times a video has been viewed, and let viewers know how popular the video is.
About Moyea Web Player:
Moyea Web Player on playerdiy.com is a Flash video player creator. With it, you can easily make customized Web FLV player with playlist and full screen features for website.
Where Traffic Counter API appears:
After install this plugin, it will appears on the following interface of Moyea Web Player.
http://www.playerdiy.com/images/addons/counter-api1.jpg
The "Traffic Counter API " interface is for choosing a way to get the video data from player
http://www.playerdiy.com/images/addons/counter-api2.jpg
This Traffic Counter API provides two options to get data of video from flash video player: 1. Via JS API; 2. Via URL
If choose to get video data via JS API on the above interface, the API is:
<script>
function mwplayer_counter_callback_func(idx, caption, path, playerid, date) {
alert(idx+'\n'+caption+'\n'+path+'\n'+playerid+'\n'+date);
}
</script>
http://yourdomain.com/webpage?i={index}&c={caption}&p={path}&pi={playerid}&pu={playerurl}&d={date}
<?xml version="1.0" ?> <cross-domain-policy> <allow-access-fromdomain="*" /> </cross-domain-policy>
Configuration: Windows XP Firefox 3.5.4