类型:开发

描述:
This commit is contained in:
2026-02-09 10:23:14 +08:00
parent affc881aaa
commit 3e9f7133de
2 changed files with 10 additions and 19 deletions

View File

@@ -422,15 +422,11 @@
cameraIndexCode.value = code
setTimeout(() => {
if (url.startsWith('http://192.168.77.200:8050/')) {
if(hlsRef){
hlsRef.updateUrl(url);
}else{
hlsRef = new WebRTCWhep({
url: url, // WHEP 服务器地址
container: videoRef.value, // 视频播放容器
iceServers: [{ urls: 'turn:192.168.77.200:3478',username: 'ZLMediaKit',credential: 'ZLMediaKit'}]
})
}
hlsRef = new WebRTCWhep({
url: url, // WHEP 服务器地址
container: videoRef.value, // 视频播放容器
iceServers: [{ urls: 'turn:192.168.77.200:3478',username: 'ZLMediaKit',credential: 'ZLMediaKit'}]
})
hlsRef.on('error', (error) => {
console.error('错误:', error.message, error.type)
if(error.type ==='REQUEST_ERROR' || error.type ==='NOT_FOUND_ERROR'){

View File

@@ -375,16 +375,11 @@ const handleItemVideo = async (url, type, code, item) => {
cameraIndexCode.value = code
setTimeout(() => {
if (url.startsWith('http://192.168.77.200:8050/')) {
if(hlsRef){
hlsRef.updateUrl(url);
}else{
hlsRef = new WebRTCWhep({
url: url, // WHEP 服务器地址
container: videoRef.value, // 视频播放容器
iceServers: [{ urls: 'turn:192.168.77.200:3478',username: 'ZLMediaKit',credential: 'ZLMediaKit'}]
})
}
hlsRef = new WebRTCWhep({
url: url, // WHEP 服务器地址
container: videoRef.value, // 视频播放容器
iceServers: [{ urls: 'turn:192.168.77.200:3478',username: 'ZLMediaKit',credential: 'ZLMediaKit'}]
})
hlsRef.on('error', (error) => {
console.error('错误:', error.message, error.type)
if(error.type ==='REQUEST_ERROR' || error.type ==='NOT_FOUND_ERROR'){