将嵌入的视频转发到某个位置

发布于 2024-10-14 06:41:34 字数 97 浏览 1 评论 0原文

那里。我知道可以在浏览器中使用 flash 播放器或 html5 打开视频文件,但是是否可以在特定位置(假设从开始起 60 秒)打开它或在之后自动快进开放?任何代码示例将不胜感激。

there. I know that there is a possibility to open a video file either using a flash player or html5 in a browser, but is there a possibility to open it at the certain place (lets say 60 seconds from the beginning) or automatically fast forward it after opening? Any code examples would be appreaciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月牙弯弯 2024-10-21 06:41:34

好吧,我必须自己找到答案。类似的问题在 如何仅播放网页中视频的特定部分?
(但没有给出具体例子)。
我发现对于 flv 类型,您可以使用 flowplayer:

http://flowplayer.org/documentation/scripting。 html

我的最小工作示例:

    <html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="flowplayer-3.2.4.min.js"></script>
    <title>Minimal Flowplayer setup</title>

</head>
<body>

<div style="display:block;width:520px;height:330px" id="player"> </div>     

</body>
<script> 
$f("player", "../flowplayer-3.2.5.swf", {
    clip: {
        url: "four_stroke.flv",
        autoPlay: true
    },
     // you can seek to a certain place of a clip just after that place is already is buffered
    onStart:function() { 
    this.seek(10);
    }
});
</script>
</html>

对于 QuickTime 电影类型,您可以使用 QuickTime 插件并设置启动或自动播放参数以在指定位置启动视频剪辑,如下所示:

<PARAM Name="AUTOPLAY" Value="@00:03:15:01" >

<PARAM NAME="STARTTIME" VALUE="00:03:15:01" >

更多说明: http://developer.apple.com/library/mac/#documentation/QuickTime /Conceptual/QTScripting_HTML/QTScripting_HTML_Document/ScriptingHTML.html

这是我的代码示例,适用于我的 FF3.6 和 IE8(将其放在 HTML 的正文区域中):

    <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" 
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" 
HEIGHT=650 
WIDTH=1000 
> 

<PARAM NAME="src" VALUE="ksetup.mov" >

<PARAM NAME="STARTTIME" VALUE="00:03:00:00" > 

<PARAM NAME="AUTOPLAY" VALUE="false" > 

<EMBED 
SRC="ksetup.mov" 
HEIGHT=650 WIDTH=1000
TYPE="video/quicktime"
BGCOLOR=#00ff00
AUTOPLAY="false"
STARTTIME="00:03:00:00" 
PLUGINSPAGE="http://www.apple.com/quicktime/download/" 
/> 

</OBJECT> 

希望这能让某人走上正轨。

Ok, I had to find the answer myself. A similar question was addressed at How do I play just a specific section of a video in a web page?
(but without giving specific examples).
I found out that for flv types you can use flowplayer:

http://flowplayer.org/documentation/scripting.html

My minimal working example:

    <html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="flowplayer-3.2.4.min.js"></script>
    <title>Minimal Flowplayer setup</title>

</head>
<body>

<div style="display:block;width:520px;height:330px" id="player"> </div>     

</body>
<script> 
$f("player", "../flowplayer-3.2.5.swf", {
    clip: {
        url: "four_stroke.flv",
        autoPlay: true
    },
     // you can seek to a certain place of a clip just after that place is already is buffered
    onStart:function() { 
    this.seek(10);
    }
});
</script>
</html>

For quicktime movie types you can use quicktime plugin and set start or autoplay parameters to start a video clip at specified place like that:

<PARAM Name="AUTOPLAY" Value="@00:03:15:01" >

or

<PARAM NAME="STARTTIME" VALUE="00:03:15:01" >

more explanations at: http://developer.apple.com/library/mac/#documentation/QuickTime/Conceptual/QTScripting_HTML/QTScripting_HTML_Document/ScriptingHTML.html

Here is my code example that works in my FF3.6 and IE8 (put it in your HTML's body area):

    <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" 
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" 
HEIGHT=650 
WIDTH=1000 
> 

<PARAM NAME="src" VALUE="ksetup.mov" >

<PARAM NAME="STARTTIME" VALUE="00:03:00:00" > 

<PARAM NAME="AUTOPLAY" VALUE="false" > 

<EMBED 
SRC="ksetup.mov" 
HEIGHT=650 WIDTH=1000
TYPE="video/quicktime"
BGCOLOR=#00ff00
AUTOPLAY="false"
STARTTIME="00:03:00:00" 
PLUGINSPAGE="http://www.apple.com/quicktime/download/" 
/> 

</OBJECT> 

Hope this will put someone on track.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文