PlayerBottomView.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 { WDPlayerController } from 'wdPlayer/Index';
import { PlayerTitleView } from './PlayerTitleView'
import { PlayerProgressView } from './PlayerProgressView'
import { ContentDetailDTO } from 'wdBean/Index';
import { DisplayDirection } from 'wdConstant/Index';
@Component
export struct PlayerBottomView {
private playerController?: WDPlayerController;
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Consume showComment?: boolean
@Consume isOpenDetail?: boolean
@Consume isDragging?: boolean
@Consume contentDetailData: ContentDetailDTO
@Consume displayDirection: DisplayDirection
aboutToAppear(): void {
}
build() {
Column() {
PlayerTitleView()
PlayerProgressView({ playerController: this.playerController })
}
.width('100%')
.alignItems(HorizontalAlign.Start)
.position({ x: 0, y: '100%' })
.markAnchor({ y: '100%' })
.linearGradient({
colors: [
['rgba(0, 0, 0, 0.0)', 0.0], ['rgba(0, 0, 0, 0.5)', 1.0]
]
})
.visibility(this.displayDirection === DisplayDirection.VERTICAL ?
Visibility.Visible : Visibility.None)
}
}