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
chenqs
2024-07-25 15:12:49 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
9738004365e1faf3bc4f9a5eeb3a1a221730592f
97380043
2 parents
3c434aa5
700a8837
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerProgressView.ets
View file @
9738004
...
...
@@ -2,6 +2,7 @@ import { ContentDetailDTO } from 'wdBean/Index';
import { DateTimeUtils, ToastUtils } from 'wdKit/Index';
import { PlayerConstants, WDPlayerController } from 'wdPlayer/Index';
@Reusable
@Component
export struct PlayerProgressView {
private playerController?: WDPlayerController;
...
...
@@ -16,6 +17,7 @@ export struct PlayerProgressView {
@State showLoading: boolean = false
@Consume onlyWifiLoadVideo: boolean
timer: number = 0
aboutToAppear() {
if (this.playerController) {
this.playerController.onSeekDone = (status: number) => {
...
...
@@ -28,10 +30,12 @@ export struct PlayerProgressView {
if (this.onlyWifiLoadVideo) {
this.showLoading = true
}
// console.log("PlayerProgressView11", this.timer)
if(this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(() => {
if (this.playerController?.getPlayer()) {
ToastUtils.shortToast('网络出小差了,请检查下网络')
}
ToastUtils.shortToast('网络出小差了,请检查下网络')
}, 10000)
} else {
clearTimeout(this.timer)
...
...
Please
register
or
login
to post a comment