First frame fix

This commit is contained in:
Utkarsh Verma
2022-05-06 16:54:49 +05:30
parent 6f50a16857
commit ddc7319f66

View File

@@ -43,8 +43,8 @@ module.exports = async options => {
// Set currentTime to duration / 2
// (fix for correctly invoking onseeked event for currentTime = 0 if the first frame is at 0 sec.)
video.currentTime = video.duration / 2;
await new Promise(resolve => { seekResolve = resolve; });
video.currentTime = video.duration / 2
await new Promise(resolve => { seekResolve = resolve })
// Set options to default values if not set
fallbackToDefault('format', 'image/png')