王士厅
@@ -85,7 +85,7 @@ export struct PlayerFullScreenView { @@ -85,7 +85,7 @@ export struct PlayerFullScreenView {
85 headerBuilder() { 85 headerBuilder() {
86 Row() { 86 Row() {
87 Row() { 87 Row() {
88 - Image($r(`app.media.ic_back`)).height(24).width(24) 88 + Image($r(`app.media.icon_arrow_left_white`)).height(24).width(24)
89 .onClick(() => { 89 .onClick(() => {
90 this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ? 90 this.displayDirection = this.displayDirection == DisplayDirection.VERTICAL ?
91 DisplayDirection.VIDEO_HORIZONTAL : 91 DisplayDirection.VIDEO_HORIZONTAL :
@@ -144,12 +144,12 @@ export struct PlayerFullScreenView { @@ -144,12 +144,12 @@ export struct PlayerFullScreenView {
144 .visibility(this.isDragging ? Visibility.Visible : Visibility.None) 144 .visibility(this.isDragging ? Visibility.Visible : Visibility.None)
145 145
146 Row() { 146 Row() {
147 - Image($r(`app.media.ic_play`)).height(24).width(24) 147 + Image($r(`app.media.ic_play_2`)).height(24).width(24)
148 .visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible) 148 .visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible)
149 .onClick(() => { 149 .onClick(() => {
150 this.playerController?.switchPlayOrPause() 150 this.playerController?.switchPlayOrPause()
151 }) 151 })
152 - Image($r(`app.media.ic_pause`)).height(24).width(24) 152 + Image($r(`app.media.ic_pause_2`)).height(24).width(24)
153 .visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible) 153 .visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible)
154 .onClick(() => { 154 .onClick(() => {
155 this.playerController?.switchPlayOrPause() 155 this.playerController?.switchPlayOrPause()
@@ -196,8 +196,8 @@ export struct PlayerFullScreenView { @@ -196,8 +196,8 @@ export struct PlayerFullScreenView {
196 .visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden) 196 .visibility(this.showOperator ? Visibility.Visible : Visibility.Hidden)
197 .linearGradient({ 197 .linearGradient({
198 direction: GradientDirection.Bottom, // 渐变方向 198 direction: GradientDirection.Bottom, // 渐变方向
199 - colors: [['rgba(0,0,0,0.5)', 0],  
200 - ['rgba(1,1,1,0)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果 199 + colors: [['rgba(1,1,1,0)', 1.0],
  200 + ['rgba(0,0,0,0.5)', 0]] // 数组末尾元素占比小于1时满足重复着色效果
201 }) 201 })
202 202
203 } 203 }
@@ -283,7 +283,7 @@ export struct PlayerTitleView { @@ -283,7 +283,7 @@ export struct PlayerTitleView {
283 @Builder 283 @Builder
284 titleBuilder() { 284 titleBuilder() {
285 Text() { 285 Text() {
286 - Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 234 - vp2px(50))) 286 + Span(this.clipTitleText(this.getTitle(), 16, 4, this.windowWidth - 160 - vp2px(50)))
287 .fontSize(16) 287 .fontSize(16)
288 .fontColor(Color.White) 288 .fontColor(Color.White)
289 .lineHeight(22) 289 .lineHeight(22)
@@ -160,11 +160,14 @@ export struct WDPlayerRenderView { @@ -160,11 +160,14 @@ export struct WDPlayerRenderView {
160 if (info.size.width > 0 && info.size.height > 0) { 160 if (info.size.width > 0 && info.size.height > 0) {
161 161
162 if (!this.liftVideo) { 162 if (!this.liftVideo) {
  163 + let ratio = this.videoWidth / this.videoHeight
  164 + const height = info.size.width / ratio
  165 + Logger.debug(TAG, "ratio = " + ratio + " ==> new height = " + height)
163 if (this.videoHeight > 0 && this.videoWidth > 0) { 166 if (this.videoHeight > 0 && this.videoWidth > 0) {
164 this.xComponentController.setXComponentSurfaceRect({ 167 this.xComponentController.setXComponentSurfaceRect({
165 surfaceWidth: info.size.width, 168 surfaceWidth: info.size.width,
166 surfaceHeight: info.size.width / this.videoRatio, 169 surfaceHeight: info.size.width / this.videoRatio,
167 - offsetY: this.isPad ? this.topSafeHeight : 0 170 + offsetY: this.isPad ? this.topSafeHeight : (info.size.height - height) / 2
168 }); 171 });
169 return 172 return
170 } 173 }
@@ -48,6 +48,7 @@ export struct VideoChannelPage { @@ -48,6 +48,7 @@ export struct VideoChannelPage {
48 async aboutToAppear() { 48 async aboutToAppear() {
49 // 背景图高度 49 // 背景图高度
50 this.backgroundImageH = px2vp(this.topSafeHeight) + 44 50 this.backgroundImageH = px2vp(this.topSafeHeight) + 44
  51 + console.info(`cj2024 backgroundImageH = ${this.backgroundImageH} this.topSafeHeight = ${this.topSafeHeight}`)
51 this.setBarBackgroundColor() 52 this.setBarBackgroundColor()
52 } 53 }
53 54
@@ -88,12 +89,12 @@ export struct VideoChannelPage { @@ -88,12 +89,12 @@ export struct VideoChannelPage {
88 * @returns 89 * @returns
89 */ 90 */
90 tabSelectedColor(selected: boolean): string { 91 tabSelectedColor(selected: boolean): string {
91 - console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor}`) 92 + console.info(`cj2024 selected this.navItem.channelChooseColor=${this.navItem.channelChooseColor} selected = ${selected}`)
92 if (selected) { 93 if (selected) {
93 return this.navItem.channelChooseColor ? this.navItem.channelChooseColor : '#222222' 94 return this.navItem.channelChooseColor ? this.navItem.channelChooseColor : '#222222'
94 } else { 95 } else {
95 - let ccolor = this.navItem.channelChooseCColor.replace('#', '#B3')  
96 - return this.navItem.channelChooseCColor ? ccolor : '#666666' 96 + let ccolor = this.navItem.channelChooseCColor.replace('#', '#99')
  97 + return this.navItem.channelChooseCColor ? ccolor : '#99FFFFFF'
97 } 98 }
98 99
99 } 100 }
@@ -105,6 +106,7 @@ export struct VideoChannelPage { @@ -105,6 +106,7 @@ export struct VideoChannelPage {
105 106
106 this.topNavView() 107 this.topNavView()
107 } 108 }
  109 + .backgroundColor(Color.Black)
108 .width('100%') 110 .width('100%')
109 .height('100%') 111 .height('100%')
110 } 112 }
@@ -207,6 +209,7 @@ export struct VideoChannelPage { @@ -207,6 +209,7 @@ export struct VideoChannelPage {
207 top: px2vp(this.topSafeHeight) 209 top: px2vp(this.topSafeHeight)
208 }) 210 })
209 .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) 211 .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
  212 + // .backgroundColor(Color.Blue)
210 .linearGradient({ 213 .linearGradient({
211 colors: [ 214 colors: [
212 ['rgba(18, 18, 18, 0.5)', 0.0], ['rgba(18, 18, 18, 0.0)', 1.0] 215 ['rgba(18, 18, 18, 0.5)', 0.0], ['rgba(18, 18, 18, 0.0)', 1.0]
@@ -269,6 +272,7 @@ export struct VideoChannelPage { @@ -269,6 +272,7 @@ export struct VideoChannelPage {
269 } 272 }
270 }, (item: TopNavDTO) => item.channelId + '') 273 }, (item: TopNavDTO) => item.channelId + '')
271 } 274 }
  275 + .position({y:3})//顶部遮罩会空出一点,临时解决
272 .indicator(false) 276 .indicator(false)
273 .loop(false) 277 .loop(false)
274 .width('100%') 278 .width('100%')