Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function updatePlayer(hash){
- if (typeof(hash.url) == 'undefined'){
- //console.log('You MUST give a URL Man!');
- }else{
- hash.onBeforeBegin = typeof(hash.onBeforeBegin) != 'undefined' ? hash.onBeforeBegin : false;
- hash.onBegin = typeof(hash.onBegin) != 'undefined' ? hash.onBegin : false;
- hash.onBeforeFinish = typeof(hash.onBeforeFinish) != 'undefined' ? hash.onBeforeFinish : false;
- hash.onFinish = typeof(hash.onFinish) != 'undefined' ? hash.onFinish : false;
- hash.onCuePoint = typeof(hash.onCuePoint) != 'undefined' ? hash.onCuePoint : false;
- hash.autoPlay = typeof(hash.autoPlay) != 'undefined' ? hash.autoPlay : false;
- //console.log(hash);
- $('#player').html(flowplayer("player", "./flowplayer.swf",{debug:true, clip:
- {url:hash.url,
- autoPlay:hash.autoPlay,
- autoBuffering: true,
- onBeforeBegin: hash.onBeforeBegin,
- onBegin:hash.onBegin,
- onBeforeFinish:hash.onBeforeFinish,
- onFinish: hash.onFinish,
- onCuepoint: hash.onCuePoint
- } }));
- }
- }
Add Comment
Please, Sign In to add comment