PlayerUIComponent.ets
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { ContentDetailDTO } from 'wdBean/Index';
import { WDPlayerController } from 'wdPlayer/Index';
import { PlayerCommentComponent } from './PlayerCommentComponent';
import { PlayerTitleComponent } from './PlayerTitleComponent';
import { PlayerVideoControlComponent } from './PlayerVideoControlComponent';
@Component
export struct PlayerUIComponent {
private playerController?: WDPlayerController
@Consume isShowControl: boolean
build() {
Stack() {
PlayerTitleComponent()
// Row() {
// // 全屏与暂停按钮
// }.layoutWeight(1)
PlayerCommentComponent()
.visibility(this.isShowControl ? Visibility.Hidden : Visibility.Visible)
.animation({ duration: 500 })
.position({ y: '100%' })
.markAnchor({ y: '100%' })
PlayerVideoControlComponent({ playerController: this.playerController })
.visibility(this.isShowControl ? Visibility.Visible : Visibility.Hidden)
.animation({ duration: 500 })
.position({ y: '100%' })
.markAnchor({ y: '100%' })
}
.height('100%')
.width('100%')
.alignContent(Alignment.TopStart)
}
}