h5player
h5player copied to clipboard
[BUG] MIME type error in videoCapturer causing the file size of screenshots to become much larger
-
问题描述 After upgrading from version 3.4.2 to latest version (3.7.8), I noticed that the filesize of screenshots taken by pressing Shift+S becomes significantly larger (~3 times larger) than older version.
Running
file
command to compare two screenshots taken with different version of script shows that there's a mismatch between file extension and file actual type (JPG extension vs. PNG filetype) in the screenshot with latest version of script.After comparing two versions of scripts, the issue can be found at line 3177 of codes. The MIME type is set to
image/jpg
but the correct MIME type should beimage/jpeg
, which causestoBlob()
method to fallback to default MIME typeimage/png
.Hope this can be fixed in the next version. Thanks!
-
出现上述问题的地址 https://www.youtube.com/watch?v=tCI396HyhbQ (whichever videos will have the same issue)
-
你使用的浏览器与浏览器版本信息 Edge (doesn't matter)
-
其他附注信息 More information about MIME type
image/jpeg
can be found here Is the MIME type 'image/jpg' the same as 'image/jpeg'?