zhenghy

视频全屏修改

... ... @@ -31,7 +31,7 @@ export struct PlayerFullScreenView {
WindowModel.shared.setWindowSystemBarEnable([])
this.timer = setInterval(() => {
this.showOperator = false
}, 5)
}, 5000)
}
aboutToDisappear(): void {
... ... @@ -41,13 +41,20 @@ export struct PlayerFullScreenView {
restartTimer() {
clearInterval(this.timer)
this.showOperator = true
this.timer = setInterval(() => {
this.showOperator = false
}, 5)
}, 5000)
}
build() {
Stack() {
Row() {
}.height('100%').width('100%')
.onClick(() => {
this.restartTimer()
})
this.headerBuilder()
this.bottomBuilder()
... ... @@ -55,9 +62,7 @@ export struct PlayerFullScreenView {
.zIndex(99999)
.height('100%')
.width('100%')
.onClick(() => {
this.restartTimer()
})
}
@Builder
... ... @@ -94,6 +99,8 @@ export struct PlayerFullScreenView {
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 40, right: 40 })
.animation({ duration: 2000 })
.visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden)
.linearGradient({
direction: GradientDirection.Bottom, // 渐变方向
colors: [['rgba(0,0,0,0.5)', 0],
... ... @@ -152,6 +159,8 @@ export struct PlayerFullScreenView {
.markAnchor({ y: '100%' })
.align(Alignment.Bottom)
.padding({ left: 40, right: 40 })
.animation({ duration: 2000 })
.visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden)
.linearGradient({
direction: GradientDirection.Bottom, // 渐变方向
colors: [['rgba(0,0,0,0.5)', 0],
... ...