zoukankan      html  css  js  c++  java
  • rtmp jwplayer简单应用

    在nginx下使用,放到nginx/html文件夹内,之后访问

    首先是播放vod视频

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>RTMP Sample Player JWPlayer i</title>
        <script type='text/javascript' src='jwplayer.js'></script>
    </head>
    <body align="center">
        <h1>RTMP Sample Player JWPlayeri v1.0</h1>
        <div align="center">
        <div id='mediaspace'>This text will be replaced</div>
        <script type='text/javascript'>
        jwplayer('mediaspace').setup({
                'flashplayer': 'player.swf',
                'file': 'test.mp4',
                'streamer': 'rtmp://live.tla001.cn/vod',
                'controlbar': 'bottom',
                'height': '360',
                 'width':"640"
         });
        </script>
        </div>
    </body>
    </html>

      然后是播放rtmp直播流

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>RTMP Sample Player JWPlayer i</title>
        <script type='text/javascript' src='jwplayer.js'></script>
    </head>
    <body align="center">
        <h1>RTMP Sample Player JWPlayer v1.0</h1>
        <div align="center">
        <div id='mediaspace'>This text will be replaced</div>
        <script type='text/javascript'>
        jwplayer('mediaspace').setup({
                'flashplayer': 'player.swf',
                'file': 'test1',
                'streamer': 'rtmp://live.tla001.cn/live',
                'controlbar': 'bottom',
                'height': '360',
                 'width':"640"
         });
        </script>
        </div>
    </body>
    </html>

    效果

    附件

    jwplayer

  • 相关阅读:
    java程序高CPU,如何直接定位(linux系统下命令行操作)
    HashMap源码解读(jdk1.8)
    mysql索引原理
    redis常见问题
    Bitmap算法
    list遍历时删除的坑
    接口和抽象类有什么区别?各在什么场景下使用?
    记录BigInteger犯过的一个错误
    CentOS7切换源
    map遍历性能记录
  • 原文地址:https://www.cnblogs.com/tla001/p/6390483.html
Copyright © 2011-2022 走看看