First frame fix
This commit is contained in:
4
index.js
4
index.js
@@ -43,8 +43,8 @@ module.exports = async options => {
|
|||||||
|
|
||||||
// Set currentTime to duration / 2
|
// Set currentTime to duration / 2
|
||||||
// (fix for correctly invoking onseeked event for currentTime = 0 if the first frame is at 0 sec.)
|
// (fix for correctly invoking onseeked event for currentTime = 0 if the first frame is at 0 sec.)
|
||||||
video.currentTime = video.duration / 2;
|
video.currentTime = video.duration / 2
|
||||||
await new Promise(resolve => { seekResolve = resolve; });
|
await new Promise(resolve => { seekResolve = resolve })
|
||||||
|
|
||||||
// Set options to default values if not set
|
// Set options to default values if not set
|
||||||
fallbackToDefault('format', 'image/png')
|
fallbackToDefault('format', 'image/png')
|
||||||
|
|||||||
Reference in New Issue
Block a user