Add video status checks

This commit is contained in:
Tamius Han 2021-01-13 01:11:55 +01:00
parent be6df178f6
commit 1410f699c5

View File

@ -219,7 +219,15 @@ class VideoData {
}
//#endregion
//#region video status
isVideoPlaying() {
return this.video && !!(this.video.currentTime > 0 && !this.video.paused && !this.video.ended && this.video.readyState > 2);
}
hasVideoStartedPlaying() {
return this.video && this.video.currentTime > 0;
}
//#endregion
restoreCrop() {
this.logger.log('info', 'debug', '[VideoData::restoreCrop] Attempting to reset aspect ratio.')