The Event Listeners included in FLV Player allow you to track whenever important events within NetStatus call, playback controls, and other user interactions occur.
NetStream Event Listeners
Video Playback Event Listeners
Other FLV Player Event Listeners
NetStream Event Listeners
Event:
FlvPlayerEvent.NS_CONNECT_SUCCESS
Description:
Dispatched when NetConnection is successfully connected.
Usage:
myVideo.addEventListener(FlvPlayerEvent.NS_CONNECT_SUCCESS, onNsConnectSuccess);
Event:
FlvPlayerEvent.NS_PLAY_STREAMNOTFOUND
Description:
Dispatched when NetConnection is unsuccessfully connected.
Usage:
myVideo.addEventListener(FlvPlayerEvent.NS_PLAY_STREAMNOTFOUND, onNsPlayStreamnotfound);
Event:
FlvPlayerEvent.NS_PLAY_START
Description:
Dispatched when NetConnection has started playing.
Usage:
myVideo.addEventListener(FlvPlayerEvent.NS_PLAY_START, onPlayStart);
Event:
FlvPlayerEvent.NS_PLAY_STOPPED
Description:
Dispatched when NetConnection has stopped playing or has completed playing.
Usage:
myVideo.addEventListener(FlvPlayerEvent.NS_PLAY_STOPPED, onNsPlayStopped);
Event:
FlvPlayerEvent.NS_BUFFER_EMPTY
Description:
Dispatched when NetConnection buffer is empty.
Usage:
myVideo.addEventListener(FlvPlayerEvent.NS_BUFFER_EMPTY, onBufferEmpty);
Event:
FlvPlayerEvent.NS_BUFFER_FULL
Description:
Dispatched when NetConnection buffer is full.
Usage:
myVideo.addEventListener(FlvPlayerEvent.NS_BUFFER_FULL, onBufferFull);
Video Playback Event Listeners
Event:
FlvPlayerEvent.VIDEO_PLAY
Description:
Dispatched when a video starts playing.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_PLAY, onVidPlay);
Event:
FlvPlayerEvent.VIDEO_REPLAY
Description:
Dispatched when a video is replayed.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_REPLAY, onVidReplay);
Event:
FlvPlayerEvent.VIDEO_STOP
Description:
Dispatched when a video is stopped.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_STOP, onVidStop);
Event:
FlvPlayerEvent.VIDEO_PAUSED
Description:
Dispatched when a video is paused.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_PAUSED, onVidPaused);
Event:
FlvPlayerEvent.VIDEO_PREVIOUS
Description:
Dispatched when a user goes to the previous video.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_PREVIOUS, onVidPrevious);
Event:
FlvPlayerEvent.VIDEO_NEXT
Description:
Dispatched when a user goes to the next video.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_NEXT, onVidNext);
Event:
FlvPlayerEvent.VIDEO_SEEK
Description:
Dispatched when a user seeks within a video. Returns current video time.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_SEEK, onVidSeek);
Event:
FlvPlayerEvent.VIDEO_LOGO_CLICK
Description:
Dispatched when a user clicks on a custom logo.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_LOGO_CLICK, onVidLogoClick);
Event:
FlvPlayerEvent.PLAYHEADUPDATE
Description:
Dispatched every 0.25 seconds during playback. Returns current video time.
Usage:
myVideo.addEventListener(FlvPlayerEvent.PLAYHEADUPDATE, onPlayHeadUpdate);
Other FLV Player Event Listeners
Event:
FlvPlayerEvent.VIDEO_INFO_OPEN
Description:
Dispatched when the information window is opened.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_INFO_OPEN, onVidInfoOpen);
Event:
FlvPlayerEvent.VIDEO_INFO_CLOSE
Description:
Dispatched when the information window is closed.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_INFO_CLOSE, onVidInfoClose);
Event:
FlvPlayerEvent.VIDEO_MENU_OPEN
Description:
Dispatched when the menu is opened.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_MENU_OPEN, onVidMenuOpen);
Event:
FlvPlayerEvent.VIDEO_MENU_CLOSE
Description:
Dispatched when the menu is closed.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_MENU_CLOSE, onVidMenuClose);
Event:
FlvPlayerEvent.VIDEO_CC_OPEN
Description:
Dispatched when the closed captions are opened.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_CC_OPEN, onVidCcOpen);
Event:
FlvPlayerEvent.VIDEO_CC_CLOSE
Description:
Dispatched when the closed captions are closed.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_CC_CLOSE, onVidCcClose);
Event:
FlvPlayerEvent.VIDEO_VOLUME_ON
Description:
Dispatched when the volume is turned on.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_VOLUME_ON, onVidVolumeOn);
Event:
FlvPlayerEvent.VIDEO_VOLUME_OFF
Description:
Dispatched when the volume is turned off.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_VOLUME_OFF, onVidVolumeOff);
Event:
FlvPlayerEvent.VIDEO_FULLSCREEN_ON
Description:
Dispatched when fullscreen is active.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_FULLSCREEN_ON, onVidFullscreenOn);
Event:
FlvPlayerEvent.VIDEO_FULLSCREEN_OFF
Description:
Dispatched when fullscreen is inactive.
Usage:
myVideo.addEventListener(FlvPlayerEvent.VIDEO_FULLSCREEN_OFF, onVidFullscreenOff);