Skip to content

Commit d33cf90

Browse files
committed
plugins: cleanup video type
1 parent f25163b commit d33cf90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/plugins/system/htmlparser/nonHtmlContentData.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export default {
2323
return cb(null, {
2424
// link to original file URL to keep up with location changes (e.g. MP4)
2525
href: /video\//i.test(nonHtmlContentType) && options.redirectsHistory ? options.redirectsHistory[0] : url,
26-
type: nonHtmlContentType.replace(/;codecs=[a-zA-Z-0-9]+/i, ''), // Clean up codes from types like "video/mp4;codecs=avc1" - example: clourdinary,
26+
type: nonHtmlContentType.replace(/;.*$/i, ''), // Clean up codes from types like "video/mp4;codecs=avc1" - example: clourdinary,
2727
content_length: parseInt(nonHtmlContentLength, 10),
2828
rel: CONFIG.R.file
2929
// client-side iframely.js will also properly render video/mp4 and image files this way
3030
});
3131
}
3232
}
3333

34-
};
34+
};

0 commit comments

Comments
 (0)