|
[插件使用]
alivcLivePlayer黑屏问题
[复制链接]
本帖最后由 DreamsGoGO 于 2022-1-17 15:05 编辑
livcLivePlayer.initPlayer({
"rect":{
x: 0, //(可选项)数字类型;模块左上角的 x 坐标(相对于所属的 Window 或 Frame);默认值:0
y: 0, //(可选项)数字类型;模块左上角的 y 坐标(相对于所属的 Window 或 Frame);默认值:0
w:api.winWidth,
h:api.winHeight //(可选项)数字类型;模块高度(相对于所属的 Window 或 Frame;默认300
}
},function(ret){
if(ret.status){
alivcLivePlayer.prepareToPlay(
{"url":"rtmp://live**.**/live/cf38a15c-e6a0-44c9-a610-d71d6da9c6bd"},
function(ret){
if(ret.status){
console.log(JSON.stringify(ret));
document.getElementById('mask').style.display='none';
alivcLivePlayer.resize({
rect:{
x:0,
y:0,
w:api.winWidth,
h:api.winHeight
}
});
alivcLivePlayer.play();
}else{
alert('播放失败')
}
}
)
}else{
alert('加载失败');
}
})
android真机下调试,有时候只有声音,屏幕是黑的,是什么原因?
|
|