JavaScript API: removeListener

Method to remove an event listener that was added before


 *Removes an event listener
 *@param eventType One of the events constants found on the JarisFLVPlayer.event object, 
 *or the string "*" to remove every event listener
function removeListener(eventType);

Event types found on the JavaScript.event object:

JarisFLVPlayer.event = {
    MOUSE_HIDE: "onMouseHide", 
    MOUSE_SHOW: "onMouseShow",
    MEDIA_INITIALIZED: "onDataInitialized",
    BUFFERING: "onBuffering",
    NOT_BUFFERING: "onNotBuffering",
    RESIZE: "onResize",
    PLAY_PAUSE: "onPlayPause",
    PLAYBACK_FINISHED: "onPlaybackFinished",
    CONNECTION_FAILED: "onConnectionFailed",
    ASPECT_RATIO: "onAspectRatio",
    VOLUME_UP: "onVolumeUp",
    VOLUME_DOWN: "onVolumeDown",
    VOLUME_CHANGE: "onVolumeChange",
    MUTE: "onMute",
    TIME: "onTimeUpdate",
    PROGRESS: "onProgress",
    SEEK: "onSeek",
    ON_ALL: "on*"


//Triggers for every event. The data parameter holds some useful data passed by the player.
function onAll(data){
    alert("called once");

    //Remove itself as an event listener

//Initialize the interface
player = new JarisFLVPlayer("Id_Of_Player_Object");

//Adds a catch all event listener
player.addListener(JarisFLVPlayer.event.ON_ALL, "onAll");

//Start playback;
Fork me on GitHub