fix: improve event script controls and daily reviews

This commit is contained in:
2026-04-26 21:16:26 +08:00
parent d2b2f714e0
commit ca2c559555
7 changed files with 86 additions and 12 deletions
+10
View File
@@ -95,12 +95,15 @@ const form = reactive<SystemSettings>({
forcePathStyle: false
},
enableEventScripts: false,
enableLiveStartedScript: false,
liveStartedScriptMode: "path",
liveStartedScriptPath: "",
liveStartedScriptContent: "",
enableLiveEndedScript: false,
liveEndedScriptMode: "path",
liveEndedScriptPath: "",
liveEndedScriptContent: "",
enableSegmentCompletedScript: false,
segmentCompletedScriptMode: "path",
segmentCompletedScriptPath: "",
segmentCompletedScriptContent: "",
@@ -986,6 +989,7 @@ onMounted(loadSettings);
<p class="event-script-section__subtitle">房间首次进入在线状态时触发</p>
</div>
<div class="event-script-section__actions">
<el-switch v-model="form.enableLiveStartedScript" inline-prompt active-text="开" inactive-text="关" />
<el-radio-group v-model="form.liveStartedScriptMode" size="small">
<el-radio-button
v-for="option in eventScriptModeOptions"
@@ -1039,6 +1043,7 @@ onMounted(loadSettings);
<p class="event-script-section__subtitle">房间从在线切回离线时触发</p>
</div>
<div class="event-script-section__actions">
<el-switch v-model="form.enableLiveEndedScript" inline-prompt active-text="开" inactive-text="关" />
<el-radio-group v-model="form.liveEndedScriptMode" size="small">
<el-radio-button
v-for="option in eventScriptModeOptions"
@@ -1092,6 +1097,7 @@ onMounted(loadSettings);
<p class="event-script-section__subtitle">MP4 转码完成并且分片状态变成 completed 后触发</p>
</div>
<div class="event-script-section__actions">
<el-switch v-model="form.enableSegmentCompletedScript" inline-prompt active-text="开" inactive-text="关" />
<el-radio-group v-model="form.segmentCompletedScriptMode" size="small">
<el-radio-button
v-for="option in eventScriptModeOptions"
@@ -1150,6 +1156,10 @@ onMounted(loadSettings);
如果脚本想把自定义内容写进系统日志请把文本写入 <code>LIVE_RECORDER_SCRIPT_LOG_PATH</code> 指向的临时文件
</div>
<div class="event-script-help__intro">
官方 Docker 镜像默认内置 <code>curl</code> <code>jq</code>如果你使用宿主机直跑或自定义镜像实际可用命令以运行环境为准
</div>
<div class="event-script-example">
<div class="event-script-example__label">环境变量示例值</div>
<div class="event-script-example__grid">