更新时间:2023-11-26 14:44:10
*** 提供了一个 ActionScriptAPI.
使用此功能,您可以使用其 API 将视频加载到 Flash 中,然后让您的 Flash 应用在视频上方的图层上创建注释.
或者,如果您不想在 Flash 中创建内容,可以使用 *** 的 JavaScript API 在您网页上的 *** 播放器上绘制 HTML DIV.请记住,当您嵌入播放器时,参数列表中有 WMODE="transparent"
.
所以使用来自 *** 的示例:
然后您应该能够使用 CSS/DHTML 在 *** 电影上绘制注释.
I want to be able to display a normal *** video with overlaid annotations, consisting of coloured rectangles for each frame. The only requirement is that this should be done programmatically.
*** has annotations now, but require you to use their front end to create them by hand. I want to be able to generate them. What's the best way of doing this?
Some ideas:
- Build your own Flash player (ew?)
- Somehow draw over the *** Flash player. Will this work?
- Reverse engineer & hijack ***'s annotation system. Either messing with the local files or redirecting its attempt to download the annotations. (using Greasemonkey? Firefox plugin?)
Idea that doesn't count:
download the video
*** provides an ActionScript API.
Using this, you could load the videos into Flash using their API and then have your Flash app create the annotations on a layer above the video.
Or, alternatively, if you want to stay away from creating something in Flash, using ***'s JavaScript API you could draw HTML DIVs over the *** player on your web page. Just remember when you embed the player to have WMODE="transparent"
in the params list.
So using the example from ***:
<script type="text/javascript">
var params = { allowScriptAccess: "always" };
var atts = { id: "myytplayer", wmode: "transparent" };
swfobject.embedSWF("http://www.***.com/v/VIDEO_ID&enablejsapi=1&playerapiid=ytplayer",
"ytapiplayer", "425", "356", "8", null, null, params, atts);
</script>
And then you should be able to draw your annotations over the *** movie using CSS/DHTML.