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

$ is not defined #76

Open tarsusi opened 3 years ago

tarsusi commented 3 years ago

Hi,

I have tried to use this plugin but I could not start the basic example. You can see my project here

On the console window, you will see the error I am getting.

What is the problem here?

Thanks

jamesconant commented 3 years ago

VIDEOJS: ERROR: ReferenceError: $ is not defined would suggest to me that JQuery is required but not loaded and available.

liyangguang commented 3 years ago

Here - https://github.com/contently/videojs-annotation-comments/blob/master/src/js/index.js, it expects jQuery in global.

So I have to include a jquery script tag in my index.html.

Also, you need to add import '@contently/videojs-annotation-comments/build/css/annotations.css'; for proper styles.