您好,欢迎来到源码搜藏!分享精神,快乐你我!提示:担心找不到本站?在百度搜索“源码搜藏”,网址永远不丢失!
  • 首 页
  • 在线工具
  • 当前位置:首页 > 网页特效 > 视频播放 >

    Web的多媒体播放器 html5media

    时间:2014-04-25 09:44 来源:互联网 作者:源码搜藏 浏览:收藏 挑错 推荐 打印
    效果预览 进入下载地址列表

    html5media是一个JavaScript音频/视频播放器能够让每一个浏览器都能够播放在HTML5多媒体标签中定义的多媒体文件。 对于不兼容的浏览器,该播放将采用支持Flash的FlowPlayer播放器来代替。

    在线演示: http://runjs.cn/detail/g5x7hgpg

    HTML5 video made easy

    All it takes is a single line of code to make HTML5 video and audio tags work in all major browsers.

    How to enable video and audio tags in all major browsers

    To make HTML5 video and audio tags work in all major browsers, simply add the following line of code somewhere in the <head> of your document.

    <script src="http://api.html5media.info/1.1.8/html5media.min.js"></script>
    

    That's it! There is no second step!

    How to embed video

    You can embed video into your page using the following code.

    <video src="video.mp4" width="320" height="200" controls preload></video>
    

    For more information and troubleshooting, please visit the video wiki page.

    How to embed audio

    You can embed audio into your page using the following code.

    <audio src="audio.mp3" controls preload></audio>
    

    For more information and troubleshooting, please visit the audio wiki page.

    Why use html5media?

    HTML5 video and audio tags were designed to make embedding a video as easy as embedding an image. They were also designed to give users a faster experience by doing away with browser plugins such as Adobe Flash.

    Unfortunately, older browsers don't support HTML5 video and audio tags, and even modern browsers don't support a consistent set of video codecs, making embedding a video rather difficult.

    The html5media project makes embedding video or audio as easy as it was meant to be. It's a fire-and-forget solution, and doesn't require installing any files on your server. Unlike many other HTML5 video players, it allows people to use the video controls supplied by their own web browser. It's one of the smallest, fastest solutions available, and as browser technology improves it will become even faster.

    More information

    The html5media project is open source and can be found on GitHub. You can find out more information on thehtml5media wiki, or the main html5media project page.

    About the author

     

    Dave Hall is a freelance web developer, based in Cambridge, UK. You can usually find him on the Internet in a number of different places:

    Web的多媒体播放器 html5media由源码搜藏网整理,转载请注明出处http://www.codesocang.com/texiao/shipin/7194.html 源码搜藏承诺:本站所有资源无病毒,无弹窗,无干扰链接!