torrent poster: support m4v

This commit is contained in:
Feross Aboukhadijeh
2016-03-07 15:33:49 -08:00
parent ba0b71d6a2
commit 0b7f97ba6b

View File

@@ -7,7 +7,7 @@ function torrentPoster (torrent, cb) {
// filter out file formats that the <video> tag definitely can't play
var files = torrent.files.filter(function (file) {
var extname = path.extname(file.name)
return ['.mp4', '.webm', '.mov', '.mkv'].indexOf(extname) !== -1
return ['.mp4', '.m4v', '.webm', '.mov', '.mkv'].indexOf(extname) !== -1
})
if (files.length === 0) return cb(new Error('cannot make screenshot for any files in torrent'))