【发布时间】:2018-01-29 07:05:09
【问题描述】:
我已经配置了 NGINX-RTMP 服务器,我可以在 VLC 媒体播放器上播放直播。 但是当我试图在网站上播放它时,它不会播放。 这是我的 nginx.conf 文件的 RTMP 配置代码。
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
}
}
}
我尝试通过 clappr 播放器播放 这是代码
var player = new Clappr.Player({
source: "rtmp://192.168.4.136:1935/live/test",
parentId: "#player",
plugins: {'playback': [RTMP]},
rtmpConfig: {
swfPath: 'dist/assets/RTMP.swf',
scaling:'stretch',
playbackType: 'live',
bufferTime: 1,
startLevel: 0,
switchRules: {
"SufficientBandwidthRule": {
"bandwidthSafetyMultiple": 1.15,
"minDroppedFps": 2
},
"InsufficientBufferRule": {
"minBufferLength": 2
},
"DroppedFramesRule": {
"downSwitchByOne": 10,
"downSwitchByTwo": 20,
"downSwitchToZero": 24
},
"InsufficientBandwidthRule": {
"bitrateMultiplier": 1.15
}
}
},
});
【问题讨论】:
标签: nginx rtmp live-streaming