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-04-25 17:54:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
40fcb684912c5ebc5722c23dfb6bb977702f7672
40fcb684
1 parent
ae0d33ce
视频seek后播放
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
sight_harmony/features/wdPlayer/src/main/ets/controller/WDPlayerController.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
View file @
40fcb68
...
...
@@ -15,7 +15,9 @@ export struct PlayerProgressView {
if (this.playerController) {
this.playerController.onStatusChange = (status: number) => {
this.status = status
console.log('=============', this.status)
}
this.playerController.onSeekDone = (status: number) => {
this.playerController?.play()
}
}
}
...
...
sight_harmony/features/wdPlayer/src/main/ets/controller/WDPlayerController.ets
View file @
40fcb68
...
...
@@ -23,6 +23,7 @@ export class WDPlayerController {
public continue?: () => void;
public onCanplay?: () => void;
public onStatusChange?: (status: number) => void;
public onSeekDone?: (time: number) => void;
constructor() {
Logger.error("初始化")
...
...
@@ -122,6 +123,9 @@ export class WDPlayerController {
})
this.avPlayer?.on('seekDone', (time: number) => {
this.initProgress(time);
if (this.onSeekDone) {
this.onSeekDone(time);
}
})
this.avPlayer?.on(Events.VIDEO_SIZE_CHANGE, (width: number, height: number) => {
if (this.onVideoSizeChange) {
...
...
Please
register
or
login
to post a comment