First frame fix
This commit is contained in:
5
index.js
5
index.js
@@ -41,6 +41,11 @@ module.exports = async options => {
|
||||
if (error) { break }
|
||||
}
|
||||
|
||||
// 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; });
|
||||
|
||||
// Set options to default values if not set
|
||||
fallbackToDefault('format', 'image/png')
|
||||
fallbackToDefault('offsets', [])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "video-frames",
|
||||
"version": "1.0.13",
|
||||
"version": "1.0.14",
|
||||
"private": false,
|
||||
"description": "Client-side video frames extraction as base64 encoded images",
|
||||
"author": "Utkarsh Verma",
|
||||
|
||||
Reference in New Issue
Block a user