javascript - How do I create a lightbox effect for a video that has been created with Html5? - Stack Overflow

I've created one video using Html 5 video tags. The video is in 3 different formats with a flash f

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
Add a ment  | 

3 Answers 3

Reset to default 2

You 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745373875a4624914.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信