类型:开发

描述:
This commit is contained in:
2026-02-09 12:26:18 +08:00
parent 3e9f7133de
commit 046aea0f55

View File

@@ -160,10 +160,6 @@
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,10 @@
// this.initializePlayer();
})
}else{
// 如果是重新初始化播放器,先清理已存在的资源
if (this.hls) {
this.immediateCleanup()
}
this.hls = new Hls({
// 内存优化配置
maxBufferSize: 0, // 降低缓冲区大小15MB