I have a static code which supports videos for all browsers types.
`
`
Is there any video TYPE out there that will be supported by all browsers and if yes, how can i create a function
in WordPress in order to check what video type has been uploaded?
Your best bet for cross browser/device compatibility is probably mp4, I’d guess? But not 100% sure.
That function is probably exactly what you’d want to use. Check it, and if it’s not the one you want, return an error from your form validation.
You also want to make sure you alert users to only upload your preferred format, before they do so, so you aren’t frustrating them with random refusals.
Yeah, great solution it is… i’v checked it mp4 is supported by all browsers only IE8 does not support it. But who cares… who uses IE8 anyway. Thanks for the tips.
The only way to support all browsers is to provide the video in all supported formats. The best way to do that would be to use a library such as avconv to process the and convert the single video to multiple formats. However, on a shared hosting platform that is probably highly impractical. So unless you’re running dedicated server or are in the cloud you are limited to services external to the website itself that provide video processing capabilities.