类型:开发

描述:
This commit is contained in:
2026-02-09 10:28:57 +08:00
parent e21e9999c7
commit 7eaa48e2cb
2 changed files with 10 additions and 18 deletions

View File

@@ -437,15 +437,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'){