49 lines
892 B
Vue
49 lines
892 B
Vue
<style lang='scss' scoped>
|
|
.cameraDetail{
|
|
width: 100%;
|
|
&-video{
|
|
width: 100%;
|
|
height: 500rpx;
|
|
video,live-player{
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
<template>
|
|
<view class="cameraDetail">
|
|
<view class="cameraDetail-video">
|
|
<!-- #ifdef APP-PLUS -->
|
|
<video src="rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov" controls></video>
|
|
<!-- #endif -->
|
|
<!-- #ifndef APP-PLUS -->
|
|
<live-player
|
|
src="rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov"
|
|
autoplay
|
|
@statechange="statechange"
|
|
@error="error"
|
|
/>
|
|
<!-- #endif -->
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {}
|
|
},
|
|
onLoad() {},
|
|
methods: {
|
|
statechange(e){
|
|
console.log('live-player code:', e.detail.code)
|
|
},
|
|
error(e){
|
|
console.error('live-player error:', e.detail.errMsg)
|
|
}
|
|
}
|
|
}
|
|
</script>
|