video-snapshot
video-snapshot copied to clipboard
Failed to set the 'currentTime' property
When specifying the time as a CustomVideoTime
(ie, 'middle'), the error TypeError: Failed to set the 'currentTime' property on 'HTMLMediaElement': The provided double value is non-finite.
is thrown.
The cause of this seems to be that video.currentTime
is NaN
. A quick bit of digging suggests that awaiting for the onloadedmetadata event on the video element before obtaining the current time might solve it.