contently / videojs-annotation-comments

A plugin for video.js to add support for timeline moment/range comments and annotations
https://contently.github.io/videojs-annotation-comments/
Other
170 stars 50 forks source link

Ability to update annotations from state object (onStateChanged) - emitStateChangeEvent #71

Open lifeart opened 4 years ago

lifeart commented 4 years ago

We have listener

// onStateChanged: Fired when plugin state has changed (annotation added, removed, etc) // This is a way to watch global plugin state, as an alternative to watching various annotation events

plugin.registerListener('onStateChanged', (event) => { // event.detail = annotation state data });

Currently there is no alternatives for this event in emitters api, it may be tricky to roll updated state using atomic operations. And it will be great to allow full rerender just passing new state data into some event emitter.

iamshouvikmitra commented 3 years ago

Any luck figuring this out @lifeart ? Even I want to re-initialize the plugin with new data when a new comment/annotation is received from the backend api.

lifeart commented 2 years ago

Hi @iamshouvikmitra nope (