forked from e621ng/e621ng
[Posts] Only show the webm if browser supports vp9
I'm not happy with this solution, but we might as well try it. - Most reasonably modern browsers support vp9. - Those that cannot can play mp4 instead. - Browsers that support only vp8 are basically non-existent.
This commit is contained in:
parent
0e98266024
commit
e72c0f4bd5
@ -488,7 +488,7 @@ Post.resize_video = function (post, target_size) {
|
||||
let desired_classes = [];
|
||||
|
||||
function original_sources () {
|
||||
target_sources.push({type: "video/webm", url: post?.file?.url});
|
||||
target_sources.push({type: "video/webm; codecs=\"vp9\"", url: post?.file?.url});
|
||||
if (typeof post?.sample?.alternates?.original !== "undefined")
|
||||
target_sources.push({type: "video/mp4", url: post?.sample?.alternates?.original?.urls[1]});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user