Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Call or assign cue points with JS API?


I see nothing in the API regarding cuepoints. I know you can scrub or jump x amount of seconds but what about calling up cue points that are embedded within the FLV or assigned via a JS function or something? Please advise, thanks!

9 Community Answers

JW Player

User  
0 rated :

We are very interested in using cuepoint events. Is there a possibility of seeing this in JW Player in the near future?

JeroenW

JW Player Support Agent  
0 rated :

Any cuepoints are already broadcasted from the player through the ‘META’ event of the Model. There’s no way to lookup cuepoints in advance though. When a cuepoint is ‘hit’ the FLV sends the cue info to the player. It seems like this data isn’t available in advance.

If you have a specific video with cuepoints I’d like to test this. Please send the URL to me! mail [at] jeroenwijering [dot] com

JW Player

User  
0 rated :

How about cue points for Mp4?

JW Player

User  
0 rated :

With the version 4 the cuepoint is been send twice if no skin is set. When we set a skin it works great. The same is valid for state COMPLETED.
Is there any work around for this, other then always have a skin set?

JW Player

User  
0 rated :

Actually the cuePoints are broadcasted in a property named 'cuePoints' from the META event. This property is an array whose length matches the numer of cuepoints.
I can't get to introspect the structure of this array though.
If anyone knows it, I'd be glad to get the information.

Another path to get the cuePoint information is the xmp metadata embeded in the flv file (since flash 10 media encoder I think). There i can see the full information related to cuePoints :

<xmpDM:Tracks>
<rdf:Bag>
<rdf:li>
<rdf:Description
xmpDM:trackName="AME Markers"
xmpDM:frameRate="f254016000000">
<xmpDM:markers>
<rdf:Seq>
<rdf:li
xmpDM:startTime="91452449088000"
xmpDM:name="Dliberation n1"
xmpDM:type="FLVCuePoint"
xmpDM:cuePointType="Event"/>
<rdf:li
xmpDM:startTime="475010292556800"
xmpDM:name="Dliberation n3"
xmpDM:type="FLVCuePoint"
xmpDM:cuePointType="Event"/>
xmpDM:cuePointType="Event"/>
</rdf:Seq>
</xmpDM:markers>
</rdf:Description>
</rdf:li>
</rdf:Bag>
</xmpDM:Tracks>

JW Player

User  
0 rated :

Thanks a lot Trixie. I have just sorted it out too.

To make it short for others, here is a simple code snipet that will let you exploit cuepoints :

public function initializePlugin(vie:AbstractView):void {
view = vie;
view.addModelListener(ModelEvent.META,metaHandler);
};

private function metaHandler(evt:ModelEvent):void {
if(evt.data.cuePoints != null){
for each(var cuePoint:* in evt.data.cuePoints){
Logger.log('name='+cuePoint.name,'Cuepoints');
Logger.log('time='+cuePoint.time,'Cuepoints');
Logger.log('type='+cuePoint.type,'Cuepoints');
}
}
}

Notice this code is actionscript though, not javascript. I have somewhat trolled this topic (sorry).

JW Player

User  
0 rated :

very nice!

so did you add this to an existing plugin so you can do something on the CuePoints or did you make a new plugin?

either way, would you please post the full source?

i'd like to make a complete plugin that performs an action (display image or text, etc.) on CuePoints

also, how do you add your CuePoints

i made some PHP to create and inject the xmp object, but maybe some encoders can also make the CuePoints???

JW Player

User  
0 rated :

see: *http://www.longtailvideo.com/support/forum/JavaScript-Interaction/18865/metadata-to-javascript#msg128275*

also see: *http://www.longtailvideo.com/jw/?search=cuepoints*

Test Pages: *http://willswonders.myip.org:8074/Simple_CuePoints.html*
*http://willswonders.myip.org:8074/Simple_SlideShow_CuePoints.html*

the Test Page that uses directly extracted PowerPoint slides is broken and i don't have time to fix it

JW Player

User  
0 rated :

Please, I need someone to explain me how to use the cuepoints.
I have a flv file with cuepoints, and I'd like use it with jw.

thanks
erzo

This question has received the maximum number of answers.