JWPlayer 在 wowza 中仅显示带有我的 smil 文件的 Apple HLS

标签 jwplayer rtmp wowza http-live-streaming smil

我正在使用 wowza 流引擎和 jw 播放器来显示流并且工作正常。但我想控制视频的比特率,以便用户可以在没有太多缓冲的情况下观看视频。 所以我在 stackoverflow 中搜索并找到了以下链接。 why smil file is not working with rtmp both in wowza and jwplayer

我正在使用 JWplayer pro 6.0.2813 和 wowza 4.3

这是我的 test.smil 文件

<smil>
<head>
</head>
<body>
    <switch>
    <video src='mp4:test_49152.mp4' system-bitrate='49152' title='192x108'/>
    <video src='mp4:test_114688.mp4' system-bitrate='114688' title='256x144'/>
    <video src='mp4:test_184320.mp4' system-bitrate='184320' title='320x180'/>
    <video src='mp4:test_339968.mp4' system-bitrate='339968' title='480x270'/>
    <video src='mp4:test_544768.mp4' system-bitrate='544768' title='640x360'/>
    <video src='mp4:test_987136.mp4' system-bitrate='987136' title='854x480'/>
    </switch>
</body>
</smil>

和我的js代码:

var playerInstance = jwplayer("myElement");
playerInstance.setup({
    type: 'smil',
    playlist: [{
        image: "/images/myPoster.jpg",
        sources: [{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/manifest.mpd"
        },{
            file: "rtmp://173.244.173.196:1935/vod/smil:test.smil" //Adobe RTMP . not work
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/jwplayer.smil" //Adobe RTMP . not work
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/manifest.f4m"
        },{
            file: "rtsp://173.244.173.196:1935/vod/smil:test.smil"
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/playlist.m3u8" //this work fine!
        }]
    }],

    width: '100%',
    aspectratio: "16:9",
    primary: "flash",
    stretching: "uniform"
});

在 Apple 设备中完全工作正常,但在 android桌面浏览器中显示黑屏

最佳答案

我意识到type: 'smil'属于另一个版本,不需要添加它。 只需使用这个:

playerInstance.setup({
    playlist: [{
    image: "/images/myPoster.jpg",
    sources: [{
        file: "http://173.244.173.196:1935/vod/smil:test.smil/playlist.m3u8"
    },{
        file: "http://173.244.173.196:1935/vod/smil:test.smil/jwplayer.smil"
    },{
        file: "rtsp://173.244.173.196:1935/vod/test.mp4"
    }]
    }],
    width: '100%',
    aspectratio: "16:9",//Common values are 16:9, 24:10 or 4:3
    primary: "flash",
    stretching: "uniform"//stretching (uniform,fill,exactfit,none)
});

如果您对改进配置有任何想法,请建议我

关于JWPlayer 在 wowza 中仅显示带有我的 smil 文件的 Apple HLS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34636405/

相关文章:

javascript - 在jwplayer中测试html5模式

api - JWPlayer 防止向前跳过,除非已经看过

nginx - 流式网络摄像头实时缓冲区 [东芝网络摄像头] [视频输入] 太满或接近太满

html - Wowza流引擎在HTML播放器中没有声音

nginx - 转发 HLS 流 - 需要解决方案

jwplayer - 如何在视频开始时立即隐藏 JWPlayer 或 FlowPlayer 上的控制栏

javascript - JS 隐藏横幅仅适用于 Firefox

ffmpeg - 如何更新ffmpeg序列头?

android - 通过 RTMP 流式传输 android 相机

android - Wowza Media Server IOS 设备的实时视频流延迟?