Enable HTML5 Videos on WordPress-MP4 WebM Ogg MIME Types Setup
Question: I have published some HTML5 video clips to my WordPress blog but my browsers refused to play the videos (MP4, WebM, OGG)? Everything seemed to be working just fine on my local machine, but I can’t get the HTML5 videos to work on my WordPress websites, MP4, WebM, OGG, none of them works.
Want to play HTML5 videos on WordPress, but having trouble playing MP4 on WordPress, Webm on WordPress or Ogg/Ogv on WordPress?
Some browsers, including IE, Firefox, Chrome, may have problems playing the MP4, WebM and Ogg video formats made with the HTML5 video player. These HTML5 video files can work on local computer but not on remote websites and servers. Although it may seems like the video player is refusing to play the video with your browsers. This is usually caused by the web server’s inability to recognize these video formats and it has nothing to do with the HTML5 video player.
The solution to these problems can be fixed by adding video MIME types to WordPress. You can edit the .htaccess file of your WordPress web site. Following are the steps you can refer to.
How to Enable HTML5 video formats (MP4, WebM, OGG/OGV) MIME Type on WordPress?
- 1. Download the .htaccess file from your WordPress directory.
On the root directory of the WordPress installation, there should be a configuration file .htaccess. You can download a copy of this file to your local machine through FTP.
- 2. Add Video MIME Types to the WordPress .htaccess File
You can use a text editor to open this configuration file and add HTML5 video MIME types to it.
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
- 3. Save the change and upload the modified .htaccess to your WordPress directory
You can keep a copy of your .htaccess file first before uploading/overwriting it on the live website. Better safe than sorry! After uploading the new configuration file to your WordPress blog site, you will be able to play all HTML5 videos on WordPress.
Note: Some hosting might allow you to edit some types of files online, in that case, you can directly edit the .htaccess file, no need to download/upload through FTP clients.
After adding the HTML5 video MIME types for MP4, WebM and OGG to WordPress .htaccess file and publishing it again to the remote server, you should be able to play MP4, WebM and Ogg videos in a HTML5 video player on your WordPress blog site through almost all main web browsers.
Add HTML5 Video to Moonfruit Apple OS X Mountain Lion Review
Comments are currently closed.