|
alivcLivePlayer 播放是黑屏的
[复制链接]
这是我的代码
this.alivcLivePlayer = api.require('alivcLivePlayer');
this.alivcLivePlayer.initPlayer({
rect: {
x: 0,
y: 72,
w: 375,
h: 300
}
}, (ret) => {
if (ret.status) {
this.alivcLivePlayer.prepareAndPlay({
url: 'rtmp://192.168.1.134/live/64'
}, (ret) => {
if (ret.status) {
this.alivcLivePlayer.play();
} else {
alert("啊哦~ 视频加载失败");
}
this.$store.dispatch('loading/hide');
})
} else {
alert("啊哦~ 视频加载失败");
}
});
if (api.systemType == 'ios') {
this.alivcLivePlayer.prepareToPlay({
url: 'rtmp://192.168.1.134/live/64'
}, (ret) => {
if (ret.status) {
this.alivcLivePlayer.play();
} else {
alert("啊哦~ 视频加载失败");
}
this.$store.dispatch('loading/hide');
})
}
视频流是我本地推的,经过测试,在网页中用flash是可以看的,但是在手机端用alivcLivePlayer播放就是黑屏的,手机连的wifi用的同一个局域网
|
|