Commit 4f9774ea by guoxuejian

feat: add liveRefresh and liveRefreshStop methods for enhanced live stream control

parent 896e7997
...@@ -44,6 +44,13 @@ public interface ILiveStreamService { ...@@ -44,6 +44,13 @@ public interface ILiveStreamService {
HttpResultResponse liveStart(LiveTypeDTO liveParam); HttpResultResponse liveStart(LiveTypeDTO liveParam);
/** /**
* 直播重启:执行 stop->start,并向工作空间广播 begin/success/failed;同一路流 10 秒内防抖。
* @param liveParam 重启参数(至少包含 workspaceId、videoId)
* @return 操作结果
*/
HttpResultResponse liveRestart(LiveTypeDTO liveParam);
/**
* Stop the live streaming by publishing mqtt message. * Stop the live streaming by publishing mqtt message.
* @param videoId * @param videoId
* @return * @return
...@@ -94,4 +101,20 @@ public interface ILiveStreamService { ...@@ -94,4 +101,20 @@ public interface ILiveStreamService {
*/ */
HttpResultResponse liveForceStop(VideoId videoId); HttpResultResponse liveForceStop(VideoId videoId);
/**
* 刷新专用停流:只停设备流,不清除会话(其他客户端保持 session_id 等待重新推流)。
* 如果停流失败,会清除所有会话作为兜底。
* @param videoId 直播流标识
* @return 操作结果
*/
HttpResultResponse liveRefreshStop(VideoId videoId);
/**
* 直播刷新:由前端控制的刷新流程,执行 refreshStop + start + broadcast。
* 其他客户端收到广播后复用 session_id 等待 MQTT 推流消息自动恢复。
* @param liveParam 刷新参数(必须包含 workspaceId、videoId、urlType)
* @return 操作结果
*/
HttpResultResponse liveRefresh(LiveTypeDTO liveParam);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment