类型:开发
描述:
This commit is contained in:
@@ -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'){
|
||||
|
||||
@@ -406,15 +406,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'){
|
||||
|
||||
Reference in New Issue
Block a user