
Get playlist MediaID from GetState function
I want to set up something to keep track of users video views. The videos are set up in a playlist with a MediaID which happens to be the database VideoID.
bc.. <script type='text/javascript'>
function GetState(obj) {
curState = obj.newstate;
if(curState == "PLAYING"){
// Send video id to the database
}
}
jwplayer('mediaplayer').setup({
"flashplayer": "player.swf",
playlist: [{mediaid: 8,image: '/images/trainingcover.png',file: '/videos/test.mp4',title: 'Test Video'}],
"playlist.position": "bottom",
"playlist.size": 250,
"width": 670,
"height": 650,
"controlbar": {
"position": "bottom"
}
});
</script>
Whats the best way to do this?