更新时间:2023-11-27 16:53:22
***上提供的动作脚本API 。
利用这一点,你可以使用他们的API加载视频到Flash,然后让你的Flash应用程序在视频上方图层上创建的注释。
或者,或者,如果你想从创建在Flash的东西,使用***的JavaScript API,你可以在你的网页上的***播放器绘制HTML的DIV望而却步。请记住,当你嵌入玩家有 = WMODE透明
在PARAMS列表。
因此,使用从***的例子:
<脚本类型=文/ JavaScript的> VAR PARAMS = {allowScriptAccess的:总是};
VAR的ATT = {ID:myytplayer的wmode:透明};
swfobject.embedSWF(http://www.***.com/v/VIDEO_ID&enablejsapi=1&playerapiid=ytplayer
ytapiplayer,425,356,8,NULL,NULL,则params,ATT以); < / SCRIPT>
和那么你应该能够通过使用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.