Skip to content

Commit

Permalink
fix can't upload mp4 on safari (#1617)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soxasora authored Nov 20, 2024
1 parent 6bae1f1 commit c88afc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ export const FileUpload = forwardRef(({ children, className, onSelect, onUpload,

element.onerror = reject
element.src = window.URL.createObjectURL(file)

// iOS Force the video to load metadata
if (element.tagName === 'VIDEO') {
element.load()
}
})
}, [toaster, getSignedPOST])

Expand Down

0 comments on commit c88afc5

Please sign in to comment.