王士厅

fix: 沉浸式视频增加播放中关闭,开启wifi视频流量提示逻辑

... ... @@ -245,6 +245,13 @@ export struct DetailPlayShortVideoPage {
// 注册监听网络连接
if (this.currentIndex === this.index && type != NetworkType.TYPE_UNKNOWN) {
console.log(TAG, '网络连接状态变化', type, 'this.currentIndex', this.currentIndex, 'this.index', this.index)
if(type == NetworkType.TYPE_CELLULAR) {
this.toastTextVisible = true
this.onlyWifiLoadVideo = false
} else if(type == NetworkType.TYPE_WIFI) {
this.toastTextVisible = false
this.onlyWifiLoadVideo = true
}
this.currentIndexChange()
}
}, 1000)
... ... @@ -426,10 +433,7 @@ export struct DetailPlayShortVideoPage {
.onClick(() => {
this.onlyWifiLoadVideo = true
this.toastTextVisible = false
this.playerController?.play()
this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
this.currentIndexChange()
})
}
.width('100%')
... ...