|
|
|
|
|
by codetrotter
1666 days ago
|
|
I’m on iOS too. From experience it’s usually because the video container, codec, or options, you are using for the video is not supported by iOS. In your case I see you are using a webm container. iOS prior to version 15 does not support webm natively. Then earlier this year they started adding support for parts of webm in iOS 15. https://9to5mac.com/2021/08/10/apple-adding-webm-audio-codec... I recommend converting the video using ffmpeg. The following should give you a video file that will be playable on most mobile devices, even quite old ones. ffmpeg -i preview.webm \
-c:v libx264 -crf 23 -profile:v baseline -level 3.0 -pix_fmt yuv420p \
-c:a aac -ac 2 -b:a 128k \
-movflags faststart \
preview.mp4
The HTML5 video tag supports having multiple video sources so you can still keep the webm as one alternative and browsers will pick either the webm or mp4 depending on support.See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/so... for details on multiple sources in the video element. I.e. what changes you need to make to your html. |
|