Skip to content
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

Can't play videos that don't have an extension on iOS #262

Closed
lpbonomi opened this issue Jun 5, 2024 · 9 comments · Fixed by #284
Closed

Can't play videos that don't have an extension on iOS #262

lpbonomi opened this issue Jun 5, 2024 · 9 comments · Fixed by #284
Assignees

Comments

@lpbonomi
Copy link

lpbonomi commented Jun 5, 2024

Similar to these:

https://stackoverflow.com/questions/32954091/how-to-play-a-video-from-url-with-no-file-extension-in-ios
https://stackoverflow.com/questions/30199261/why-wont-safari-play-file-without-extension-in-video

I can't play videos that don't have an extension in the URL on iOS

A previous solution I found was using the tag with the video's URL and specifying the type of the video, this is not supported by NextVideo.

I made a repo: https://github.com/lpbonomi/next-video-error-demo
And deployed the code showing this behaviour: https://next-video-error-demo.vercel.app/
(Please use an iOS device to see the problem)

Is there another way to do this?

@luwes
Copy link
Collaborator

luwes commented Jun 5, 2024

are you looking for something like this https://github.com/muxinc/next-video/pull/263/files ?

@lpbonomi
Copy link
Author

lpbonomi commented Jun 5, 2024

Not really, I don't think this fixes my problem and I would also like to keep the other functionalities from the <Video /> component.


The thing is that some of the videos uploaded with <Video /> component don't have an extension in the resulting URL.

For example,

This video works: https://next-videos-ultradrop.s3.us-east-1.amazonaws.com/videos/113a27a38b7a59b0d0522e30716a89385ccd67da67cdb8582d19fed2b26a43cf.mp4

This one doesn't: https://next-videos-ultradrop.s3.us-east-1.amazonaws.com/videos/0hOSpzin-U7fDiifE0H-hnuZ4u_V_tofCJbxpqpNJCA

(Check out the extension at the end of the URL)

I think that the resulting video doesn't have an extension because the original one didn't have one either, but I can't use the same fix as in the repro repo because I can't use the <source /> tag in NextVideo.


I think that this could get fixed by adding an extension to the resulting URL, maybe by finding out the type of the video, or maybe allow the use of <source /> in the <Video /> component.

@luwes What do you think? I can give out a hand with this if you need

@luwes
Copy link
Collaborator

luwes commented Jun 5, 2024

gotcha, yes this might be tricky because the default player is the Mux player web component and it doesn't support source elements at the moment. I'll ask the team here if we might be able to support it.

@RosarioAleCali
Copy link

Are there any updates on this? I am experiencing some issues where videos don't play on iOS (both Safari and Chrome).

I am guessing it might be related to this, although I am not sure.

Here's a separate issue I've opened: #274

@luwes @lpbonomi

@luwes
Copy link
Collaborator

luwes commented Jul 26, 2024

no update yet but we are planning to add this functionality to the player. I will notify here

@RosarioAleCali
Copy link

@luwes Thanks for the update, much appreciated. Also, how likely you think this is connected to #274?

Let me know if you need more info or if I can help!

@jeffreymc2
Copy link

I'm experiencing similar issue where some mp4s despite having the file extension are throwing a "Source Not Supported" error.

@luwes
Copy link
Collaborator

luwes commented Aug 1, 2024

@jeffreymc2 that's something else though. does the video still play?

@luwes
Copy link
Collaborator

luwes commented Aug 2, 2024

@lpbonomi added a PR ^^ — will this do?
example at https://next-video-demo-git-fork-luwes-source-tag-mux.vercel.app/source-tag


alternative solution:

btw I also just remembered it's possible to verify if uploaded assets have a file extension and append one in the remote bucket key with the provider hook generateAssetKey.
https://github.com/muxinc/next-video/blob/main/src/config.ts#L48-L55

@luwes luwes self-assigned this Aug 2, 2024
@luwes luwes closed this as completed in #284 Aug 2, 2024
@luwes luwes closed this as completed in e1ed50f Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants