PlayerUIComponent.ets
1.05 KB
import { WDAliPlayerController } from 'wdPlayer/Index';
import { PlayerCommentComponent } from './PlayerCommentComponent';
import { PlayerTitleComponent } from './PlayerTitleComponent';
import { PlayerVideoControlComponent } from './PlayerVideoControlComponent';
/**
* 沉浸直播 --- 横滑展示组件
*/
@Component
export struct PlayerUIComponent {
private playerController?: WDAliPlayerController
@Consume isShowControl: boolean
build() {
Stack() {
PlayerTitleComponent()
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)
}
}