Showing
5 changed files
with
12 additions
and
5 deletions
| @@ -10,6 +10,7 @@ export struct PlayerInfoComponent { | @@ -10,6 +10,7 @@ export struct PlayerInfoComponent { | ||
| 10 | @Consume liveState: string | 10 | @Consume liveState: string |
| 11 | @Consume isShowControl: boolean | 11 | @Consume isShowControl: boolean |
| 12 | @Link swiperIndex: number | 12 | @Link swiperIndex: number |
| 13 | + @Provide isFullScreen: boolean = false // 判断是否全屏,全屏状态下swiper禁止切换 | ||
| 13 | 14 | ||
| 14 | 15 | ||
| 15 | build() { | 16 | build() { |
| @@ -37,6 +38,7 @@ export struct PlayerInfoComponent { | @@ -37,6 +38,7 @@ export struct PlayerInfoComponent { | ||
| 37 | .onChange((index) => { | 38 | .onChange((index) => { |
| 38 | this.swiperIndex = index | 39 | this.swiperIndex = index |
| 39 | }) | 40 | }) |
| 41 | + .disableSwipe(this.isFullScreen) | ||
| 40 | } | 42 | } |
| 41 | .height('100%') | 43 | .height('100%') |
| 42 | .width('100%') | 44 | .width('100%') |
| @@ -19,6 +19,7 @@ export struct PlayerTitleComponent { | @@ -19,6 +19,7 @@ export struct PlayerTitleComponent { | ||
| 19 | @Consume displayDirection: DisplayDirection | 19 | @Consume displayDirection: DisplayDirection |
| 20 | @State isLarge:boolean = false | 20 | @State isLarge:boolean = false |
| 21 | private playerController?: WDAliPlayerController | 21 | private playerController?: WDAliPlayerController |
| 22 | + @Consume isFullScreen: boolean | ||
| 22 | 23 | ||
| 23 | aboutToAppear(): void { | 24 | aboutToAppear(): void { |
| 24 | if (!this.playerController) { | 25 | if (!this.playerController) { |
| @@ -64,6 +65,7 @@ export struct PlayerTitleComponent { | @@ -64,6 +65,7 @@ export struct PlayerTitleComponent { | ||
| 64 | // this.playerController.onVideoSizePlayerUIComponentMethod(2,1); | 65 | // this.playerController.onVideoSizePlayerUIComponentMethod(2,1); |
| 65 | // } | 66 | // } |
| 66 | } | 67 | } |
| 68 | + this.isFullScreen = false | ||
| 67 | }) | 69 | }) |
| 68 | Text(this.contentDetailData.newsTitle || '') | 70 | Text(this.contentDetailData.newsTitle || '') |
| 69 | .maxLines(2) | 71 | .maxLines(2) |
| @@ -14,6 +14,7 @@ export struct PlayerUIComponent { | @@ -14,6 +14,7 @@ export struct PlayerUIComponent { | ||
| 14 | private playerController?: WDAliPlayerController | 14 | private playerController?: WDAliPlayerController |
| 15 | @Provide isSmall:boolean = false | 15 | @Provide isSmall:boolean = false |
| 16 | @Consume isShowControl: boolean | 16 | @Consume isShowControl: boolean |
| 17 | + @Consume isFullScreen: boolean | ||
| 17 | @Consume displayDirection: DisplayDirection | 18 | @Consume displayDirection: DisplayDirection |
| 18 | aboutToAppear() { | 19 | aboutToAppear() { |
| 19 | if (!this.playerController) { | 20 | if (!this.playerController) { |
| @@ -56,6 +57,7 @@ export struct PlayerUIComponent { | @@ -56,6 +57,7 @@ export struct PlayerUIComponent { | ||
| 56 | this.playerController.onVideoSizePlayerTitleComponentBack(1,2) | 57 | this.playerController.onVideoSizePlayerTitleComponentBack(1,2) |
| 57 | } | 58 | } |
| 58 | } | 59 | } |
| 60 | + this.isFullScreen = true | ||
| 59 | }) | 61 | }) |
| 60 | .visibility(this.isSmall ? Visibility.Visible : Visibility.Hidden) | 62 | .visibility(this.isSmall ? Visibility.Visible : Visibility.Hidden) |
| 61 | .margin({ top: 301}) // 195 + 211 - 105 | 63 | .margin({ top: 301}) // 195 + 211 - 105 |
| @@ -17,6 +17,7 @@ export struct PlayerVideoControlComponent { | @@ -17,6 +17,7 @@ export struct PlayerVideoControlComponent { | ||
| 17 | @Consume displayDirection: DisplayDirection | 17 | @Consume displayDirection: DisplayDirection |
| 18 | @Consume contentDetailData: ContentDetailDTO | 18 | @Consume contentDetailData: ContentDetailDTO |
| 19 | @Consume isSmall:boolean | 19 | @Consume isSmall:boolean |
| 20 | + @Consume isFullScreen: boolean | ||
| 20 | 21 | ||
| 21 | aboutToAppear(): void { | 22 | aboutToAppear(): void { |
| 22 | if (this.playerController) { | 23 | if (this.playerController) { |
| @@ -88,6 +89,7 @@ export struct PlayerVideoControlComponent { | @@ -88,6 +89,7 @@ export struct PlayerVideoControlComponent { | ||
| 88 | this.playerController.onVideoSizePlayerTitleComponentBack(1,2) | 89 | this.playerController.onVideoSizePlayerTitleComponentBack(1,2) |
| 89 | } | 90 | } |
| 90 | } | 91 | } |
| 92 | + this.isFullScreen = true | ||
| 91 | }) | 93 | }) |
| 92 | } | 94 | } |
| 93 | } | 95 | } |
| @@ -96,11 +96,10 @@ export struct WDPlayerRenderVLiveView { | @@ -96,11 +96,10 @@ export struct WDPlayerRenderVLiveView { | ||
| 96 | if (this.onLoad) { | 96 | if (this.onLoad) { |
| 97 | this.onLoad(event) | 97 | this.onLoad(event) |
| 98 | } | 98 | } |
| 99 | - }) | ||
| 100 | - .width(this.selfSize.width) | ||
| 101 | - .height(this.selfSize.height) | ||
| 102 | - /*.height('100%') | ||
| 103 | - .width('100%')*/ | 99 | + })// .width(this.selfSize.width) |
| 100 | + // .height(this.selfSize.height) | ||
| 101 | + .height('100%') | ||
| 102 | + .width('100%') | ||
| 104 | .renderFit(RenderFit.RESIZE_FILL) | 103 | .renderFit(RenderFit.RESIZE_FILL) |
| 105 | } | 104 | } |
| 106 | .id(this.insId) | 105 | .id(this.insId) |
-
Please register or login to post a comment