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