Showing
1 changed file
with
5 additions
and
0 deletions
| @@ -259,6 +259,11 @@ export class WDPlayerController { | @@ -259,6 +259,11 @@ export class WDPlayerController { | ||
| 259 | // this.seekTime = value * 1000; | 259 | // this.seekTime = value * 1000; |
| 260 | // this.avPlayer?.seek(this.seekTime, media.SeekMode.SEEK_PREV_SYNC); | 260 | // this.avPlayer?.seek(this.seekTime, media.SeekMode.SEEK_PREV_SYNC); |
| 261 | // } | 261 | // } |
| 262 | + // 防止seek报错 | ||
| 263 | + if (this.avPlayer && PlayerConstants.OPERATE_STATE.indexOf(this.avPlayer?.state) === -1) { | ||
| 264 | + return; | ||
| 265 | + } | ||
| 266 | + | ||
| 262 | if (mode === SliderChangeMode.Moving) { | 267 | if (mode === SliderChangeMode.Moving) { |
| 263 | // this.progressThis.progressVal = value; | 268 | // this.progressThis.progressVal = value; |
| 264 | // this.progressThis.currentTime = DateFormatUtil.secondToTime(Math.floor(value * this.duration / | 269 | // this.progressThis.currentTime = DateFormatUtil.secondToTime(Math.floor(value * this.duration / |
-
Please register or login to post a comment