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
wangyujian_wd
2024-04-19 12:18:53 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
8469939c25ed2d1a4fab63c85863f7c95fae48d9
8469939c
2 parents
9745e2d1
41773d50
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
155 additions
and
170 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageDownloadComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/constants/ContentConstants.ets
sight_harmony/features/wdComponent/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdComponent/src/main/resources/base/media/logo_rmh.png
sight_harmony/features/wdComponent/src/main/resources/base/media/logo_rmrb.png
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
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/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/DetailContainer.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/DetailDialog.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerDetailContainer.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleComment.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
8469939
import { Logger, NumberFormatterUtils } from 'wdKit';
import { Logger, NumberFormatterUtils
, DateTimeUtils
} from 'wdKit';
import {
Action,
ContentDetailDTO,
...
...
@@ -14,15 +14,15 @@ import DetailViewModel from '../viewmodel/DetailViewModel';
import { ImageAndTextWebComponent } from './ImageAndTextWebComponent';
import router from '@ohos.router';
import { RecommendList } from '../components/view/RecommendList'
import { CommonConstants } from 'wdConstant'
import { CommonConstants } from 'wdConstant'
;
import { HttpUrlUtils } from 'wdNetwork/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
import { PageRepository } from '../repository/PageRepository';
import { detailedSkeleton } from './skeleton/detailSkeleton'
import { detailedSkeleton } from './skeleton/detailSkeleton';
const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm';
const TAG = 'ImageAndTextPageComponent'
@Component
export struct ImageAndTextPageComponent {
scroller: Scroller = new Scroller();
...
...
@@ -32,7 +32,7 @@ export struct ImageAndTextPageComponent {
@State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
@State interactData: InteractDataDTO = {} as InteractDataDTO
@State isPageEnd: boolean = false
@State publishTime: string = ''
build() {
Column() {
if (!this.isPageEnd) {
...
...
@@ -40,10 +40,10 @@ export struct ImageAndTextPageComponent {
} else {
// 发布时间
Row() {
Image($r('app.media.icon_ren_min_ri_bao'))
.width(70)
Image(this.contentDetailData[0]?.rmhInfo ? $r('app.media.logo_rmh') : $r('app.media.logo_rmrb'))
.width(80)
.height(28)
Text(this.contentDetailData[0]?
.publishTime)
Text(this
.publishTime)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize($r('app.float.font_size_13'))
.height('100%')
...
...
@@ -151,6 +151,8 @@ export struct ImageAndTextPageComponent {
let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans;
let dateTime = DateTimeUtils.parseDate(this.contentDetailData[0]?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
this.publishTime = DateTimeUtils.formatDate(dateTime,PATTERN_DATE_CN_RN)
if (this.contentDetailData[0]?.recommendShow === 1) {
this.getRecommend()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ImageDownloadComponent.ets
View file @
8469939
...
...
@@ -7,10 +7,14 @@ import { photoAccessHelper } from '@kit.MediaLibraryKit';
import fs from '@ohos.file.fs';
const PERMISSIONS: Array<Permissions> = [
'ohos.permission.READ_MEDIA',
'ohos.permission.WRITE_MEDIA'
'ohos.permission.READ_IMAGEVIDEO',
'ohos.permission.WRITE_IMAGEVIDEO'
];
/*
* saveButton参考文档
* https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/savebutton-0000001820999677
* */
@Component
export struct ImageDownloadComponent {
@State image: PixelMap | undefined = undefined;
...
...
@@ -20,12 +24,8 @@ export struct ImageDownloadComponent {
build() {
Column() {
Image($r('app.media.icon_arrow_left_white'))
.width(24)
.height(24)
.aspectRatio(1)
.interpolation(ImageInterpolation.High)
.rotate({ angle: -90 })
SaveButton({ icon: SaveIconStyle.LINES })
.iconColor(Color.White)
.onClick(async () => {
console.info(`cj2024 onClick ${this.imageBuffer}`)
if (this.imageBuffer !== undefined) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
8469939
...
...
@@ -15,7 +15,7 @@ export struct CardSourceInfo {
.margin({ right: 2 })
}
if (this.contentDTO.rmhPlatform === 1) {
Text(this.contentDTO.rmhInfo.rmhName)
Text(this.contentDTO.rmhInfo
?
.rmhName)
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
View file @
8469939
...
...
@@ -287,16 +287,6 @@ struct ChannelDialog {
.height('100%')
.justifyContent(FlexAlign.Center)
.backgroundColor(item.homeChannel === '1' || item.movePermitted === 0 ? '#F5F5F5' : '#ffffff')
.onClick(() => {
if (this.isEditIng) {
if (item.delPermitted === 1) {
this.delChannelItem(index)
}
} else {
this.confirm(index)
this.controller?.close()
}
})
}
.width('23%')
.height(40)
...
...
@@ -307,31 +297,40 @@ struct ChannelDialog {
})
.zIndex(this.dragItem == item.num ? 1 : 0)
.translate(this.dragItem == item.num ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 })
.gesture(
GestureGroup(GestureMode.Sequence,
PanGesture({ fingers: 1, direction: null, distance: 0 })
.onActionStart((event: GestureEvent) => {
this.dragItem = item.num
this.dragRefOffsetX = 0
this.dragRefOffsetY = 0
})
.onActionUpdate((event: GestureEvent) => {
animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
this.handleAnimationTo(item, event)
})
})
.onActionEnd((event: GestureEvent) => {
animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
this.dragItem = -1
this.offsetX = 0
this.offsetY = 0
GestureGroup(GestureMode.Sequence,
TapGesture()
.onAction((event?: GestureEvent) => {
if (this.isEditIng) {
if (item.delPermitted === 1) {
this.delChannelItem(index)
}
} else {
this.confirm(index)
this.controller?.close()
}
}),
PanGesture({ fingers: 1, direction: null, distance: 0 })
.onActionStart((event: GestureEvent) => {
this.dragItem = item.num
this.dragRefOffsetX = 0
this.dragRefOffsetY = 0
})
})
)
.onCancel(() => {
.onActionUpdate((event: GestureEvent) => {
animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
this.handleAnimationTo(item, event)
})
})
.onActionEnd((event: GestureEvent) => {
animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
this.dragItem = -1
this.offsetX = 0
this.offsetY = 0
this.dragRefOffsetX = 0
this.dragRefOffsetY = 0
})
})
).onCancel(() => {
animateTo({ curve: curves.interpolatingSpring(0, 1, 400, 38) }, () => {
this.dragItem = -1
this.offsetX = 0
...
...
@@ -339,8 +338,8 @@ struct ChannelDialog {
this.dragRefOffsetX = 0
this.dragRefOffsetY = 0
})
}))
})
)
}, (item: TopNavDTO) => JSON.stringify(item))
}
.width('100%')
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
View file @
8469939
...
...
@@ -66,15 +66,16 @@ struct MyCollectionListPage {
}
if (this.isEditState){
CustomBottomFuctionUI({
selectAllCallback:(isAllSelect)=>{
this.allSelectDatas(isAllSelect)
},
confirmCallback:()=>{
this.deleteDatas()
}
})
.position({y:'92%'})
Stack(){
CustomBottomFuctionUI({
selectAllCallback:(isAllSelect)=>{
this.allSelectDatas(isAllSelect)
},
confirmCallback:()=>{
this.deleteDatas()
}
})
}.position({y:'92%'})
}
}
.width(CommonConstants.FULL_WIDTH)
...
...
@@ -119,15 +120,21 @@ struct MyCollectionListPage {
MyCollectionViewModel.fetchMyCollectList(1,'1',this.currentPage,getContext(this)).then(collectionItem => {
if(resolve) resolve('刷新成功')
if (collectionItem && collectionItem.list && collectionItem.list.length > 0) {
if (this.currentPage === 1) this.allDatas = []
this.allDatas = this.allDatas.concat(...collectionItem.list)
if (collectionItem.totalCount === this.allDatas.length) {
if (this.currentPage === 1) {
this.allDatas = []
this.allDatas.push(...collectionItem.list)
}else {
this.allDatas = this.allDatas.concat(...collectionItem.list)
}
if (collectionItem.hasNext === 0) {
this.browSingModel.hasMore = false;
} else {
this.browSingModel.hasMore = true;
}
} else {
this.browSingModel.viewType = ViewType.EMPTY;
if (this.currentPage === 1) {
this.browSingModel.viewType = ViewType.EMPTY;
}
}
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
8469939
import { CommonConstants } from 'wdConstant'
import { ContentDTO,CompDTO } from 'wdBean'
import { ContentDTO, CompDTO } from 'wdBean'
import { ProcessUtils } from '../../utils/ProcessUtils';
@Component
export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
...
...
@@ -59,13 +60,12 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.padding({ left: (index == 0) ? 16 : 0, right: (index == this.compDTO.operDataList.length - 1) ? 16 : 0 })
// .offset({x:16})
.onClick(() => {
if (item.objectType != '0') {
console.log(item.objectId)
}
ProcessUtils.processPage(item)
})
})
}.listDirection(Axis.Horizontal)
.scrollBar(BarState.Off)
.width('100%')
// .backgroundColor($r("app.color.color_FE4B05"))
...
...
sight_harmony/features/wdComponent/src/main/ets/constants/ContentConstants.ets
View file @
8469939
...
...
@@ -16,6 +16,12 @@ export class ContentConstants {
* 5:专题详情
*/
static readonly TYPE_SPECIAL_TOPIC: string = "5";
/**
* 6:链接
*/
static readonly TYPE_LINK: string = "6";
/**
* 8:图文详情,这里是h5页面
*/
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/ProcessUtils.ets
View file @
8469939
...
...
@@ -43,6 +43,9 @@ export class ProcessUtils {
// 图文详情,跳转h5
ProcessUtils.gotoWeb(content);
break;
case ContentConstants.TYPE_LINK:
ProcessUtils.gotoDefaultWeb(content);
break;
//图集详情页
case ContentConstants.TYPE_NINE:
ProcessUtils.gotoAtlasDetailPage(content);
...
...
@@ -53,6 +56,7 @@ export class ProcessUtils {
break;
//动态详情页(动态图文)
case ContentConstants.TYPE_FOURTEEN:
break;
//动态详情页(动态视频)
case ContentConstants.TYPE_FIFTEEN:
ProcessUtils.gotoDynamicDetailPage(content);
...
...
@@ -113,6 +117,17 @@ export class ProcessUtils {
WDRouterRule.jumpWithAction(taskAction)
}
private static gotoDefaultWeb(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: content.linkUrl,
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `gotoWeb, ${content.objectId}`);
}
private static gotoWeb(content: ContentDTO) {
// // topicId
// content.channelId;
...
...
sight_harmony/features/wdComponent/src/main/resources/base/media/logo_rmh.png
0 → 100644
View file @
8469939
4.05 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/logo_rmrb.png
0 → 100644
View file @
8469939
4.26 KB
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
View file @
8469939
...
...
@@ -19,7 +19,8 @@ export struct DetailPlayVLivePage {
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@Provide liveDetailsBean: LiveDetailsBean = {} as LiveDetailsBean
@Provide liveRoomDataBean: LiveRoomDataBean = {} as LiveRoomDataBean
@Provide isMenuVisible: boolean = false
@Provide isShowControl: boolean = false
@Provide liveState: string = ''
@State relId: string = ''
@State contentId: string = ''
@State relType: string = ''
...
...
@@ -52,7 +53,7 @@ export struct DetailPlayVLivePage {
playerController: this.playerController
})
.onClick(() => {
this.is
MenuVisible = !this.isMenuVisible
this.is
ShowControl = !this.isShowControl
})
PlayerInfoComponent({
...
...
@@ -79,16 +80,13 @@ export struct DetailPlayVLivePage {
.width('100%')
}
onPageShow(): void {
}
getLiveDetails() {
this.liveViewModel.getLiveDetails(this.contentId, this.relId, this.relType)
.then(
(data) => {
if (data.length > 0) {
this.liveDetailsBean = data[0]
this.liveState = this.liveDetailsBean.liveInfo?.liveState
console.error('liveDetailsBean===', JSON.stringify((this.liveDetailsBean)))
}
},
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
View file @
8469939
...
...
@@ -6,6 +6,7 @@ import { NumberFormatterUtils } from 'wdKit/Index'
export struct PlayerTitleComponent {
@Consume liveDetailsBean: LiveDetailsBean
@Consume liveRoomDataBean: LiveRoomDataBean
@Consume liveState: string
build() {
Column() {
...
...
@@ -38,8 +39,9 @@ export struct PlayerTitleComponent {
Image(this.liveDetailsBean.rmhInfo?.rmhHeadUrl || '')
.width(24)
.aspectRatio(1)
.borderRadius(
'50%'
)
.borderRadius(
12
)
.fillColor(Color.Transparent)
Text(this.liveDetailsBean.rmhInfo?.rmhName || '')
.fontSize(12)
.fontWeight(500)
...
...
@@ -53,19 +55,20 @@ export struct PlayerTitleComponent {
}
.backgroundColor('#4D000000')
.borderRadius(2)
.borderRadius({ topLeft: 12, bottomLeft: 12 })
.margin({ right: 8 })
}
Row() {
if (this.live
DetailsBean.liveInfo?.live
State == 'running') {
if (this.liveState == 'running') {
Image($r('app.media.icon_live_status_running'))
.width(22)
.height(18)
.margin({ right: 1 })
}
Text(this.live
DetailsBean.liveInfo?.live
State == 'running' ? '直播中' : '回看')
Text(this.liveState == 'running' ? '直播中' : '回看')
.fontSize(11)
.fontWeight(400)
.fontColor(Color.White)
...
...
@@ -79,6 +82,6 @@ export struct PlayerTitleComponent {
}
.backgroundColor('#4D000000')
.borderRadius(2)
.padding(this.live
DetailsBean.liveInfo?.live
State == 'running' ? { left: 0, right: 4, top: 0, bottom: 0 } : 4)
.padding(this.liveState == 'running' ? { left: 0, right: 4, top: 0, bottom: 0 } : 4)
}
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
View file @
8469939
...
...
@@ -6,13 +6,17 @@ import { PlayerVideoControlComponent } from './PlayerVideoControlComponent';
@Component
export struct PlayerUIComponent {
private playerController?: WDPlayerController
@Consume liveState: string
build() {
Column() {
PlayerTitleComponent()
Blank()
// PlayerCommentComponent().layoutWeight(1)
PlayerVideoControlComponent({ playerController: this.playerController })
if (this.liveState === 'end') {
PlayerVideoControlComponent({ playerController: this.playerController })
}
}
.height('100%')
.width('100%')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerVideoControlComponent.ets
View file @
8469939
...
...
@@ -42,39 +42,36 @@ export struct PlayerVideoControlComponent {
@Builder
getBottomUIComponent() {
Row() {
if (this.liveDetailsBean?.liveInfo?.liveState == 'end') {
this.playOrPauseBtn()
Text(this.currentTime)
.fontColor(Color.White)
.fontWeight(600)
.fontSize('12fp')
.margin({
left: 16
})
this.playOrPauseBtn()
Text(this.currentTime)
.fontColor(Color.White)
.fontWeight(600)
.fontSize('12fp')
.margin({
left: 16
})
this.playProgressView()
this.playProgressView()
Text(this.totalTime)
.fontColor(Color.White)
.fontWeight(600)
.fontSize('12fp')
.margin({
right: 16
})
} else {
Blank()
}
Image($r('app.media.icon_live_player_full_screen'))
.width(24)
.height(24)
.onClick(() => {
this.isFullScreen = !this.isFullScreen
WindowModel.shared.setPreferredOrientation(this.isFullScreen ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT);
devicePLSensorManager.devicePLSensorOn(this.isFullScreen ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT);
Text(this.totalTime)
.fontColor(Color.White)
.fontWeight(600)
.fontSize('12fp')
.margin({
right: 16
})
// Image($r('app.media.icon_live_player_full_screen'))
// .width(24)
// .height(24)
// .onClick(() => {
// this.isFullScreen = !this.isFullScreen
// WindowModel.shared.setPreferredOrientation(this.isFullScreen ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT);
// devicePLSensorManager.devicePLSensorOn(this.isFullScreen ? window.Orientation.LANDSCAPE : window.Orientation.PORTRAIT);
// })
}
.alignItems(VerticalAlign.Center)
.linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
//
.linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
.width('100%')
.padding({
left: 10,
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
8469939
...
...
@@ -168,17 +168,15 @@ export struct DetailPlayShortVideoPage {
WDPlayerRenderView({
playerController: this.playerController,
onLoad: async () => {
// console.log('onload==', this.index)
// if (this.index === 0) {
if (this.contentDetailData != null && this.contentDetailData?.videoInfo[0] != null) {
this.playerController.firstPlay(this.contentDetailData.videoInfo[0].videoUrl);
}
// }
}
})
.height('100%')
.width('100%')
.margin({ top: this.videoLandScape === 1 ? 218 : 0 })
.align(this.videoLandScape === 1 ? Alignment.Top : Alignment.Start)
.onClick(() => {
console.error('WDPlayerRenderView=== onClick')
this.playerController?.switchPlayOrPause();
...
...
@@ -195,14 +193,13 @@ export struct DetailPlayShortVideoPage {
@Builder
detailContainerBuilder() {
// DetailTabBarPageComponent({ pageId: this.pageId }).backgroundColor(Color.Black)
DetailContainer({
playerController: this.playerController
})
}
build() {
Row
() {
Column
() {
PlayerDetailContainer({
playerView: () => {
this.playerViewContainerBuilder()
...
...
@@ -212,17 +209,8 @@ export struct DetailPlayShortVideoPage {
this.detailContainerBuilder()
}
})
.height('100%')
.width('100%')
.onClick(() => {
console.error('PlayerDetailContainer=== onClick')
this.playerController?.switchPlayOrPause();
})
}
.height('100%')
}.height('100%')
.width('100%')
.backgroundColor(Color.Black)
// 扩展至所有非安全区域
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/DetailContainer.ets
View file @
8469939
...
...
@@ -12,6 +12,5 @@ export struct DetailContainer {
PlayerTitleComment({
playerController: this.playerController
})
.width('100%')
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/DetailDialog.ets
View file @
8469939
...
...
@@ -45,7 +45,7 @@ export struct DetailDialog {
}
.width('100%')
.alignItems(HorizontalAlign.Start)
.backgroundColor(
Color.Gray
)
.backgroundColor(
'#80000000'
)
// .linearGradient({
// direction: GradientDirection.Top, // 渐变方向
// repeating: false, // 渐变颜色是否重复
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerDetailContainer.ets
View file @
8469939
...
...
@@ -60,52 +60,14 @@ export struct PlayerDetailContainer {
}
build() {
RelativeContainer() {
Row() {
Stack() {
Row() {
this.playerView()
}
.height('100%')
.width('100%')
.zIndex(0)
.margin({ top: this.videoLandScape === 1 ? 218 : 0 })
Row() {
this.playControlView()
}
.height('100%')
.width('100%')
.zIndex(1)
}
.width('100%')
.height('100%')
// .aspectRatio(this.isFullScreen ? 0.1 : 16 / 9.0) // 若width值确定,当aspectRatio值越小,则height值越大
// .height(this.isFullScreen ? '100%' : this.buildVideoHeight())
// .margin({ top: this.isFullScreen ? 0 : this.buildVideoTo() })
// .margin({ bottom: this.isFullScreen ? 0 : this.buildVideoBottom() })
.alignRules({
top: { anchor: '__container__', align: VerticalAlign.Top },
// middle: { anchor: '__container__', align: HorizontalAlign.Center }
})
.id('stk_player_container')
}.height('100%').layoutWeight(1)
if (this.isShowBottomView()) {
Row() {
this.detailView()
}
.width('100%')
// .opacity(0.3)
.alignRules({
bottom: { anchor: '__container__', align: VerticalAlign.Bottom },
// middle: { anchor: '__container__', align: HorizontalAlign.Center }
})
.id('row_bottomView')
}
Stack() {
this.playerView()
this.detailView()
}
.width('100%')
.height('100%')
// .backgroundColor(Color.Black) // 扩展至所有非安全区域
// .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleComment.ets
View file @
8469939
...
...
@@ -140,7 +140,11 @@ export struct PlayerTitleComment {
.width(48)
}
.width('100%')
.layoutWeight(1)
.alignItems(VerticalAlign.Bottom)
.onClick(() => {
this.playerController?.switchPlayOrPause()
})
Row() {
Column() {
...
...
@@ -194,9 +198,10 @@ export struct PlayerTitleComment {
}.backgroundColor(Color.Black)
}
.height('100%')
.width('100%')
// .height('40%')
.alignItems(HorizontalAlign.Start)
.alignItems(HorizontalAlign.End)
.align(Alignment.End)
.opacity(this.isOpen ? 0 : 1)
.animation({ duration: 200 })
}
...
...
Please
register
or
login
to post a comment