如何使用javascript进行视频注释? [英] How to do video annotations using javascript?
问题描述
我的问题是如何使用youtube进行视频注释,但在文件html中使用我自己的视频,使用javascript。注释会像链接一样,也只是文本。并且可以将注释放在视频中的任何位置。
谢谢
My question is how to do video annotations like youtube, but in the file html with my own video, using javascript. The annotations wolud like be links and also text only. And can put the annotation anywhere in the video. Thanks
推荐答案
我相信你可能正在寻找这个库: https://github.com/contently/videojs-annotation-comments
I believe you may be looking for this library: https://github.com/contently/videojs-annotation-comments
从github页面可以给出提示如何使用它的用法:
From the github page the usage which may give you hint how to use it:
plugin.fire('newAnnotation', {
id: 1,
range: { start: 20, end: null },
shape: { // NOTE - x/y vals are % based (Floats) in video, not pixel values
x1: null,
x2: null,
y1: null,
y2: null
}
commentStr: "This is my comment." // THIS DATA YOU NEED TO FILL
});
此外,对于类似YouTube的注释,您可以使用 https://github.com/brightcove/videojs-overlay
Additionally, for YouTube like annotations you can use https://github.com/brightcove/videojs-overlay
这篇关于如何使用javascript进行视频注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!