This commit is contained in:
eric
2025-09-08 15:58:34 +08:00
parent dd6fbe777e
commit c02a8f7172
15 changed files with 14 additions and 9 deletions

View File

@@ -386,7 +386,9 @@ const stopLive = async () => {
const thread_id = props.url.replace(/\//g, "_");
// 调用 FastAPI 停止接口
const res = await fetch("http://192.168.31.103:8700/stop_live", {
// const res = await fetch("http://192.168.31.103:8700/stop_live", {
const res = await fetch("http://127.0.0.1:8700/stop_live", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ thread_id }) // 如果想停止全部可以 body: {}
@@ -414,8 +416,8 @@ const loopLive = async () => {
console.log('file_path',file_path)
// 调用 FastAPI 后端接口
const res = await fetch("http://192.168.31.103:8700/loop_Live", {
// const res = await fetch("http://192.168.31.245:8700/start_live", {
// const res = await fetch("http://192.168.31.103:8700/loop_Live", {
const res = await fetch("http://127.0.0.1:8700/loop_Live", {
method: "POST",
headers: { "Content-Type": "application/json" },
@@ -444,7 +446,9 @@ const obsLive = async () => {
console.log('file_path for OBS:', file_path);
// 这里模拟 OBS 推流逻辑,你可以根据实际后端接口来调整
const res = await fetch("http://192.168.31.103:8700/obs_live", {
// const res = await fetch("http://192.168.31.103:8700/obs_live", {
const res = await fetch("http://127.0.0.1:8700/obs_live", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ filename: file_path })
@@ -472,7 +476,7 @@ const startLive = async () => {
// 调用 FastAPI 后端接口
const res = await fetch("http://192.168.31.103:8700/start_live", {
// const res = await fetch("http://192.168.31.245:8700/start_live", {
// const res = await fetch("http://127.0.0.1:8700/start_live", {
method: "POST",
headers: { "Content-Type": "application/json" },