ghghghgh
ghghghgh
  • 发布:2023-11-11 00:37
  • 更新:2023-12-18 10:09
  • 阅读:262

真机调试 使用video标签播放rtsp视频失败

分类:uni-app

出现如下错误

{
"defaultPrevented": false,
"timeStamp": 0,
"_stop": false,
"_end": false,
"type": "onError",
"bubbles": false,
"cancelable": false,
"target": {
"dataset": {},
"id": "",
"offsetLeft": 56,
"offsetTop": 247
},
"detail": {},
"currentTarget": {
"dataset": {},
"id": "",
"offsetLeft": 56,
"offsetTop": 247
}
}

代码 <template> <view class="content"> <image class="logo" src="/static/logo.png"></image> <view class="text-area"> <video src="src" controls="true"
page-gesture="true"
show-mute-btn="true"
enable-play-gesture="true"
vslide-gesture="true"
@error="handleError"
@waiting="videoWaiting"
@loadedmetadata="videoLoadOk"
></video>
</view>
</view>
</template>

<script>
export default {
data() {
return {
title: 'Hello',
src: 'rtsp://192.168.111.71:8554/'
}
},
onLoad() {

    },  
    methods: {  
        handleError(e) {  
            console.log(e)  
        },  
        videoWaiting(e) {  
            console.log('1', e)  
        },  
        videoLoadOk(e) {  
            console.log('2', e)  
        }  
    }  
}  

</script>

2023-11-11 00:37 负责人:无 分享
已邀请:
卡布zp

卡布zp - uniapp小白

解决了吗?我也遇到了

要回复问题请先登录注册