我想在同一个HTML页面中加载视频。视频已经正常工作并链接到按钮,但视频在新页面中打开。我错过了一些代码吗?
代码:
<div id="van_ons"><li><a href="onderdelen/movies/santa.mov"><img src="knoppen/van_ons.png" /><img src="knoppen/van-ons.png" /></a></li></div>
播放器&amp;按钮代码:
<div id="container">
<div id="buttons">
<ul>
<div id="van_ons"><li><a href="onderdelen/movies/santa.mov" target="_self"><img src="knoppen/van-ons.png" /></a></li></div>
<div id="krijg_je"><li><a href="onderdelen/movies/santa.mov"><img src="knoppen/krijgje.png" /></a></li></div>
<div id="iig"><li><a href="onderdelen/movies/santa.mov"><img src="knoppen/iniedergeval.png" /></a></li></div>
<div id="een_witte_kerst"><li><a href="onderdelen/movies/santa.mov"><img src="knoppen/eenwittekerst.png" /></a></li></div>
</ul>
</div>
<div id="achtergrond">
<!-- Begin VideoJS -->
<div class="video-js-box">
<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
<video class="video-js" width="500" height="400" controls preload poster="http://video-js.zencoder.com/oceans-clip.png">
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":["http://video-js.zencoder.com/oceans-clip.png", {"url": "http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}]}' />
<!-- Image Fallback. Typically the same as the poster image. -->
<img src="http://video-js.zencoder.com/oceans-clip.png" width="400" height="500" alt="Poster Image"
title="No video playback capabilities." />
</object>
</div>
</div>
答案 0 :(得分:1)
请试试这个:
<a href="onderdelen/movies/santa.mov" target="_self"><img src="knoppen/van_ons.png" /></a>
答案 1 :(得分:0)
您可以使用object tag或HTML5 video tag嵌入视频,但可能会遇到编解码器或浏览器不兼容问题。所以我建议以下之一:
答案 2 :(得分:0)
你必须使用像flowplayer这样的播放器将视频嵌入你的页面。 http://flowplayer.org/ 或者你可以使用HTML5视频 - 但你需要mp4(H.264)或OGG视频。
<video width="320" height="240" controls="controls">
<source src="movie.mp4" type="video/mp4" />
<source src="movie.ogg" type="video/ogg" />
Your browser does not support the video tag.
</video>