
To use these events, be sure to specify a callback handler through
the "eh" parameter: so.addVariable('eh',
'myCallbackEventHandler');
The callback handler must take two parameters, first is the event type (pType) and the second is an information object about that event (pItem):
pTypes:
init - thrown when player is ready to receive commands
itemBegin - when any individual video stream ( STREAM) begins playing.
itemEnd - when any individual video stream ( STREAM) ends.
itemPause - when any individual video stream is paused
sequenceEnd - when the requested content ends.
done - when all clips have finished playing
userClick - when a user click on clicks on playback components w/in the post panel
close - when a user clicks the close button (closeEnable must be set for display - see above)
pItem values:
default: {clipItem}
userClick: { clipId: [clipId], clickPosition: "UpNext_Play/WatchNow" || "UpNext_Play/WatchAgain" || "UpNext_CountdownComplete" || "UpNext_CountdownPause" || "UpNext_CountdownResume" || "UpNext_Previous" || "UpNext_Next" || "UpNext_Play/MoreVideos" || "UpNext_LinkOut" }
Example Callback Function
y_up_eventHandler = function( pType, pItem ) {
switch (pType){
case "init": // thrown when the player has been initialized and the flash external API is ready to be accessed
case "itemBegin": // thrown when a video starts playing for the first time
case "itemEnd": // thrown when a video has played for its total duration
case "done": // thrown when all videos have played
case "streamPlay": // thrown anytime a video begins to play
case "streamPause": // thrown when vidPause() is requested and completed
case "streamStop": // thrown when playback has stopped for whatever reason (not the same as itemEnd)
case "streamError": // thrown when an error occurs with the stream
case "userClick": // thrown when a user click on clicks on playback compoents w/i the post panel
break;
}
}