类型:开发

描述:
This commit is contained in:
2026-02-09 12:20:57 +08:00
parent 7eaa48e2cb
commit 224fa546bf

View File

@@ -159,11 +159,7 @@ export default {
initializePlayer() {
if (!this.isActive || !this.url) return
// 如果是重新初始化播放器,先清理已存在的资源
if (this.hls) {
this.immediateCleanup()
}
if(this.url.startsWith('http://192.168.77.200:8050/')){
this.hls = new WebRTCWhep({
url: this.url, // WHEP 服务器地址
@@ -180,6 +176,9 @@ export default {
// this.initializePlayer();
})
}else{
if (this.hls) {
this.immediateCleanup()
}
this.hls = new Hls({
// 内存优化配置
maxBufferSize: 0, // 降低缓冲区大小15MB