Guest User

Untitled

a guest
Jan 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. function updatePlayer(hash){
  2. if (typeof(hash.url) == 'undefined'){
  3. //console.log('You MUST give a URL Man!');
  4. }else{
  5. hash.onBeforeBegin = typeof(hash.onBeforeBegin) != 'undefined' ? hash.onBeforeBegin : false;
  6. hash.onBegin = typeof(hash.onBegin) != 'undefined' ? hash.onBegin : false;
  7. hash.onBeforeFinish = typeof(hash.onBeforeFinish) != 'undefined' ? hash.onBeforeFinish : false;
  8. hash.onFinish = typeof(hash.onFinish) != 'undefined' ? hash.onFinish : false;
  9. hash.onCuePoint = typeof(hash.onCuePoint) != 'undefined' ? hash.onCuePoint : false;
  10. hash.autoPlay = typeof(hash.autoPlay) != 'undefined' ? hash.autoPlay : false;
  11. //console.log(hash);
  12. $('#player').html(flowplayer("player", "./flowplayer.swf",{debug:true, clip:
  13. {url:hash.url,
  14. autoPlay:hash.autoPlay,
  15. autoBuffering: true,
  16. onBeforeBegin: hash.onBeforeBegin,
  17. onBegin:hash.onBegin,
  18. onBeforeFinish:hash.onBeforeFinish,
  19. onFinish: hash.onFinish,
  20. onCuepoint: hash.onCuePoint
  21. } }));
  22.  
  23. }
  24. }
Add Comment
Please, Sign In to add comment