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-11 11:08:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a980f71ebd9e1a75d0614564cb63c9bbb0e50f65
a980f71e
1 parent
36f4b643
feat:1)首页顶部人民日报跳转时间修改 2)直播详情页播放器部分验证逻辑添加
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
9 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TopPlayComponet.ets → sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/TopNavigationComponent.ets
View file @
a980f71
...
...
@@ -2,7 +2,7 @@ import { Action, CompDTO, Params, TopNavDTO } from 'wdBean';
import { LazyDataSource, Logger } from 'wdKit';
import { WDRouterRule } from 'wdRouter';
import { PageComponent } from './PageComponent';
import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout'
import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout'
;
import { FirstTabTopSearchComponent } from '../search/FirstTabTopSearchComponent';
const TAG = 'TopNavigationComponent';
...
...
@@ -154,10 +154,22 @@ export struct TopNavigationComponent {
Image($r('app.media.icon_ren_min_ri_bao'))
.width(72)
.height(29)
.onClick((event: ClickEvent) => {
// this.jumpToLiveDetailsPaper()
.gesture(
GestureGroup(GestureMode.Exclusive,
//播放器双击
TapGesture({ count: 2 })
.onAction((event?: GestureEvent) => {
if (event) {
this.jumpToLiveDetailsPaper()
}
}),
//播放器单击
TapGesture({ count: 1 })
.onAction((event?: GestureEvent) => {
if (event) {
this.jumpToENewPaper()
})
}
})))
Stack({ alignContent: Alignment.Center }) {
Image($r('app.media.background_read_paper_home'))
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
View file @
a980f71
import { BottomComponent } from '../widgets/details/BottomComponent';
import { TabComponent } from '../widgets/details/TabComponent';
import { TopPlayComponent } from '../widgets/details/TopPlayComponet';
import { TopPlayComponent } from '../widgets/details/
video/
TopPlayComponet';
@Entry
@Component
export struct DetailPlayLivePage {
TAG: string = 'DetailPlayLivePage';
@State playUrl:string=''
aboutToAppear(): void {
}
build() {
Column() {
TopPlayComponent()
TopPlayComponent(
{playUrl:this.playUrl}
)
TabComponent()
BottomComponent()
}
...
...
@@ -21,6 +21,11 @@ export struct DetailPlayLivePage {
.width('100%')
}
onPageShow(): void {
this.playUrl='https://rmrbcmsonline.peopleapp.com/upload/rmh/video/mp4/202404/1712667051b573b0f3a7a22375.mp4'
}
aboutToDisappear(): void {
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TopPlayComponet.ets → sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/
video/
TopPlayComponet.ets
View file @
a980f71
import { WDPlayerController, WDPlayerRenderView } from 'wdPlayer/Index';
@Component
export struct TopPlayComponent {
@Prop playUrl: string=''
aspectRatioPlayer: number = 375 / 211
@State playerController: WDPlayerController = new WDPlayerController();
aboutToAppear(): void {
setTimeout(() => {
this.playerController.switchPlayOrPause()
},2000)
}
build() {
Stack()
Stack() {
WDPlayerRenderView({
playerController: this.playerController,
onLoad: async () => {
this.playerController.firstPlay(this.playUrl);
}
})
.height('100%')
.width('100%')
.onClick(() => {
console.error('WDPlayerRenderView=== onClick')
this.playerController?.switchPlayOrPause();
})
}
.height(211)
.aspectRatio(this.aspectRatioPlayer)
.backgroundColor(Color.Black)
...
...
Please
register
or
login
to post a comment