web 视频播放的一种实现

来源:互联网 发布:死神游戏单机不要网络 编辑:程序博客网 时间:2024/05/18 00:30

web 视频播放的一种实现: 同时使用 html5 和 flash 和多种视频的格式要兼容尽可能多的浏览器

<!DOCTYPE html><html>    <head>        <title>Flash Video and Audio</title>        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>        <script type="text/javascript">            var flashvars = {};            var params = {movie:"video/puppy.flv"};            swfobject.embedSWF("flash/Osplayer.swf","snow","400","320","8.0.0", flashvars,params);        </script>    </head>    <body>        <video poster="images/puppy.jpg" width="400" height="320" controls="controls">            <source src="video/puppy.mp4" type='video/mp4;codecs="avcl.42E01E, mp4a.40.2"' />            <source src="video/puppy.webm"  type='video/webm;codecs="vp8, vorbis"' />            <div id="snow">                <p>You cannot see tis video of a puppy playing in the snow because this browser does not support our video formats.</p>            </div>        </video>    </body></html>
0 0
原创粉丝点击