类型:开发

描述:
This commit is contained in:
2025-04-15 09:40:00 +08:00
parent 612f67869b
commit 44e612361c
3 changed files with 12 additions and 14 deletions

View File

@@ -164,12 +164,12 @@
this.hls = new Hls({ this.hls = new Hls({
// 内存优化配置 // 内存优化配置
maxBufferSize: 15 * 1000 * 1000, // 降低缓冲区大小15MB maxBufferSize: 0, // 降低缓冲区大小15MB
maxBufferLength: 50, // 更小的缓冲窗口 maxBufferLength: 0.1, // 更小的缓冲窗口
liveSyncDuration: 1, // 紧跟直播点 liveSyncDuration: 1, // 紧跟直播点
liveMaxLatencyDuration: 5, // 最大延迟5秒 liveMaxLatencyDuration: 5, // 最大延迟5秒
liveDurationInfinity: true, liveDurationInfinity: true,
lowLatencyMode: false, // 启用低延迟模式 lowLatencyMode: true, // 启用低延迟模式
maxMaxBufferLength: 60, maxMaxBufferLength: 60,
backBufferLength: 1, // 减少保留的缓冲数据 backBufferLength: 1, // 减少保留的缓冲数据
manifestLoadingTimeOut: 10000, manifestLoadingTimeOut: 10000,
@@ -198,7 +198,6 @@
this.retryCount = 0 this.retryCount = 0
this.safePlay() this.safePlay()
}) })
this.hls.on(Hls.Events.ERROR, (event, data) => { this.hls.on(Hls.Events.ERROR, (event, data) => {
this.handleHlsError(data) this.handleHlsError(data)
}) })

View File

@@ -71,7 +71,7 @@
</div> </div>
</div> </div>
<div class="desc-box"> <div class="desc-box">
<title2 title="酒店简介" /> <title2 title="简介" />
<div class="desc-content" v-html="info?.introduction"></div> <div class="desc-content" v-html="info?.introduction"></div>
<div class="desc-container"> <div class="desc-container">
<div> <div>

View File

@@ -29,6 +29,13 @@
(val) => { (val) => {
if (val[0] && val[1]) { if (val[0] && val[1]) {
sendMessage(JSON.stringify({ action: 'start', type: '', scenicSpotId: scenicSpotId.value })) sendMessage(JSON.stringify({ action: 'start', type: '', scenicSpotId: scenicSpotId.value }))
sendMessage(
JSON.stringify({
action: 'start',
type: 'secureData',
scenicSpotId: scenicSpotId.value
})
)
} }
}, },
{ immediate: true } { immediate: true }
@@ -56,7 +63,6 @@
scenicStore.setScenicBearData(val) scenicStore.setScenicBearData(val)
break break
case 'stopCarData': case 'stopCarData':
console.log(val,'valvalvalvalvalvalval')
scenicStore.setStopCarData(val) scenicStore.setStopCarData(val)
break break
case 'secureData': case 'secureData':
@@ -100,7 +106,6 @@
}, 20000) }, 20000)
} }
const sendCarShip = (e) => { const sendCarShip = (e) => {
timer = setInterval(() => { timer = setInterval(() => {
if (isConnected.value) { if (isConnected.value) {
//车船数据 //车船数据
@@ -111,13 +116,7 @@
scenicSpotId: scenicSpotId.value scenicSpotId: scenicSpotId.value
}) })
) //车窗数据 ) //车窗数据
sendMessage(
JSON.stringify({
action: 'start',
type: 'secureData',
scenicSpotId: scenicSpotId.value
})
)
} }
}, 5000) }, 5000)
} }