Showing
5 changed files
with
10 additions
and
29 deletions
| @@ -87,3 +87,5 @@ export { WDLiveViewDefaultType } from "./src/main/ets/components/view/LiveEmptyC | @@ -87,3 +87,5 @@ export { WDLiveViewDefaultType } from "./src/main/ets/components/view/LiveEmptyC | ||
| 87 | 87 | ||
| 88 | export { LiveFollowComponent } from "./src/main/ets/components/cardCommon/LiveFollowComponent" | 88 | export { LiveFollowComponent } from "./src/main/ets/components/cardCommon/LiveFollowComponent" |
| 89 | 89 | ||
| 90 | +export { publishCommentModel } from './src/main/ets/components/comment/model/PublishCommentModel'; | ||
| 91 | + |
| @@ -64,7 +64,7 @@ export struct OperRowListView { | @@ -64,7 +64,7 @@ export struct OperRowListView { | ||
| 64 | * 7:图集详情页 | 64 | * 7:图集详情页 |
| 65 | */ | 65 | */ |
| 66 | @Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口 | 66 | @Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口 |
| 67 | - @Prop pageComponentType?: number = -1 //1:视频详情页 2:竖屏直播页 3:图集 | 67 | + @Prop pageComponentType?: number = -1 //1:视频详情页 2:竖屏直播页 3:图集 4: 横屏直播页 |
| 68 | @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 68 | @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 69 | @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件 | 69 | @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件 |
| 70 | @State needLike: boolean = true | 70 | @State needLike: boolean = true |
| @@ -16,7 +16,7 @@ export struct PictureLoading { | @@ -16,7 +16,7 @@ export struct PictureLoading { | ||
| 16 | build() { | 16 | build() { |
| 17 | Row() { | 17 | Row() { |
| 18 | Image(this.imagePath) | 18 | Image(this.imagePath) |
| 19 | - .alt($r('app.media.picture_loading')) | 19 | + .alt($r('app.media.datail_imageLoading_w')) |
| 20 | .width(this.imageWidth) | 20 | .width(this.imageWidth) |
| 21 | .aspectRatio(this.ratio) | 21 | .aspectRatio(this.ratio) |
| 22 | .objectFit(ImageFit.Fill) | 22 | .objectFit(ImageFit.Fill) |
| @@ -38,8 +38,8 @@ export struct PlayerComponent { | @@ -38,8 +38,8 @@ export struct PlayerComponent { | ||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | async aboutToDisappear(): Promise<void> { | 40 | async aboutToDisappear(): Promise<void> { |
| 41 | - this.playerController?.pause() | ||
| 42 | - this.playerController?.stop() | 41 | + await this.playerController?.pause() |
| 42 | + await this.playerController?.stop() | ||
| 43 | await this.playerController?.release() | 43 | await this.playerController?.release() |
| 44 | } | 44 | } |
| 45 | 45 |
| @@ -151,8 +151,8 @@ export struct DetailPlayShortVideoPage { | @@ -151,8 +151,8 @@ export struct DetailPlayShortVideoPage { | ||
| 151 | 151 | ||
| 152 | aboutToAppear() { | 152 | aboutToAppear() { |
| 153 | this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape | 153 | this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape |
| 154 | - this.ratio = this.contentDetailData.videoInfo[0].resolutionWidth / | ||
| 155 | - this.contentDetailData.videoInfo[0].resolutionHeight | 154 | + this.ratio = (this.contentDetailData.videoInfo[0]?.resolutionWidth || 16) / |
| 155 | + (this.contentDetailData.videoInfo[0]?.resolutionHeight || 9) | ||
| 156 | this.playerController.onCanplay = async () => { | 156 | this.playerController.onCanplay = async () => { |
| 157 | this.ratio = this.playerController.videoWidth / this.playerController.videoHeight | 157 | this.ratio = this.playerController.videoWidth / this.playerController.videoHeight |
| 158 | if ((this.index == 0 || this.currentIndex === this.index) && this.switchVideoStatus) { | 158 | if ((this.index == 0 || this.currentIndex === this.index) && this.switchVideoStatus) { |
| @@ -269,13 +269,6 @@ export struct DetailPlayShortVideoPage { | @@ -269,13 +269,6 @@ export struct DetailPlayShortVideoPage { | ||
| 269 | 269 | ||
| 270 | this.playerCoverBuilder() | 270 | this.playerCoverBuilder() |
| 271 | 271 | ||
| 272 | - // .height(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? '100%' : | ||
| 273 | - // this.videoLandScape === 1 ? 210 : 'auto')// .height(this.videoLandScape === 1 ? 210 : '100%') | ||
| 274 | - // .width(this.videoLandScape === 1 ? | ||
| 275 | - // this.playerController.videoWidth / this.playerController.videoHeight * this.windowHeight + 'px' : '100%') | ||
| 276 | - // .height(this.videoLandScape === 1 ? 210 : | ||
| 277 | - // this.playerController.videoHeight / this.playerController.videoWidth * this.windowWidth + 'px') | ||
| 278 | - | ||
| 279 | // 横屏-全屏观看 | 272 | // 横屏-全屏观看 |
| 280 | if (this.videoLandScape === 1) { | 273 | if (this.videoLandScape === 1) { |
| 281 | this.playerFullscreenBuilder() | 274 | this.playerFullscreenBuilder() |
| @@ -283,10 +276,7 @@ export struct DetailPlayShortVideoPage { | @@ -283,10 +276,7 @@ export struct DetailPlayShortVideoPage { | ||
| 283 | } | 276 | } |
| 284 | .width('100%') | 277 | .width('100%') |
| 285 | .height('100%') | 278 | .height('100%') |
| 286 | - // .width(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? | ||
| 287 | - // this.playerController.videoWidth / this.playerController.videoHeight * this.windowHeight + 'px' : '100%') | ||
| 288 | - // .height(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? '100%' : 'auto') | ||
| 289 | - .align(this.videoLandScape === 1 ? Alignment.Center : Alignment.Top) | 279 | + .align(Alignment.Center) |
| 290 | 280 | ||
| 291 | } | 281 | } |
| 292 | 282 | ||
| @@ -312,18 +302,7 @@ export struct DetailPlayShortVideoPage { | @@ -312,18 +302,7 @@ export struct DetailPlayShortVideoPage { | ||
| 312 | .align(Alignment.Bottom) | 302 | .align(Alignment.Bottom) |
| 313 | .margin({ top: 280 }) | 303 | .margin({ top: 280 }) |
| 314 | .onClick(() => { | 304 | .onClick(() => { |
| 315 | - // this.displayDirection = | ||
| 316 | - // this.displayDirection === DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL : | ||
| 317 | - // DisplayDirection.VERTICAL | ||
| 318 | - // WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ? | ||
| 319 | - // window.Orientation.PORTRAIT : | ||
| 320 | - // window.Orientation.LANDSCAPE_INVERTED) | ||
| 321 | - | ||
| 322 | - // this.playerController.xComponentController?.setXComponentSurfaceRect({ | ||
| 323 | - // surfaceWidth: px2vp(this.windowHeight), | ||
| 324 | - // surfaceHeight: px2vp(this.playerController.videoWidth / this.playerController.videoHeight * this.windowHeight), | ||
| 325 | - // }) | ||
| 326 | - | 305 | + // 全屏方案待定 |
| 327 | }) | 306 | }) |
| 328 | 307 | ||
| 329 | } | 308 | } |
-
Please register or login to post a comment