王士厅
... ... @@ -85,7 +85,7 @@ export struct PlayerFullScreenView {
headerBuilder() {
Row() {
Row() {
Image($r(`app.media.ic_back`)).height(24).width(24)
Image($r(`app.media.icon_arrow_left_white`)).height(24).width(24)
.onClick(() => {
this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ?
DisplayDirection.VIDEO_HORIZONTAL :
... ... @@ -144,12 +144,12 @@ export struct PlayerFullScreenView {
.visibility(this.isDragging ? Visibility.Visible : Visibility.None)
Row() {
Image($r(`app.media.ic_play`)).height(24).width(24)
Image($r(`app.media.ic_play_2`)).height(24).width(24)
.visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible)
.onClick(() => {
this.playerController?.switchPlayOrPause()
})
Image($r(`app.media.ic_pause`)).height(24).width(24)
Image($r(`app.media.ic_pause_2`)).height(24).width(24)
.visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible)
.onClick(() => {
this.playerController?.switchPlayOrPause()
... ... @@ -196,8 +196,8 @@ export struct PlayerFullScreenView {
.visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden)
.linearGradient({
direction: GradientDirection.Bottom, // 渐变方向
colors: [['rgba(0,0,0,0.5)', 0],
['rgba(1,1,1,0)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果
colors: [['rgba(1,1,1,0)', 1.0],
['rgba(0,0,0,0.5)', 0]] // 数组末尾元素占比小于1时满足重复着色效果
})
}
... ...
... ... @@ -283,7 +283,7 @@ export struct PlayerTitleView {
@Builder
titleBuilder() {
Text() {
Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 234 - vp2px(50)))
Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 160 - vp2px(50)))
.fontSize(16)
.fontColor(Color.White)
.lineHeight(22)
... ...
... ... @@ -160,11 +160,14 @@ export struct WDPlayerRenderView {
if (info.size.width > 0 && info.size.height > 0) {
if (!this.liftVideo) {
let ratio = this.videoWidth / this.videoHeight
const height = info.size.width / ratio
Logger.debug(TAG, "ratio = " + ratio + " ==> new height = " + height)
if (this.videoHeight > 0 && this.videoWidth > 0) {
this.xComponentController.setXComponentSurfaceRect({
surfaceWidth: info.size.width,
surfaceHeight: info.size.width / this.videoRatio,
offsetY: this.isPad ? this.topSafeHeight : 0
offsetY: this.isPad ? this.topSafeHeight : (info.size.height - height) / 2
});
return
}
... ...
... ... @@ -48,6 +48,7 @@ export struct VideoChannelPage {
async aboutToAppear() {
// 背景图高度
this.backgroundImageH = px2vp(this.topSafeHeight) + 44
console.info(`cj2024 backgroundImageH = ${this.backgroundImageH} this.topSafeHeight = ${this.topSafeHeight}`)
this.setBarBackgroundColor()
}
... ... @@ -88,12 +89,12 @@ export struct VideoChannelPage {
* @returns
*/
tabSelectedColor(selected: boolean): string {
console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor}`)
console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor} selected = ${selected}`)
if (selected) {
return this.navItem.channelChooseColor ? this.navItem.channelChooseColor : '#222222'
} else {
let ccolor = this.navItem.channelChooseCColor.replace('#', '#B3')
return this.navItem.channelChooseCColor ? ccolor : '#666666'
let ccolor = this.navItem.channelChooseCColor.replace('#', '#99')
return this.navItem.channelChooseCColor ? ccolor : '#99FFFFFF'
}
}
... ... @@ -105,6 +106,7 @@ export struct VideoChannelPage {
this.topNavView()
}
.backgroundColor(Color.Black)
.width('100%')
.height('100%')
}
... ... @@ -207,6 +209,7 @@ export struct VideoChannelPage {
top: px2vp(this.topSafeHeight)
})
.visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
// .backgroundColor(Color.Blue)
.linearGradient({
colors: [
['rgba(18, 18, 18, 0.5)', 0.0], ['rgba(18, 18, 18, 0.0)', 1.0]
... ... @@ -269,6 +272,7 @@ export struct VideoChannelPage {
}
}, (item: TopNavDTO) => item.channelId + '')
}
.position({y:3})//顶部遮罩会空出一点,临时解决
.indicator(false)
.loop(false)
.width('100%')
... ...