From f078c6f7a036610e3eb03dcdfd51bd6819235254 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Tue, 31 Dec 2024 10:31:03 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=8B=89=E6=B5=81=E4=BB=A3=E7=90=86]=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20#1718?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/media/zlm/ZLMMediaNodeServerService.java | 5 ++++- web_src/src/components/StreamProxyEdit.vue | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java index dc665d32..8c7929dd 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMMediaNodeServerService.java @@ -423,8 +423,11 @@ public class ZLMMediaNodeServerService implements IMediaNodeServerService { port = mediaServer.getRtspPort(); schemaForUri = schema; }else if (schema.equalsIgnoreCase("flv")) { + if (mediaServer.getRtmpPort() == 0) { + throw new ControllerException(ErrorCode.ERROR100.getCode(), "ffmpeg拉流代理播放时发现未设置rtmp端口"); + } port = mediaServer.getRtmpPort(); - schemaForUri = schema; + schemaForUri = "rtmp"; }else { port = mediaServer.getRtmpPort(); schemaForUri = schema; diff --git a/web_src/src/components/StreamProxyEdit.vue b/web_src/src/components/StreamProxyEdit.vue index 8d854a14..2a1441aa 100644 --- a/web_src/src/components/StreamProxyEdit.vue +++ b/web_src/src/components/StreamProxyEdit.vue @@ -219,12 +219,12 @@ export default { this.closeEdit() }, mediaServerIdChange:function (){ - if (this.streamProxy.mediaServerId !== "auto"){ + if (this.streamProxy.relatesMediaServerId !== "auto"){ this.$axios({ method: 'get', url:`/api/proxy/ffmpeg_cmd/list`, params: { - mediaServerId: this.streamProxy.mediaServerId + mediaServerId: this.streamProxy.relatesMediaServerId } }).then((res)=> { this.ffmpegCmdList = res.data.data;