-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix uploaded videos don't load on safari #1593
Conversation
I can confirm videos now load on Safari iOS sometimes but more often than not, they are detected as images that only take up space: loads correctly as video: loads as image: For some reason, it initially seemed to work more as video (but I think once there were no controls) than not but now it always loads as an image 🤔 Does this also happen on your end? I also applied this patch for testing since the local imgproxy is not able to process videos: diff --git a/components/item-full.js b/components/item-full.js
index 5a148ea3..e610d6af 100644
--- a/components/item-full.js
+++ b/components/item-full.js
@@ -65,7 +65,7 @@ function ItemEmbed ({ url, imgproxyUrls }) {
const srcSet = imgproxyUrls?.[url]
return (
<div className='mt-3'>
- <MediaOrLink src={src} srcSet={srcSet} topLevel linkFallback={false} />
+ <MediaOrLink src={src} topLevel linkFallback={false} />
</div>
)
}
diff --git a/components/text.js b/components/text.js
index 43b9a387..c83728a8 100644
--- a/components/text.js
+++ b/components/text.js
@@ -212,7 +212,7 @@ function MediaLink ({
const srcSet = imgproxyUrls?.[url]
- return <MediaOrLink srcSet={srcSet} src={src} rel={rel} {...props} />
+ return <MediaOrLink src={src} rel={rel} {...props} />
}
function Table ({ node, ...props }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to publish the above as a review
Yes, that's why I held back this PR for so long, if you check the console you can see that it throws 422 (Unprocessable Entity) from imgproxy and Safari just stops there lol edit: I think that in prod this shouldn't (?) happen |
I updated my comment and added a patch for this, I think this is unrelated. The 422 error happens for any video that was uploaded locally once
Yes, we have the pro version in prod but @huumn knows more about this |
Tried it just now and it works which indicates that this may be inconsistent, could be the fact that it tries to load the video as image before replacing it with video? |
Yeah something like this might be the case but it's hard to tell without a browser console on mobile. USB debugging might be required for this issue. I wouldn't be surprised if you need a Mac for this though ... |
I am using a Mac indeed because I didn't know better but you sparked my curiosity and there are tools like Inspect that should do this. Adding to inconsistencies, it seems like that iOS stops at the image stage and macOS can reach the video stage (of the media-or-link pipeline) |
Cool! IIRC I put this there for image/video gridding. So I'll just need to verify this doesn't break that. |
22f494f
to
e16f87c
Compare
lol I was still on master |
Nice work! Do you have a lightning address I can send sats to? |
Thanks! Here's the address: soxasora@blink.sv |
Description
By removing an incompatible-between-renders
width: min-content
, uploaded videos now show and play on Safari for iOS and macOS, fixing #1569.Screenshots
Safari on macOS:
Safari on iOS/PWA:
Additional Context
Removing
width: min-content
didn't cause any structural change and actually didn't do anything (?) other than satisfy Safari.In the issue I talked about
media-or-link.js
I can confirm that this wasn't the problem and it was just that CSS line
Checklist
Are your changes backwards compatible? Please answer below:
Yes, this edit doesn't break functionality nor UX/UI
On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
7, I tested on various browsers for various platforms, this edit didn't change whatsoever the past behavior on other browsers.
For frontend changes: Tested on mobile? Please answer below:
Tested mainly on iOS, videos now load effortlessly
Did you introduce any new environment variables? If so, call them out explicitly here: No