From a395438ad4ea950664260e9f28a7c3d7382c88d8 Mon Sep 17 00:00:00 2001 From: qydysky <32743305+qydysky@users.noreply.github.com> Date: Sun, 29 Jan 2023 20:28:14 +0800 Subject: [PATCH] =?utf8?q?Add=20=E4=BF=AE=E6=94=B9=E6=A0=87=E9=A2=98?= =?utf8?q?=E6=97=B6=E9=87=8D=E6=96=B0=E5=BD=95=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/Reply.go | 26 +++++++++++++++++--------- demo/config/config_K_v.json | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Reply/Reply.go b/Reply/Reply.go index 822c661..7b49ad8 100644 --- a/Reply/Reply.go +++ b/Reply/Reply.go @@ -477,6 +477,14 @@ func (replyF) room_change(s string) { Gui_show(Itos(sh), "0room") msglog.Base_add("房").L(`I: `, sh...) + + //录制 + go func() { + if v, ok := c.C.K_v.LoadV(`修改标题时重新录制`).(bool); ok && v { + StreamOStop(c.C.Roomid) //停止其他房间录制 + } + StreamOStart(c.C.Roomid) + }() } // Msg-超管警告 @@ -523,18 +531,18 @@ func (replyF) little_tips(s string) { } // Msg-人气排名 -func (replyF) popular_rank_changed(s string) { - var type_item ws_msg.POPULAR_RANK_CHANGED +// func (replyF) popular_rank_changed(s string) { +// var type_item ws_msg.POPULAR_RANK_CHANGED - if e := json.Unmarshal([]byte(s), &type_item); e != nil { - msglog.L(`E: `, e) - } - s = fmt.Sprintf("人气排行 %d", type_item.Data.Rank) +// if e := json.Unmarshal([]byte(s), &type_item); e != nil { +// msglog.L(`E: `, e) +// } +// s = fmt.Sprintf("人气排行 %d", type_item.Data.Rank) - Gui_show(s, "0room") +// Gui_show(s, "0room") - msglog.Base_add("房").L(`I: `, s) -} +// msglog.Base_add("房").L(`I: `, s) +// } // Msg-开始了视频连线 func (replyF) video_connection_join_start(s string) { diff --git a/demo/config/config_K_v.json b/demo/config/config_K_v.json index 21b20df..50eda57 100644 --- a/demo/config/config_K_v.json +++ b/demo/config/config_K_v.json @@ -62,6 +62,7 @@ "直播hls流保存为MP4": true, "仅保存当前直播间流-help": "启用此项,才会保存Ass", "仅保存当前直播间流": true, + "修改标题时重新录制": true, "直播Web服务口":0, "直播Web缓冲长度-help":"非负整数,越长直播流延迟越高 内存占用越高", "直播Web缓冲长度":5, -- 2.39.2