Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-07-18 17:47:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a3a30e5b2882a8dae5b93be8dad598e777187a35
a3a30e5b
1 parent
47e52ff1
fix: uat进入app宁夏地方频道下点击配置回看类的直播节目“迷魂台”,鸿蒙版无进度条,无法暂停和快进快退
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
33 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerVideoControlComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
View file @
a3a30e5
...
...
@@ -60,9 +60,9 @@ export struct PlayerTitleComponent {
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(2,1);
}
if(this.playerController.onVideoSizePlayerUIComponentMethod){
this.playerController.onVideoSizePlayerUIComponentMethod(2,1);
}
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(2,1);
// }
}
})
Text(this.contentDetailData.newsTitle || '')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
View file @
a3a30e5
import { WindowModel } from 'wdKit';
import { WDAliPlayerController } from 'wdPlayer/Index';
import { PlayerCommentComponent } from './PlayerCommentComponent';
import { PlayerTitleComponent } from './PlayerTitleComponent';
import { PlayerVideoControlComponent } from './PlayerVideoControlComponent';
import { window } from '@kit.ArkUI';
import { DisplayDirection } from 'wdConstant';
/**
* 沉浸直播 --- 横滑展示组件
...
...
@@ -9,20 +12,56 @@ import { PlayerVideoControlComponent } from './PlayerVideoControlComponent';
@Component
export struct PlayerUIComponent {
private playerController?: WDAliPlayerController
@
Stat
e isSmall:boolean = false
@
Provid
e isSmall:boolean = false
@Consume isShowControl: boolean
@Consume displayDirection: DisplayDirection
aboutToAppear() {
if (!this.playerController) {
return
}
this.playerController.onVideoSizePlayerUIComponentMethod = (width: number, height: number) => {
if
(width>
height){
if
(width >
height){
this.isSmall = true
}
else
{
}
else
{
this.isSmall = false
}
}
}
@Builder
fullScreen() {
//全屏按钮
Image($r('app.media.icon_live_player_full_screen'))
.height(32)
.width(32)
.padding(5)
.borderRadius($r('app.float.vp_16'))
.border({width:0.5})
.borderColor(0x4DFFFFFF)
.backgroundColor(0x4D222222)
.margin({right:10})
.onClick(() => {
WindowModel.shared.setSpecificSystemBarEnabled(false)
this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
WindowModel.shared.setPreferredOrientation(
window.Orientation.LANDSCAPE_INVERTED)
if(this.playerController){
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
// }
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(1,2)
}
if(this.playerController.onVideoSizePlayerTitleComponentBack){
this.playerController.onVideoSizePlayerTitleComponentBack(1,2)
}
}
})
.visibility(this.isSmall ? Visibility.Visible : Visibility.Hidden)
.margin({ top: 301}) // 195 + 211 - 105
.position({ x: '96.8%' })
.markAnchor({ x: '96.8%' })
}
build() {
Stack() {
// 标题
...
...
@@ -35,11 +74,12 @@ export struct PlayerUIComponent {
.markAnchor({ y: '100%' })
PlayerVideoControlComponent({ playerController: this.playerController })
.visibility(this.isShowControl ? Visibility.Visible :
this.isSmall? Visibility.Visible:
Visibility.Hidden)
.visibility(this.isShowControl ? Visibility.Visible : Visibility.Hidden)
.animation({ duration: 500 })
.position({ y: '100%' })
.markAnchor({ y: '100%' })
.margin({ top: this.isSmall ? 195 + 211 - 105 : 0})
this.fullScreen()
}
.height('100%')
.width('100%')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerVideoControlComponent.ets
View file @
a3a30e5
...
...
@@ -16,6 +16,7 @@ export struct PlayerVideoControlComponent {
@State isPlayStatus: boolean = true
@Consume displayDirection: DisplayDirection
@Consume contentDetailData: ContentDetailDTO
@Consume isSmall:boolean
aboutToAppear(): void {
if (this.playerController) {
...
...
@@ -60,33 +61,35 @@ export struct PlayerVideoControlComponent {
})
}
//全屏按钮
Image($r('app.media.icon_live_player_full_screen'))
.height(32)
.width(32)
.padding(5)
.borderRadius($r('app.float.vp_16'))
.border({width:0.5})
.borderColor(0x4DFFFFFF)
.backgroundColor(0x4D222222)
.margin({right:10})
.onClick(() => {
WindowModel.shared.setSpecificSystemBarEnabled(false)
this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
WindowModel.shared.setPreferredOrientation(
window.Orientation.LANDSCAPE_INVERTED)
if(this.playerController){
if(this.playerController.onVideoSizePlayerUIComponentMethod){
this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
}
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(1,2)
}
if(!this.isSmall) {
Image($r('app.media.icon_live_player_full_screen'))
.height(32)
.width(32)
.padding(5)
.borderRadius($r('app.float.vp_16'))
.border({width:0.5})
.borderColor(0x4DFFFFFF)
.backgroundColor(0x4D222222)
.margin({right:10})
.onClick(() => {
WindowModel.shared.setSpecificSystemBarEnabled(false)
this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
WindowModel.shared.setPreferredOrientation(
window.Orientation.LANDSCAPE_INVERTED)
if(this.playerController){
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
// }
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(1,2)
}
if(this.playerController.onVideoSizePlayerTitleComponentBack){
this.playerController.onVideoSizePlayerTitleComponentBack(1,2)
if(this.playerController.onVideoSizePlayerTitleComponentBack){
this.playerController.onVideoSizePlayerTitleComponentBack(1,2)
}
}
}
})
})
}
}
.alignItems(VerticalAlign.Center)
// .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
...
...
Please
register
or
login
to post a comment