修复工作

This commit is contained in:
2025-10-01 23:42:52 +08:00
parent a3e0a45b9c
commit 694ea5b1af
2 changed files with 6 additions and 5 deletions

View File

@@ -68,11 +68,12 @@ onMounted(() => {
const getDetails = async (deviceId) => { const getDetails = async (deviceId) => {
const res = await getDevice(deviceId); const res = await getDevice(deviceId);
tableData.value = res.data; tableData.value = res.data;
// 使用当前访问的域名和端口通过Nginx代理访问视频流 // 直接访问后端视频流服务器10083端口绕过Nginx反代避免缓冲问题
// 注意RTSP URL需要原样传递不要编码&&&作为特殊分隔符 // 注意RTSP URL需要原样传递不要编码&&&作为特殊分隔符
// 使用 ffmpeg=true系统 FFmpeg 包含完整的编码器支持(包括 libx264 // 使用 ffmpeg=true系统 FFmpeg 包含完整的编码器支持(包括 libx264
playUrl.value = `${window.location.origin}/live?url=${tableData.value.url}&&&ffmpeg=true`; const videoServerUrl = 'http://49.232.154.205:10083';
console.log('播放地址:', playUrl.value); playUrl.value = `${videoServerUrl}/live?url=${tableData.value.url}&&&ffmpeg=true`;
console.log('📺 播放地址(直连后端):', playUrl.value);
handlePlay(); handlePlay();
} }

View File

@@ -149,8 +149,8 @@ xss:
# 流媒体服务端口 # 流媒体服务端口
mediasServer: mediasServer:
port: ${MEDIA_SERVER_PORT:10083} port: ${MEDIA_SERVER_PORT:10083}
# 监听地址,支持环境变量配置(默认127.0.0.1只监听本地通过Nginx代理 # 监听地址,支持环境变量配置(0.0.0.0 允许外网直接访问
address: ${MEDIA_SERVER_ADDRESS:127.0.0.1} address: ${MEDIA_SERVER_ADDRESS:0.0.0.0}
# 网络超时15秒 # 网络超时15秒
netTimeout: 15000000 netTimeout: 15000000
# 读写超时15秒 # 读写超时15秒