On YouTube, you get embed code for flash based player which plays the video on desktop browsers having flash player plugin. Most of the modern desktop browsers comes with flash player plugin but the problem comes on mobile devices. Browsers on mobile devices doesn’t support flash and that’s why your embedded video will not play over there. But recently YouTube released a new way to embed video code which is having HTML5 support to play YouTube videos on non flash browsers as well. The new way or code to embed YouTube video is thru IFRAME and we have developed a plugin to directly insert IFRAME embed code for any YouTube video on your WordPress blog. This new insert code will play your videos on desktop browsers as well as mobile device browser having HTML5 support.
IFRAME embed code of YouTube is intelligent as well. It automatically detects the browser’s capability and if finds that the browser doesn’t support HTML5 but having flash plugin then it will automatically show the flash player for embedded videos. That means your embedded videos will be visible on Desktop browsers (HTML5 or Flash) and Mobile browser (with HTML5). We have already discussed this IFRAME and Flash OBJECT embed code earlier on Internet Techies.
As you can get the flash player embed code from YouTube site below each video, but till now the IFRAME code is not available on the YouTube site. You will have to put the code on your own by populating the YouTube Video ID in the standard IFRAME code. To make your life easier, we are presenting a free WordPress plugin to embed YouTube videos on WordPress blog thru IFRAME embed code by just pasting the URL of the video on posts or pages of your blog.
Why a WordPress plugin?
If you are comfortable with pasting or writing IFRAME code for each video embedded in your blog then you may write that down. But if you are facing some HTML error while writing IFRAME code, then you can use this plugin thru which you just need to copy the YouTube URL and use quick tag on edit window to insert the video with IFRAME code.
Benefits of IFRAME Embed for YouTube WordPress Plugin
1. Video visible on desktop and mobile browser
2. YouTube videos embedded on your site doesn’t need flash to view
3. IFRAME code automatically switch YouTube player between flash and HTML5
4. Provide Width and Height for YouTube player only once on settings window of this plugin
How To Install IFRAME Embed for YouTube
1. Download “IFRAME Embed for YouTube” (Zip File)
2. Upload “IFRAME Embed YouTube” folder in wp-content/plugins folder on your WordPress setup
3. Go to Plugins tab on Dashboard and click on “Activate” link below the “IFRAME Embed YouTube” plugin to activate the same.
As we have developed this plugin to make your life easier that’s why we have made the process to use this plugin very simple. On Dashboard, you can see “IFRAME Embed for YouTube” tab under Settings section. On settings page of this plugin, you can set the default width and height of the player. You may set value as per your theme template.
To embed IFRAME code of YouTube video on a particular post, open the post to edit. Now you can see a player like icon on the tool bar of Visual format of editor. Once you will click on that red color icon, that will ask you to enter a URL. Copy the URL (link) of the YouTube video which you want to embed in post and paste the URL in quick edit box. Click on “Insert” to get the [yframe] tag with URL in the post. Done, now you can save or publish the post on your blog and you can see YouTube video embedded with the latest player of YouTube (not the old flash player). Now you can see the page source of your publishes post and find the embed code for YouTube video as IFRAME. Repeat this procedure to embed another video on your blog post or page thru IFRAME embed code.
1. Settings Page of IFRAME Embed for YouTube
2. Quick tag button on Post/Page editor to insert the iframe for youtube video
3. Shortcode that can also be used in html editor on the edit post screen to insert the video
4. Screenshot of YouTube video embedded with newly released IFRAME code which enables your videos to be visible on HTML5 only browsers as well as normal flash browsers. You can see the player’s status bar section which is the same one available on YouTube. Generally you see flash player of YouTube on embedded videos on other sites.
As this the first release of “IFRAME Embed for YouTube”, there is no change log. We will update this section after releasing next versions.
We express our thanks to all the plugin developers whose invaluable plugins and codes helped us learn how to write WordPress plugins. And we are always grateful to WordPress Codex whose detailed and flawless guidelines always served as best resource to learn WordPress core and develop the base.
If you have any query or concern related to this plugin, feel free to ask. We will definitely try our best to answer your queries.