use source file for web video compression (#11090)

This commit is contained in:
Spence Pope
2026-07-08 15:07:52 -04:00
committed by GitHub
parent 510dc51d7a
commit 6dce96881c
4 changed files with 17 additions and 2 deletions
@@ -73,6 +73,7 @@ async function getMetadataWithWebCodecs(
return {
uri: blobUrl,
file,
mimeType: file.type,
width: videoTrack.displayWidth,
height: videoTrack.displayHeight,
@@ -93,6 +94,7 @@ async function getMetadataWithBrowserAPIs(
img.onload = () => {
resolve({
uri: blobUrl,
file,
mimeType: 'image/gif',
width: img.width,
height: img.height,
@@ -112,6 +114,7 @@ async function getMetadataWithBrowserAPIs(
video.onloadedmetadata = () => {
resolve({
uri: blobUrl,
file,
mimeType: file.type,
width: video.videoWidth,
height: video.videoHeight,