视频流适配内外网

This commit is contained in:
lxj
2025-08-29 11:34:13 +08:00
parent b309eba099
commit d6c3048a9f
3 changed files with 12 additions and 18 deletions

View File

@@ -11,10 +11,7 @@ import { deviceManageList } from '#/api/sis/deviceManage/index.js';
import { deviceChannelList } from '#/api/sis/deviceChannel/index.js';
import mpegts from 'mpegts.js';
import { message } from 'ant-design-vue';
import {
addFFmpegMediaStreamProxy,
addMediaStreamProxy,
} from '#/api/sis/stream/index.js';
import { addMediaStreamProxy } from '#/api/sis/stream/index.js';
import { checkHEVCSupport } from '#/utils/video.js';
// 地图全局对象
@@ -114,7 +111,8 @@ function loadCameraData() {
function doPlayer(nodeData) {
if (mpegts.isSupported()) {
streamProxy(nodeData, (res) => {
const url = res.flv;
const host = window.location.host;
const url = `http://${host}/${res.app}/${res.streamId}.live.flv`;
// 将url 绑定到 nodeData
nodeData.url = url;
closeVideo(currentPlayer);
@@ -152,8 +150,8 @@ function streamProxy(params, cb) {
if (isSupportH265) {
addMediaStreamProxy(params).then((res) => cb(res));
} else {
// addMediaStreamProxy(params).then((res) => cb(res));
addFFmpegMediaStreamProxy(params).then((res) => cb(res));
addMediaStreamProxy(params).then((res) => cb(res));
// addFFmpegMediaStreamProxy(params).then((res) => cb(res));
}
}