Change Cue Start Time in Popcorn.js?

I need to change the Cue point in a video using Popcorn.js. Is there a way to edit the time of a Cue event already sent to it by a Popcorn player using the Cue () method?

Thank!

+3
source share
1 answer
var events = Popcorn.getTrackEvents();
for (var e in events) {
  Popcorn.removeTrackEvent(events[e]._id);
}
Popcorn.cue(newTime, newFunction);

This is not really an event editing, but it works fine for me - I need to replace everything and then play the video again.

There is also getTrackEvent (obj, id) and getLastTrackEventId (obj) - you can handle each event separately (I have not tested it).

It seems that it will be implemented in the new version 1.3

+3
source