admin管理员组文章数量:1426058
I've created one video using Html 5 video tags. The video is in 3 different formats with a flash fallback. Is it possible to display it using a 'lightbox' effect. Below is my code:-
<script type="text/javascript" src=" 3.2.6.min.js"></script>
<link rel="stylesheet" href="../../stylesheets/styles.css" />
</head>
<body>
<div id="videocontent">
<video width="640" height="360" preload="auto" controls poster=".jpg" tabindex="0" >
<source src=".mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src=".webm" type='video/webm; codecs="vp8, vorbis"'>
<source src=".ogv" type='video/ogg; codecs="theora, vorbis"'>
<a href=".mp4"
style="display:block;width:640px;height:360px;"
id="player"></a>
</video>
</div>
<!-- this script block will install Flowplayer inside previous A tag -->
<script language="JavaScript">
flowplayer("player", ".2.7.swf");
</script>
</body>
My javascript skills are very limited, so would greatly appreciate any help. Thanks, Pippa
I've created one video using Html 5 video tags. The video is in 3 different formats with a flash fallback. Is it possible to display it using a 'lightbox' effect. Below is my code:-
<script type="text/javascript" src="http://static.flowplayer/js/flowplayer- 3.2.6.min.js"></script>
<link rel="stylesheet" href="../../stylesheets/styles.css" />
</head>
<body>
<div id="videocontent">
<video width="640" height="360" preload="auto" controls poster="http://www.synergese.co.uk/testMathsOnline/day3/videos/day3Wel.jpg" tabindex="0" >
<source src="http://www.synergese.co.uk/testMathsOnline/day3/videos/fracWelDay3.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="http://www.synergese.co.uk/testMathsOnline/day3/videos/fracWelDay3.webm" type='video/webm; codecs="vp8, vorbis"'>
<source src="http://www.synergese.co.uk/testMathsOnline/day3/videos/fracWelDay3.ogv" type='video/ogg; codecs="theora, vorbis"'>
<a href="http://www.synergese.co.uk/testMathsOnline/day3/videos/fracWelDay3.mp4"
style="display:block;width:640px;height:360px;"
id="player"></a>
</video>
</div>
<!-- this script block will install Flowplayer inside previous A tag -->
<script language="JavaScript">
flowplayer("player", "http://releases.flowplayer/swf/flowplayer-3.2.7.swf");
</script>
</body>
My javascript skills are very limited, so would greatly appreciate any help. Thanks, Pippa
Share Improve this question asked Jun 14, 2011 at 12:05 PippaPippa 2412 gold badges4 silver badges8 bronze badges 3- 2 Also, you should accept answers to your questions if you've found them to be useful(See there is a tick there) and also use upvotes. It will help you get more answers – Rishabh Commented Jun 14, 2011 at 12:09
- 1 Sorry, tried to use upvote and was told that I needed 15 as reputation – Pippa Commented Jun 14, 2011 at 13:37
- K do that when you have it. It will prove helpful – Rishabh Commented Jun 14, 2011 at 18:05
3 Answers
Reset to default 2You can use any lighbox javascript library. For example jquery-tools overlay: http://flowplayer/tools/overlay/index.html
Just take one of the examples in the page and change the overlay content with the HTML of your video player.
try this out http://videolightbox./
You can use jQuery lightbox, it is easy to set up: simply download it from http://leandrovieira./projects/jquery/lightbox/ and see the How to Use section of the page to see how to use it.
Ad@m
版权声明:本文标题:javascript - How do I create a lightbox effect for a video that has been created with Html5? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745373875a2655850.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论