diff --git a/dist417大屏.zip b/dist417大屏.zip
new file mode 100644
index 0000000..45ff8c0
Binary files /dev/null and b/dist417大屏.zip differ
diff --git a/src/api/home.js b/src/api/home.js
index 7552a78..17e8777 100644
--- a/src/api/home.js
+++ b/src/api/home.js
@@ -15,6 +15,22 @@ export function getColletListApi(data) {
data
})
}
+// 自定义视频列表
+export function getColletDiyListApi(data) {
+ return request({
+ url: '/fjtcc-api/api/largeScreen/video/diyList',
+ method: 'post',
+ data
+ })
+}
+// 自定义视频列表收藏
+export function getColletDiyApi(data) {
+ return request({
+ url: '/fjtcc-api/api/largeScreen/video/diy',
+ method: 'get',
+ params: data
+ })
+}
// 核心景区视频
export function getVideoListApi(data) {
return request({
diff --git a/src/components/HlsPlayer/index.vue b/src/components/HlsPlayer/index.vue
index db680d0..8689e22 100644
--- a/src/components/HlsPlayer/index.vue
+++ b/src/components/HlsPlayer/index.vue
@@ -75,7 +75,7 @@
immediate: true
},
url(newUrl) {
- console.log(newUrl,'77777777777777777777777777777777')
+ // console.log(newUrl,'77777777777777777777777777777777')
if (newUrl && this.isActive) {
this.initializePlayer()
}
@@ -162,7 +162,6 @@
if (this.hls) {
this.immediateCleanup()
}
-
this.hls = new Hls({
// 内存优化配置
maxBufferSize: 0, // 降低缓冲区大小(15MB)
@@ -200,6 +199,12 @@
this.safePlay()
})
this.hls.on(Hls.Events.ERROR, (event, data) => {
+ console.log('核心视频错误',data.type)
+ // this.hls.startLoad(); //重连
+ if (data.type === Hls.ErrorTypes.BUFFER_STALLED_ERROR) {
+ console.error('缓冲停滞错误,尝试重新加载视频');
+ this.hls.startLoad(); // 尝试重新加载视频
+ }
this.handleHlsError(data)
})
@@ -207,7 +212,31 @@
this.cleanupNetworkResources()
})
},
-
+ initVideo() {
+ this.beforeDestroy()
+ this.hls = new Hls({
+ maxBufferLength: 30, // 最大缓冲长度(秒)
+ maxMaxBufferLength: 15, // 缓冲区长度的上限
+ maxBufferSize: 30 * 1000 * 1000 // 最大缓冲大小(字节)
+ })
+ this.hls.attachMedia(this.video)
+ this.hls.loadSource(this.url)
+
+ // 事件处理
+ this.hls.on(Hls.Events.MANIFEST_PARSED, () => {
+ this.loading = false
+ this.retryCount = 0
+ this.safePlay()
+ })
+ this.hls.on(Hls.Events.ERROR, (event, data) => {
+ this.hls.startLoad(); //重连
+ this.handleHlsError(data)
+ })
+
+ this.hls.on(Hls.Events.BUFFER_EOS, () => {
+ this.cleanupNetworkResources()
+ })
+ },
cleanupNetworkResources() {
// 清理已播放的缓冲数据
if (this.hls && this.video) {
diff --git a/src/components/Line/index.vue b/src/components/Line/index.vue
index 4b63b80..356b0e5 100644
--- a/src/components/Line/index.vue
+++ b/src/components/Line/index.vue
@@ -1,11 +1,16 @@
-
+
{{ item.licenseNumber }}
+{{ item.licenseNumber }}
+ + 车 + + + 直通车 + + + 船 + +
+ >{{ item.speed }}km/h
+
${timestampToYMD(data?.gpsTime)}
${data?.speed}KM
${data?.speed}KM/H
${data?.lng},${data?.lat}
${data?.address}
${data?.address}