
onCuePoint
Description
This event occurs for each cue point at the timestamp of the cue point.
Cue Points are completely compatible with Flash 8 Video Encoder cue points. There's no additional event that lists all cue points (like onMarkerList for Markers), a list of cue points is inserted to onMetaData event (as Flash 8 Video Encoder does).
Parameters
info (Object)
The info object has four properties:
- name (String): The name given to the cue point.
- time (Number): The timestamp of the cue point.
- type (String): The type of cue point, either 'navigation' or 'event'.
A 'navigation' cue point specifies a keyframe and is often used to let users navigate through the video file. An 'event' cue point is specified by time, whether or not that time corresponds to a specific keyframe, and can be used to trigger other application events.
Note: Captionate lets you change the type of cue points freely whether the cue point is at a key frame or not. When cue points are placed before the encoding, the encoder will make sure frames for Navigation cue points are key frames. With Captionate, the type is simply a string property. If you will be relying on the type value, you need to manually make sure Navigation cue points are at key frames and can be seeked.
- parameters (Object): An associative array of name:value pair strings specified for this cue point. Any valid string can be used for the parameter name or value.
Example
nets.onCuePoint = function(info){
trace('onCuePoint event at '+nets.time);
trace(' Name: "'+info.name+'"');
trace(' Time: "'+info.time+'"');
trace(' Type: "'+info.type+'"');
if (info.parameters != undefined){
trace(' Parameters: ');
for (paramName in info.parameters){
trace(' "'+paramName+'" = "'+info.parameters[paramName]+'"');
}
}
}
See also
onMetaData