Created
May 2, 2012 08:46
-
-
Save we4tech/2575202 to your computer and use it in GitHub Desktop.
Spring Score Integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SpringAnalyticsJS = { | |
sensors: new SpringStreams("dbstream") | |
, screenX: 0 | |
, screenY: 0 | |
, duration: 0 | |
, position: 0 | |
, streamName: null | |
, uid: "test" + (new Date().getTime() * 10000 * Math.random()) | |
, set: function(key, value) { | |
SpringAnalyticsJS[key] = value; | |
} | |
, videoAdapter: { | |
"getMeta": function(id) { | |
return { | |
"pl" :"Multi Stream Player" | |
, "plv" :"0.6" | |
, "sx" : SpringAnalyticsJS.screenX | |
, "sy" : SpringAnalyticsJS.screenY | |
} | |
} | |
, "getDuration": function(id) { return SpringAnalyticsJS.duration; } | |
, "getPosition": function(id) { return SpringAnalyticsJS.position; } | |
}, | |
track: function() { | |
SpringAnalyticsJS.sensors.debug('Tracking - ' + SpringAnalyticsJS.streamName); | |
if (SpringAnalyticsJS.streamName != null) { | |
SpringAnalyticsJS.sensors.track( | |
SpringAnalyticsJS.uid, { | |
"stream": SpringAnalyticsJS.streamName | |
}, SpringAnalyticsJS.videoAdapter); | |
} | |
} | |
}; | |
SpringAnalyticsJS.sensors.debug = function(v) { | |
if ('undefined' != typeof(console)) | |
console.log(v); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment