From ce81a0724ffc34cc515f25e0de05444cd912e874 Mon Sep 17 00:00:00 2001
From: lin <648540858@qq.com>
Date: Tue, 19 May 2026 10:59:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E6=A0=87=E5=BD=95=E5=83=8F=E5=9B=9E?=
=?UTF-8?q?=E6=94=BE=E6=94=AF=E6=8C=81=E5=88=87=E6=8D=A2=E6=92=AD=E6=94=BE?=
=?UTF-8?q?=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/resources/配置详情.yml | 20 +++++--
web/src/views/common/jessibuca.vue | 2 +-
web/src/views/common/rtcPlayer.vue | 13 ++++-
web/src/views/device/channel/record.vue | 78 ++++++++++++++++++++++---
4 files changed, 97 insertions(+), 16 deletions(-)
diff --git a/src/main/resources/配置详情.yml b/src/main/resources/配置详情.yml
index ed43e2264..f079366d8 100644
--- a/src/main/resources/配置详情.yml
+++ b/src/main/resources/配置详情.yml
@@ -5,10 +5,14 @@
spring:
+ spring:
+ threads:
+ virtual:
+ enabled: true
cache:
- type: redis
+ type: redis
thymeleaf:
- cache: false
+ cache: false
# 设置接口超时时间
mvc:
async:
@@ -181,9 +185,6 @@ media:
# 录像辅助服务, 部署此服务可以实现zlm录像的管理与下载, 0 表示不使用
record-assist-port: 0
-# [可选] 日志配置, 如果不需要在jar外修改日志内容那么可以不配置此项
-logging:
- config: classpath:logback-spring.xml
# [根据业务需求配置]
user-settings:
@@ -281,3 +282,12 @@ springdoc:
enabled: false
swagger-ui:
enabled: false
+
+logging:
+ level:
+ # 日志级别 debug/info/warn/error
+ root: info
+ logback:
+ rollingpolicy:
+ # 日志文件最大历史保留天数,默认30天
+ max-history: 30
diff --git a/web/src/views/common/jessibuca.vue b/web/src/views/common/jessibuca.vue
index 724ae8b9e..5c5cb6396 100755
--- a/web/src/views/common/jessibuca.vue
+++ b/web/src/views/common/jessibuca.vue
@@ -5,7 +5,7 @@
@dblclick="fullscreenSwich"
>
-
-
-
+
+
-
+
+
+
+ {{ playerLabel }}
+
+ Jessibuca
+ WebRTC
+ H265Web
+
+
import h265web from '../../common/h265web.vue'
+import jessibucaPlayer from '../../common/jessibuca.vue'
+import rtcPlayer from '../../common/rtcPlayer.vue'
import VideoTimeline from '../../common/VideoTimeLine/index.vue'
import recordDownload from '../../dialog/recordDownload.vue'
import ChooseTimeRange from '../../dialog/chooseTimeRange.vue'
@@ -217,7 +253,7 @@ import screenfull from 'screenfull'
export default {
name: 'DeviceRecord',
components: {
- h265web, VideoTimeline, recordDownload, ChooseTimeRange
+ h265web, jessibucaPlayer, rtcPlayer, VideoTimeline, recordDownload, ChooseTimeRange
},
data() {
return {
@@ -251,6 +287,12 @@ export default {
timelineControl: false,
showOtherSpeed: true,
timeSegments: [],
+ activePlayer: 'jessibuca',
+ playerUrls: {
+ jessibuca: ['ws_flv', 'wss_flv'],
+ webRTC: ['rtc', 'rtcs'],
+ h265web: ['ws_flv', 'wss_flv']
+ },
pickerOptions: {
cellClassName: (date) => {
// 通过显示一个点标识这一天有录像
@@ -266,6 +308,10 @@ export default {
}
},
computed: {
+ playerLabel() {
+ const labels = { jessibuca: 'Jessibuca', webRTC: 'WebRTC', h265web: 'H265Web' }
+ return labels[this.activePlayer] || 'Jessibuca'
+ },
boxStyle() {
if (this.showSidebar) {
return {
@@ -300,6 +346,18 @@ export default {
window.removeEventListener('beforeunload', this.stopPlayRecord)
},
methods: {
+ changePlayer(player) {
+ if (this.activePlayer === player) return
+ this.activePlayer = player
+ if (this.streamInfo) {
+ this.videoUrl = this.getUrlByStreamInfo()
+ this.$nextTick(() => {
+ if (this.$refs.recordVideoPlayer) {
+ this.$refs.recordVideoPlayer.play(this.videoUrl)
+ }
+ })
+ }
+ },
sidebarControl() {
this.showSidebar = !this.showSidebar
},
@@ -468,14 +526,20 @@ export default {
this.streamInfo = data
this.videoUrl = this.getUrlByStreamInfo()
this.hasAudio = this.streamInfo.tracks && this.streamInfo.tracks.length > 1
+ this.$nextTick(() => {
+ if (this.$refs.recordVideoPlayer) {
+ this.$refs.recordVideoPlayer.play(this.videoUrl)
+ }
+ })
})
}
},
getUrlByStreamInfo() {
+ const keys = this.playerUrls[this.activePlayer]
if (location.protocol === 'https:') {
- this.videoUrl = this.streamInfo['wss_flv']
+ this.videoUrl = this.streamInfo[keys[1]]
} else {
- this.videoUrl = this.streamInfo['ws_flv']
+ this.videoUrl = this.streamInfo[keys[0]]
}
return this.videoUrl
},