王士厅

fix: 视频频道中对视频在播放状态下,先暂停、再播放,然后切换到其他频道再返回、视频没有继续播放

... ... @@ -306,9 +306,9 @@ export struct DetailPlayShortVideoPage {
onHeightDidChange: (height: number) => {
this.playerWidth = px2vp(this.windowWidth)
this.playerHeight = px2vp(this.windowHeight - height)
Logger.debug(TAG,
"height: " + px2vp(height) + " ===> 视频高度: " + this.playerHeight + " window height: " +
px2vp(this.windowHeight))
// Logger.debug(TAG,
// "height: " + px2vp(height) + " ===> 视频高度: " + this.playerHeight + " window height: " +
// px2vp(this.windowHeight))
}
})
this.playerViewBuilder()
... ... @@ -332,13 +332,9 @@ export struct DetailPlayShortVideoPage {
.layoutWeight(1)
.onClick(() => {
this.playerController?.switchPlayOrPause();
this.isPlay = !this.isPlay
this.playerController.onStatusChange = (status: number) => {
this.status = status
if (status === PlayerConstants.STATUS_PAUSE) {
this.isPlay = false
} else if (status === PlayerConstants.STATUS_START) {
this.isPlay = true
}
}
})
... ...