zhenghy

视频全屏修改

@@ -31,7 +31,7 @@ export struct PlayerFullScreenView { @@ -31,7 +31,7 @@ export struct PlayerFullScreenView {
31 WindowModel.shared.setWindowSystemBarEnable([]) 31 WindowModel.shared.setWindowSystemBarEnable([])
32 this.timer = setInterval(() => { 32 this.timer = setInterval(() => {
33 this.showOperator = false 33 this.showOperator = false
34 - }, 5) 34 + }, 5000)
35 } 35 }
36 36
37 aboutToDisappear(): void { 37 aboutToDisappear(): void {
@@ -41,13 +41,20 @@ export struct PlayerFullScreenView { @@ -41,13 +41,20 @@ export struct PlayerFullScreenView {
41 41
42 restartTimer() { 42 restartTimer() {
43 clearInterval(this.timer) 43 clearInterval(this.timer)
  44 + this.showOperator = true
44 this.timer = setInterval(() => { 45 this.timer = setInterval(() => {
45 this.showOperator = false 46 this.showOperator = false
46 - }, 5) 47 + }, 5000)
47 } 48 }
48 49
49 build() { 50 build() {
50 Stack() { 51 Stack() {
  52 + Row() {
  53 + }.height('100%').width('100%')
  54 + .onClick(() => {
  55 + this.restartTimer()
  56 + })
  57 +
51 this.headerBuilder() 58 this.headerBuilder()
52 59
53 this.bottomBuilder() 60 this.bottomBuilder()
@@ -55,9 +62,7 @@ export struct PlayerFullScreenView { @@ -55,9 +62,7 @@ export struct PlayerFullScreenView {
55 .zIndex(99999) 62 .zIndex(99999)
56 .height('100%') 63 .height('100%')
57 .width('100%') 64 .width('100%')
58 - .onClick(() => {  
59 - this.restartTimer()  
60 - }) 65 +
61 } 66 }
62 67
63 @Builder 68 @Builder
@@ -94,6 +99,8 @@ export struct PlayerFullScreenView { @@ -94,6 +99,8 @@ export struct PlayerFullScreenView {
94 .alignItems(VerticalAlign.Center) 99 .alignItems(VerticalAlign.Center)
95 .justifyContent(FlexAlign.SpaceBetween) 100 .justifyContent(FlexAlign.SpaceBetween)
96 .padding({ left: 40, right: 40 }) 101 .padding({ left: 40, right: 40 })
  102 + .animation({ duration: 2000 })
  103 + .visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden)
97 .linearGradient({ 104 .linearGradient({
98 direction: GradientDirection.Bottom, // 渐变方向 105 direction: GradientDirection.Bottom, // 渐变方向
99 colors: [['rgba(0,0,0,0.5)', 0], 106 colors: [['rgba(0,0,0,0.5)', 0],
@@ -152,6 +159,8 @@ export struct PlayerFullScreenView { @@ -152,6 +159,8 @@ export struct PlayerFullScreenView {
152 .markAnchor({ y: '100%' }) 159 .markAnchor({ y: '100%' })
153 .align(Alignment.Bottom) 160 .align(Alignment.Bottom)
154 .padding({ left: 40, right: 40 }) 161 .padding({ left: 40, right: 40 })
  162 + .animation({ duration: 2000 })
  163 + .visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden)
155 .linearGradient({ 164 .linearGradient({
156 direction: GradientDirection.Bottom, // 渐变方向 165 direction: GradientDirection.Bottom, // 渐变方向
157 colors: [['rgba(0,0,0,0.5)', 0], 166 colors: [['rgba(0,0,0,0.5)', 0],