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
zhenghy
2024-05-15 15:26:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f2a32af18aba19c723ad23720fcd6059454406f8
f2a32af1
1 parent
280c0c7b
视频首帧图占位,人民日报gif动图
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
29 deletions
sight_harmony/features/wdComponent/Index.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PictureLoading.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdComponent/Index.ets
View file @
f2a32af
...
...
@@ -87,3 +87,5 @@ export { WDLiveViewDefaultType } from "./src/main/ets/components/view/LiveEmptyC
export { LiveFollowComponent } from "./src/main/ets/components/cardCommon/LiveFollowComponent"
export { publishCommentModel } from './src/main/ets/components/comment/model/PublishCommentModel';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
f2a32af
...
...
@@ -64,7 +64,7 @@ export struct OperRowListView {
* 7:图集详情页
*/
@Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
@Prop pageComponentType?: number = -1 //1:视频详情页 2:竖屏直播页 3:图集
@Prop pageComponentType?: number = -1 //1:视频详情页 2:竖屏直播页 3:图集
4: 横屏直播页
@State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件
@State needLike: boolean = true
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PictureLoading.ets
View file @
f2a32af
...
...
@@ -16,7 +16,7 @@ export struct PictureLoading {
build() {
Row() {
Image(this.imagePath)
.alt($r('app.media.
picture_loading
'))
.alt($r('app.media.
datail_imageLoading_w
'))
.width(this.imageWidth)
.aspectRatio(this.ratio)
.objectFit(ImageFit.Fill)
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerComponent.ets
View file @
f2a32af
...
...
@@ -38,8 +38,8 @@ export struct PlayerComponent {
}
async aboutToDisappear(): Promise<void> {
this.playerController?.pause()
this.playerController?.stop()
await this.playerController?.pause()
await this.playerController?.stop()
await this.playerController?.release()
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
f2a32af
...
...
@@ -151,8 +151,8 @@ export struct DetailPlayShortVideoPage {
aboutToAppear() {
this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape
this.ratio = this.contentDetailData.videoInfo[0].resolutionWidth /
this.contentDetailData.videoInfo[0].resolutionHeight
this.ratio = (this.contentDetailData.videoInfo[0]?.resolutionWidth || 16) /
(this.contentDetailData.videoInfo[0]?.resolutionHeight || 9)
this.playerController.onCanplay = async () => {
this.ratio = this.playerController.videoWidth / this.playerController.videoHeight
if ((this.index == 0 || this.currentIndex === this.index) && this.switchVideoStatus) {
...
...
@@ -269,13 +269,6 @@ export struct DetailPlayShortVideoPage {
this.playerCoverBuilder()
// .height(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? '100%' :
// this.videoLandScape === 1 ? 210 : 'auto')// .height(this.videoLandScape === 1 ? 210 : '100%')
// .width(this.videoLandScape === 1 ?
// this.playerController.videoWidth / this.playerController.videoHeight * this.windowHeight + 'px' : '100%')
// .height(this.videoLandScape === 1 ? 210 :
// this.playerController.videoHeight / this.playerController.videoWidth * this.windowWidth + 'px')
// 横屏-全屏观看
if (this.videoLandScape === 1) {
this.playerFullscreenBuilder()
...
...
@@ -283,10 +276,7 @@ export struct DetailPlayShortVideoPage {
}
.width('100%')
.height('100%')
// .width(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ?
// this.playerController.videoWidth / this.playerController.videoHeight * this.windowHeight + 'px' : '100%')
// .height(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? '100%' : 'auto')
.align(this.videoLandScape === 1 ? Alignment.Center : Alignment.Top)
.align(Alignment.Center)
}
...
...
@@ -312,18 +302,7 @@ export struct DetailPlayShortVideoPage {
.align(Alignment.Bottom)
.margin({ top: 280 })
.onClick(() => {
// this.displayDirection =
// this.displayDirection === DisplayDirection.VERTICAL ? DisplayDirection.VIDEO_HORIZONTAL :
// DisplayDirection.VERTICAL
// WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
// window.Orientation.PORTRAIT :
// window.Orientation.LANDSCAPE_INVERTED)
// this.playerController.xComponentController?.setXComponentSurfaceRect({
// surfaceWidth: px2vp(this.windowHeight),
// surfaceHeight: px2vp(this.playerController.videoWidth / this.playerController.videoHeight * this.windowHeight),
// })
// 全屏方案待定
})
}
...
...
Please
register
or
login
to post a comment