JamendoPlayer.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. function JamendoPlayer(ref_id, object_for_player, finish_callback)
  2. {
  3. var _ref_id = ref_id;
  4. var _object_for_player = object_for_player;
  5. var _player = null;
  6. var _finish_callback = finish_callback;
  7. this.play = function(play_callback)
  8. {
  9. _player = new GenericStreamingPlayer(_ref_id, _object_for_player,
  10. event_play,
  11. event_end,
  12. event_error,
  13. event_finish_playlist);
  14. _player.create_player(play_callback);
  15. }
  16. var event_play = function()
  17. {
  18. }
  19. var event_end = function()
  20. {
  21. }
  22. var event_error = function()
  23. {
  24. _finish_callback();
  25. }
  26. var event_finish_playlist = function()
  27. {
  28. _finish_callback();
  29. }
  30. this.stop = function()
  31. {
  32. _player.stop();
  33. }
  34. this.pause = function()
  35. {
  36. _player.pause();
  37. }
  38. this.destroy = function()
  39. {
  40. _player.destroy();
  41. }
  42. this.stopAndDestroy = function()
  43. {
  44. this.stop();
  45. this.destroy();
  46. }
  47. this.close = function()
  48. {
  49. this.stopAndDestroy();
  50. }
  51. this.enableFullScreen = function() {
  52. }
  53. this.disableFullScreen = function() {
  54. }
  55. }