mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
Fix videoplayer status after pause&finish (#15782)
* fix videoplayer.isplaying status after pause * fix isPlaying status when play video finish
This commit is contained in:
@@ -163,11 +163,11 @@ export abstract class VideoPlayerImpl {
|
||||
}
|
||||
|
||||
public onPause (e: Event): void {
|
||||
this._playing = false;
|
||||
if (this._ignorePause) {
|
||||
this._ignorePause = false;
|
||||
return;
|
||||
}
|
||||
this._playing = false;
|
||||
this.dispatchEvent(EventType.PAUSED);
|
||||
}
|
||||
|
||||
@@ -178,6 +178,7 @@ export abstract class VideoPlayerImpl {
|
||||
}
|
||||
|
||||
public onEnded (e: Event): void {
|
||||
this._playing = false;
|
||||
this.dispatchEvent(EventType.COMPLETED);
|
||||
}
|
||||
|
||||
@@ -193,7 +194,6 @@ export abstract class VideoPlayerImpl {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
public play (): void {
|
||||
if (this._loadedMeta || this._loaded) {
|
||||
this.canPlay();
|
||||
|
||||
Reference in New Issue
Block a user