Moyea Web Player Pro Tutorial

- Summary for the events of the Player object

Event Summary
onPlayPausePress Play button or pause button is pressed
onReplayPress Replay button is pressed
onStopPress Stop button is pressed
onProcBarDragStart User starts to drag the process bar
onProcBarDragging User is dragging the process bar
During the action of dragging, such event can be triggered many times
onProcBarDragEnd User stop dragging the process bar
onMuteSwitch Mute button is pressed
onPlayStart Control bar is initialized, and ready to play
Such event is only triggered for the first time of loading, other moments like replaying won't trigger such event
onMetaData FLV with metadata will trigger such event when loading; the event object data info may include:
info.duration: the duration of the video
info.width: the width of the video
info.height: the height of the video
info.videocodecid: the codec ID for the video
Video Codec ID possible value:
2: Sorenson H.263
3: Screen video
4: VP6
5: VP6 with alpha
6: Screen Video V2
info.audiocodecid: the codec ID for the audio
Audio Codec ID possible value:
0 = uncompressed
1 = ADPCM
2 = MP3
5 = Nellymoser 8kHz mono
6 = Nellymoser
info.canSeekToEnd: to see if the last frame is a keyframe
info.lasttimestamp: the time stamp for the last frame
info.videodatarate: the data rate for the video
info.audiodatarate: the data rate for the audio
info.metadatacreator: the creator of metadata
info.cuePoints: the Cue Point list
onPlaying Triggered many times when playing
onPlayEnd Triggered when finishing playing
onBufferEmpty Triggered when buffer is empty
Valid to type b file
onBufferFull Triggered when buffer is full
Valid to type b file
onCuePoint Cue Point Event
the event object datainfo includes:
info.name: the name of Cue Point
info.type: the type of Cue Point, event or navigation
info.time: the time for Cue Point
info.parameters["param_name"]: the parameters of Cue Point;
param_name: the name for the parameters settings when encoding


Frequently Asked Questions (FAQ)