From 991dd0ea41c611ef3ec3cb410c13820b4054fcb5 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 15 Nov 2024 22:31:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=B8=BB=E7=BA=BF?= =?UTF-8?q?=E4=BA=91=E5=8F=B0=E6=8E=A7=E5=88=B6=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/dialog/jtDevicePlayer.vue | 208 +++++++----------- 1 file changed, 75 insertions(+), 133 deletions(-) diff --git a/web_src/src/components/dialog/jtDevicePlayer.vue b/web_src/src/components/dialog/jtDevicePlayer.vue index f1bc5015f..337080b73 100755 --- a/web_src/src/components/dialog/jtDevicePlayer.vue +++ b/web_src/src/components/dialog/jtDevicePlayer.vue @@ -154,39 +154,61 @@ -
-
-
- -
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+
+ +
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
-
-
- +
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
- -
+
开启雨刷 @@ -200,49 +222,13 @@ 关补光灯 - - 光圈调大 - - 光圈调小 - - - - 焦距调大 - - 焦距调小 - -
-

- 无法播放或者没有声音?   试一试  - 转码播放 - 停止转码 -

-
-

暂无数据

-
- 流 {{ index }} -
-

格式: {{ item.codec_id_name }}

-

类型: 视频

-

分辨率: {{ item.width }} x {{ item.height }}

-

帧率: {{ item.fps }}

-
-
-

格式: {{ item.codec_id_name }}

-

类型: 音频

-

采样位数: {{ item.sample_bit }}

-

采样率: {{ item.sample_rate }}

-
-
- -
- +
@@ -269,11 +255,13 @@ import rtcPlayer from '../dialog/rtcPlayer.vue' import LivePlayer from '@liveqing/liveplayer' import crypto from 'crypto' import jessibucaPlayer from '../common/jessibuca.vue' +import mediaInfo from '../common/mediaInfo.vue' export default { name: 'devicePlayer', props: {}, components: { + mediaInfo, LivePlayer, jessibucaPlayer, rtcPlayer, }, computed: { @@ -307,7 +295,6 @@ export default { streamId: '', app: '', mediaServerId: '', - convertKey: '', deviceId: '', channelId: '', tabActiveName: 'media', @@ -326,7 +313,6 @@ export default { scanSpeed: 100, scanGroup: 0, tracks: [], - coverPlaying: false, tracksLoading: false, showPtz: true, showRrecord: true, @@ -415,70 +401,17 @@ export default { }, getUrlByStreamInfo() { console.log(this.streamInfo) + let streamInfo = this.streamInfo + if (this.streamInfo.transcodeStream) { + streamInfo = this.streamInfo.transcodeStream; + } if (location.protocol === "https:") { - this.videoUrl = this.streamInfo[this.player[this.activePlayer][1]] + this.videoUrl = streamInfo[this.player[this.activePlayer][1]] } else { - this.videoUrl = this.streamInfo[this.player[this.activePlayer][0]] + this.videoUrl = streamInfo[this.player[this.activePlayer][0]] } return this.videoUrl; - }, - coverPlay: function () { - var that = this; - this.coverPlaying = true; - this.$refs[this.activePlayer].pause() - that.$axios({ - method: 'post', - url: '/api/play/convert/' + that.streamId - }).then(function (res) { - if (res.data.code === 0) { - that.convertKey = res.data.key; - setTimeout(() => { - that.isLoging = false; - that.playFromStreamInfo(false, res.data.data); - }, 2000) - } else { - that.isLoging = false; - that.coverPlaying = false; - that.$message({ - showClose: true, - message: '转码失败', - type: 'error' - }); - } - }).catch(function (e) { - console.log(e) - that.coverPlaying = false; - that.$message({ - showClose: true, - message: '播放错误', - type: 'error' - }); - }); - }, - convertStopClick: function () { - this.convertStop(() => { - this.$refs[this.activePlayer].play(this.videoUrl) - }); - }, - convertStop: function (callback) { - var that = this; - that.$refs.videoPlayer.pause() - this.$axios({ - method: 'post', - url: '/api/play/convertStop/' + this.convertKey - }).then(function (res) { - if (res.data.code == 0) { - console.log(res.data.msg) - } else { - console.error(res.data.msg) - } - if (callback) callback(); - }).catch(function (e) { - }); - that.coverPlaying = false; - that.convertKey = ""; - // if (callback )callback(); }, playFromStreamInfo: function (realHasAudio, streamInfo) { @@ -500,10 +433,6 @@ export default { this.videoUrl = ''; this.coverPlaying = false; this.showVideoDialog = false; - if (this.convertKey != '') { - this.convertStop(); - } - this.convertKey = '' this.stopBroadcast() }, @@ -606,7 +535,10 @@ export default { copyUrl: function (dropdownItem) { console.log(dropdownItem) this.$copyText(dropdownItem).then((e) => { - this.$message.success("成功拷贝到粘贴板"); + this.$message.success({ + showClose: true, + message: "成功拷贝到粘贴板" + }) }, (e) => { }) @@ -968,4 +900,14 @@ export default { width: 80%; padding: 0 10%; } +.el-dialog__body{ + padding: 10px 20px; +} +.ptz-btn-box { + display: grid; + grid-template-columns: 1fr 1fr; + padding: 0 2rem; + height: 3rem; + line-height: 4rem; +} From d3d7ea8fbb81c7e84a8cd235b80cecef70e65766 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 15 Nov 2024 23:14:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=B8=BB=E7=BA=BF?= =?UTF-8?q?=E9=80=9A=E9=81=93=E7=BC=96=E8=BE=91=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/jt1078/dao/JTChannelMapper.java | 2 +- .../service/impl/jt1078PlayServiceImpl.java | 6 + web_src/src/components/JTChannelEdit.vue | 291 ++---------------- web_src/src/components/JTChannelList.vue | 211 ++++++------- web_src/src/components/JTDeviceParam.vue | 2 - .../src/components/dialog/jtChannelEdit.vue | 97 ------ 6 files changed, 133 insertions(+), 476 deletions(-) delete mode 100755 web_src/src/components/dialog/jtChannelEdit.vue diff --git a/src/main/java/com/genersoft/iot/vmp/jt1078/dao/JTChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/jt1078/dao/JTChannelMapper.java index 389c8c70e..5781026d2 100644 --- a/src/main/java/com/genersoft/iot/vmp/jt1078/dao/JTChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/jt1078/dao/JTChannelMapper.java @@ -16,7 +16,7 @@ public interface JTChannelMapper { "UPDATE wvp_jt_channel " + "SET update_time=#{updateTime}, terminal_db_id=#{terminalDbId}, has_audio=#{hasAudio}, name=#{name}" + ", channel_id=#{channelId}" + - "WHERE id=#{id}"+ + " WHERE id=#{id}"+ " "}) void update(JTChannel channel); diff --git a/src/main/java/com/genersoft/iot/vmp/jt1078/service/impl/jt1078PlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/jt1078/service/impl/jt1078PlayServiceImpl.java index d5d71da85..58bfc3efc 100644 --- a/src/main/java/com/genersoft/iot/vmp/jt1078/service/impl/jt1078PlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/jt1078/service/impl/jt1078PlayServiceImpl.java @@ -398,6 +398,9 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService { StreamInfo info = onPublishHandler(mediaServer, hookData, phoneNumber, channelId); for (GeneralCallback errorCallback : errorCallbacks) { + if (errorCallback == null) { + continue; + } errorCallback.run(InviteErrorCode.SUCCESS.getCode(), InviteErrorCode.SUCCESS.getMsg(), info); } subscribe.removeSubscribe(hookSubscribe); @@ -456,6 +459,9 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService { List> generalCallbacks = inviteErrorCallbackMap.get(playKey); if (generalCallbacks != null && !generalCallbacks.isEmpty()) { for (GeneralCallback callback : generalCallbacks) { + if (callback == null) { + continue; + } callback.run(InviteErrorCode.ERROR_FOR_FINISH.getCode(), InviteErrorCode.ERROR_FOR_FINISH.getMsg(), null); } } diff --git a/web_src/src/components/JTChannelEdit.vue b/web_src/src/components/JTChannelEdit.vue index e1ca3eb46..b1c25bc0f 100755 --- a/web_src/src/components/JTChannelEdit.vue +++ b/web_src/src/components/JTChannelEdit.vue @@ -2,266 +2,51 @@
- - - 部标通道参数 - + + + - + - + - 国标通道参数 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + 保存 + 取消 -
- 确认 - 取消 -
-
-
+ + + + +