fixes for capture-frame@4

This commit is contained in:
Feross Aboukhadijeh
2020-08-28 16:58:40 -07:00
parent 844e34e596
commit a7766e8d3f

View File

@@ -166,7 +166,8 @@ function torrentPosterFromVideo (torrent, cb) {
function onSeeked () {
video.removeEventListener('seeked', onSeeked)
const buf = captureFrame(video)
const frame = captureFrame(video)
const buf = frame && frame.image
// unload video element
video.pause()