Guest User

Untitled

a guest
Jun 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. package com.soundcloud.player.api {
  2. import flash.events.Event;
  3.  
  4. /**
  5. * @author matas
  6. */
  7. public class PlayerAPIEvent extends Event {
  8. private var _data : Object;
  9.  
  10. //onPlayerReady an event fired when the player is ready for playback
  11. public static const READY : String = 'onPlayerReady';
  12. // onPlayerUnload should trigger when the page containing the player is closed (experimental)
  13. public static const UNLOAD : String = "onPlayerUnload";
  14. //onMediaStart an event fired when the currently loaded song begins playback
  15. public static const START : String = 'onMediaStart';
  16. //onMediaEnd an event fired when the currently loaded song ends playback
  17. public static const END : String = 'onMediaEnd';
  18. //onMediaPause an event fired when the currently loaded song pause playback
  19. public static const PAUSE : String = 'onMediaPause';
  20. //onMediaPause an event fired when the currently loaded song starts/resumes playback
  21. public static const PLAY : String = 'onMediaPlay';
  22. //onMediaStop an event fired when the currently loaded song stops playback
  23. public static const STOP : String = 'onMediaStop';
  24. //onMediaBuffering an event fired when the currently loaded song buffers
  25. public static const BUFFERING : String = 'onMediaBuffering';
  26. //onMediaDoneBuffering an event fired when the currently loaded song is done buffering
  27. public static const BUFFERING_DONE : String = 'onMediaDoneBuffering';
  28. //onPlayerError an event fired when the player couldn't load the resource from player (track removed, disabled, hidden, etc.)
  29. public static const NOT_FOUND : String = "onPlayerError";
  30. //onMediaSeek an event fired when the user changes playing position in currently loaded song
  31. public static const SEEK : String = "onMediaSeek";
  32.  
  33. public function PlayerAPIEvent(type : String, bubbles : Boolean = true, cancelable : Boolean = false, data : Object = null) {
  34. super(type, bubbles, cancelable);
  35. _data = data;
  36. }
  37.  
  38. public function get data() : Object {
  39. return _data;
  40. }
  41. }
  42. }
Add Comment
Please, Sign In to add comment