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
171 stars 50 forks source link

Ability to edit an existing comment #48

Closed Natkeeran closed 4 years ago

Natkeeran commented 5 years ago

Currently one cannot edit the text of an existing comment. Also, one cannot change the shape or range via UI. Is this intentional? If that is the case, what is the purpose of the following event addingAnnotationDataChanged.

jackpope commented 5 years ago

There is not currently any functionality around editing comments/shapes/ranges. We have not yet had any requests from users regarding doing this. Our use case doesn't include the UI so we edit comments in a separate system and don't display them within the plugin.

The addingAnnotationDataChanged event allows you to update the annotation data as you are creating one. So you can enter annotation mode, click to draw your shapes and set ranges. As you are changing shapes and ranges, this event is firing to update an external comment form with your data in hidden inputs.

I'm happy to help push through any PRs around editing functionality. Let me know if you have any other questions.

dstone commented 4 years ago

Edit: This can probably be disregarded. Reverting to npm v6.2.0 & node v10.8.0 have mostly resolved this.

Are there any further instructions for building? When I follow the instructions in the doc, I get the following error running gulp build:

fs.js:25 'use strict'; ^

ReferenceError: internalBinding is not defined at fs.js:25:1 at req_ (/Users/dstone/src/videojs-annotation-comments/node_modules/natives/index.js:137:5) at Object.req [as require] (/Users/dstone/src/videojs-annotation-comments/node_modules/natives/index.js:54:10) at Object. (/Users/dstone/src/videojs-annotation-comments/node_modules/graceful-fs/fs.js:1:37) ...

Installing the natives package prevents this particular error, but gulp seems to hang on the transpile task:

$ gulp transpile [10:38:28] Using gulpfile ~/src/videojs-annotation-comments/gulpfile.js [10:38:28] Starting 'transpile'... [10:38:28] Finished 'transpile' after 27 ms

The Finished message is shown, but the task never completes nor are any files created in build/.

All other tasks (apart from build) appear to work correctly.

I'm running npm v6.11.3, node v11.12.0.

jackpope commented 4 years ago

I'm going to close this issue as it seems to be resolved and the build issues should be taken care of in the upcoming https://github.com/contently/videojs-annotation-comments/pull/49