wuyanan

ref |>修复缺陷 20481- 进入拉流直播-whh6666直播间-点击全屏按钮,进入全屏,播放控件和标题未实现3s自动隐藏

... ... @@ -13,9 +13,26 @@ import { DisplayDirection } from 'wdConstant';
export struct PlayerUIComponent {
private playerController?: WDAliPlayerController
@Provide isSmall:boolean = false
@Consume isShowControl: boolean
@Consume @Watch('onChangeMenuVisible') isShowControl: boolean
@Consume isFullScreen: boolean
@Consume displayDirection: DisplayDirection
@State isPlayStatus: boolean = true;
onChangeMenuVisible() {
if (this.displayDirection == DisplayDirection.VERTICAL
|| !this.isShowControl
|| !this.isPlayStatus) {
return
}
let time: number = 0
if (this.isShowControl) {
setTimeout(() => {
this.isShowControl = false
}, 5 * 1000)
} else {
clearTimeout(time)
}
}
aboutToAppear() {
if (!this.playerController) {
return
... ... @@ -76,7 +93,7 @@ export struct PlayerUIComponent {
.position({ y: '100%' })
.markAnchor({ y: '100%' })
PlayerVideoControlComponent({ playerController: this.playerController })
PlayerVideoControlComponent({ playerController: this.playerController,isPlayStatus: $isPlayStatus})
.visibility(this.isShowControl ? Visibility.Visible : Visibility.Hidden)
.animation({ duration: 500 })
.position({ y: '100%' })
... ...
... ... @@ -13,7 +13,7 @@ export struct PlayerVideoControlComponent {
@State totalTime: string = ''
@State progressVal: number = 0;
//是否处于播放状态中
@State isPlayStatus: boolean = true
@Link isPlayStatus?: boolean
@Consume displayDirection: DisplayDirection
@Consume contentDetailData: ContentDetailDTO
@Consume isSmall:boolean
... ...