This commit is contained in:
eric
2025-09-08 11:28:16 +08:00
parent b2cf706636
commit f2ba6a0833
2 changed files with 13 additions and 2 deletions

View File

@@ -23,10 +23,14 @@
</button> </button>
<button v-if="!isDir && isVideoFile(name)" class="live-button" @click="startLive"> <button v-if="!isDir && isVideoFile(name)" class="live-button" @click="startLive">
单次直播 单次直播
</button>
<button v-if="!isDir && isVideoFile(name)" class="live-button" @click="obsLive">
obs推流
</button> </button>
<button v-if="!isDir && isVideoFile(name)" class="live-button" @click="stopLive"> <button v-if="!isDir && isVideoFile(name)" class="live-button" @click="stopLive">
停止直播 停止直播
</button> </button>
</p> </p>
</div> </div>
@@ -431,6 +435,9 @@ const loopLive = async () => {
} }
}; };
const obsLive = async () => {
};
const startLive = async () => { const startLive = async () => {
try { try {
// props.url 是 FileBrowser 内部路径,例如 /videos/test.mp4 // props.url 是 FileBrowser 内部路径,例如 /videos/test.mp4

View File

@@ -41,11 +41,15 @@ export default defineConfig(({ command }) => {
proxy: { proxy: {
// Zero3 后端 WebSocket(如果你有 ws 接口) // Zero3 后端 WebSocket(如果你有 ws 接口)
"/api/command": { "/api/command": {
target: "ws://live.local:8081", target: "ws://192.168.31.103:8081",
// target: "ws://live.local:8081",
ws: true, ws: true,
}, },
// Zero3 后端 HTTP // Zero3 后端 HTTP
"/api": "http://live.local:8081", "/api": "http://192.168.31.103:8081",
// "/api": "http://live.local:8081",
}, },
}, },
}; };