removeTrackEvent is fine for external use, it is just addTrackEvent that is
suggested against using. It is best to add a track event using the
constructing function of popcorn.yourtrackevent(options).
In order to remove it, you need a reference to the track event. Easiest way
to do this is getLastTrackEventId, but that's not the greatest when you're
dealing with a lot of track events.
You can create track events with your own ids, by passing the id in first.
popcorn.browsercastCell( id, {start: 1, end: 10})
Updating is possible, by calling popcorn.browsercastCell( id, {start: 1,
end: 10}) on an existing id. Instead of creating a new track event, it
updates the one registered under that id.
This removes and adds the track event again by default. If the plugin has
an _update function, it'll instead call that update function.
_update(trackEvent, newOptions)
This can let the plugin author do the heavy lifting as to what an update
means, allowing them to not do a complete teardown.
Feel free to let me know if you have any problems with any of these.
> _______________________________________________
> dev-popcorn mailing list
>
dev-p...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/dev-popcorn
>