|
@@ -189,7 +189,9 @@
|
|
|
<view class="video-section">
|
|
<view class="video-section">
|
|
|
<view class="video-container" :class="{'fullscreen-mode': isFullscreen}">
|
|
<view class="video-container" :class="{'fullscreen-mode': isFullscreen}">
|
|
|
<!-- 默认未播放态背景:深灰绿 + 柔和层次感 -->
|
|
<!-- 默认未播放态背景:深灰绿 + 柔和层次感 -->
|
|
|
- <view v-if="!isPlaying" class="video-placeholder-bg"></view>
|
|
|
|
|
|
|
+ <view v-if="!isPlaying" class="video-placeholder-bg">
|
|
|
|
|
+ <image :src="deviceInfo.imageUrl" mode="aspectFill" style="width:100%;height:100%"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
<!-- 使用跨平台视频播放组件 -->
|
|
<!-- 使用跨平台视频播放组件 -->
|
|
|
<!-- #ifdef H5 -->
|
|
<!-- #ifdef H5 -->
|
|
@@ -605,6 +607,7 @@ import {
|
|
|
getChannels,
|
|
getChannels,
|
|
|
playStart,
|
|
playStart,
|
|
|
pause ,
|
|
pause ,
|
|
|
|
|
+ querySnap
|
|
|
} from '@/api/device.js'
|
|
} from '@/api/device.js'
|
|
|
import Jessibuca from '@/components/common/jessibuca.vue'
|
|
import Jessibuca from '@/components/common/jessibuca.vue'
|
|
|
// 页面状态选择(H5 演示用):通过路由参数传入 state 即可切换 mock 场景
|
|
// 页面状态选择(H5 演示用):通过路由参数传入 state 即可切换 mock 场景
|
|
@@ -682,6 +685,7 @@ const deviceInfo = reactive({
|
|
|
wsFlvStreamUrl: '', // wss_flv 流地址(安卓 H5 用)
|
|
wsFlvStreamUrl: '', // wss_flv 流地址(安卓 H5 用)
|
|
|
hlsStreamUrl: '', // hls 流地址(iOS H5 / 小程序 / App iOS 用)
|
|
hlsStreamUrl: '', // hls 流地址(iOS H5 / 小程序 / App iOS 用)
|
|
|
fmp4StreamUrl: '', // fmp4 流地址(App Android 用)
|
|
fmp4StreamUrl: '', // fmp4 流地址(App Android 用)
|
|
|
|
|
+ imageUrl: '' // 设备图片(如果有)
|
|
|
})
|
|
})
|
|
|
const MOCK_TRACE_DETAILS = {
|
|
const MOCK_TRACE_DETAILS = {
|
|
|
normal: {
|
|
normal: {
|
|
@@ -1053,7 +1057,9 @@ onLoad((opts) => {
|
|
|
console.log('channelId:', deviceInfo.channelId)
|
|
console.log('channelId:', deviceInfo.channelId)
|
|
|
console.log('isH5IOS:', isH5IOS.value)
|
|
console.log('isH5IOS:', isH5IOS.value)
|
|
|
console.log('isIPhoneH5:', isIPhoneH5.value)
|
|
console.log('isIPhoneH5:', isIPhoneH5.value)
|
|
|
-
|
|
|
|
|
|
|
+ querySnap(deviceInfo.deviceId, deviceInfo.channelId).then(url => {
|
|
|
|
|
+ deviceInfo.imageUrl = url
|
|
|
|
|
+ })
|
|
|
playStart(deviceInfo.deviceId, deviceInfo.channelId).then(res => {
|
|
playStart(deviceInfo.deviceId, deviceInfo.channelId).then(res => {
|
|
|
if (res.data.code !== 0) {
|
|
if (res.data.code !== 0) {
|
|
|
console.error('播放开始失败:', res.message)
|
|
console.error('播放开始失败:', res.message)
|