If you use a player in Adobe Flash to publish your videos, you can install ShinyStat Video Analytics to analyze your multimedia content

ShinyStat Video Analytics offers two versions depending on your needs:

  • Javascript version – ideal for:
    – JavaScript, Flash and Silverlight players
    – Players with different technologies
    – Embedding the player within an iFrame
  • Adobe Flash version – ideal for:
    – Players using only Adobe Flash technology.
    – The plugin is downloaded from any domain featuring an embedded player.
    – Also ideal for those sites developed using Flash but which need internal video.

If you have the source code of your player, you can configure the Video Analytics in a few steps .
Above all, the video player must be developed in Action Script 3.0.
Once this is verified, just follow these steps:

Open the source code of the video player and call the plugin as follows:

import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.net.URLRequest;
import flash.events.*;
import flash.system.Security;var _shLdr:Loader = new Loader();
var _shLdrSWF:Object;
var _shLdrInfo:LoaderInfo;
var _swfOBJ:String;
var idEmb:String = root.loaderInfo.parameters.idE;
var USER:String = root.loaderInfo.parameters.USER;
var titoloVideo:String = “TITOLO VIDEO”function _loadStat() {
_shLdr.contentLoaderInfo.addEventListener(Event.COMPLETE,_statLOAD); _shLdr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, noShinyStatConnection);
_shLdr.load(new URLRequest(“http://codicefl.shinystat.com/cgi-bin/getswf.cgi?idE=”+idEmb+”&us=”+USER+”&TYPE=101&RN=”+Math.random()*2147483647));
_swfOBJ = this.loaderInfo.url;
function callLoadVideo() {
function _statLOAD(e:Event):void {
_shLdrInfo = e.target as LoaderInfo;
_shLdrSWF = _shLdrInfo.content;
function noShinyStatConnection(e:IOErrorEvent) {
//funzione di gestione errore download Plugin

– The code you have just entered returns a plugin with the following API to the video player:

setupPlugin(callLoadVideo:Function , idEmb:String , USER:String , _swfOBJ:String)
Absolute first call when the plugin is loaded in the video Player.
The passed parameters include:
– the name of the callBack function, the user has defined, that the plugin will have to invoke upon download from the ShinyStat server
– the id of the tag object that contains the video player on the page
– the username of the ShinyStat account
– the absolute URL of the video player

loadVideoAnalytics(urlV:String , titoloVideo:String, idVideo:String, Categoria:int)
Function to be invoked into the callBack function present in the video player.
Mandatory parameters:
urlVideo: name of the video file, it can be absolute or relative titoloVideo: title to be assigned to the video to easily identify it in the reports.

Optional parameters:
** idVideo: unique ID of the video
Category: unique ID of the video category

Note: **If the video don’t have a unique ID, it is necessary to pass the string “noID” to the plugin.

Function to be invoked at every PLAY event of the video.
The parameter videoLength: indicates the total length of the running video expressed in milliseconds

Function to be called on video stop or pause, in order to stop the statistics counting the viewings.

Note: at the end of the video, this function must always be invoked.

Function to be invoked after dragging the viewing bar of the video player.
The parameter to be passed to the function is the very instant where the video is repositioned (in milliseconds).

Note: At the end of the video, the function must always be invoked with currentTime=0

– It is compulsory that the embed HTML code of the video player includes the following variables to ensure proper functioning of the plugin (the variables are highlighted in bold)

<object width=”640″ height=”397″ type=”application/x-shockwave-flash” data=”VideoPlayer..swf” id=”ID_OBJECT” name=”ID_OBJECT“>
<param name=”movie” value=”VideoPlayer.swf”/>
<param name=”allowscriptaccess” value=”always“/>
<param name=”allowfullscreen” value=”true”/>
<param name=”flashvars” value=”idE=ID_OBJECT&USER=USER_SHINYSTAT“/>

idE = unique id of the tag object that contains the video player.
USER = name of the ShinyStat account (Business or Pro) showing reports about the video.

For Adobe Flash playlists, you must re-initialise a new plugin following the same procedure and remove the old one.