Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.soundcloud.player.api {
- import flash.events.Event;
- /**
- * @author matas
- */
- public class PlayerAPIEvent extends Event {
- private var _data : Object;
- //onPlayerReady an event fired when the player is ready for playback
- public static const READY : String = 'onPlayerReady';
- // onPlayerUnload should trigger when the page containing the player is closed (experimental)
- public static const UNLOAD : String = "onPlayerUnload";
- //onMediaStart an event fired when the currently loaded song begins playback
- public static const START : String = 'onMediaStart';
- //onMediaEnd an event fired when the currently loaded song ends playback
- public static const END : String = 'onMediaEnd';
- //onMediaPause an event fired when the currently loaded song pause playback
- public static const PAUSE : String = 'onMediaPause';
- //onMediaPause an event fired when the currently loaded song starts/resumes playback
- public static const PLAY : String = 'onMediaPlay';
- //onMediaStop an event fired when the currently loaded song stops playback
- public static const STOP : String = 'onMediaStop';
- //onMediaBuffering an event fired when the currently loaded song buffers
- public static const BUFFERING : String = 'onMediaBuffering';
- //onMediaDoneBuffering an event fired when the currently loaded song is done buffering
- public static const BUFFERING_DONE : String = 'onMediaDoneBuffering';
- //onPlayerError an event fired when the player couldn't load the resource from player (track removed, disabled, hidden, etc.)
- public static const NOT_FOUND : String = "onPlayerError";
- //onMediaSeek an event fired when the user changes playing position in currently loaded song
- public static const SEEK : String = "onMediaSeek";
- public function PlayerAPIEvent(type : String, bubbles : Boolean = true, cancelable : Boolean = false, data : Object = null) {
- super(type, bubbles, cancelable);
- _data = data;
- }
- public function get data() : Object {
- return _data;
- }
- }
- }
Add Comment
Please, Sign In to add comment