iframe
Advanced iFrame iframe Donate GitHub [iframe src=”http://www.youtube.com/embed/7_nAZQt9qu0″ width=”100%” height=”500″] shortcode should show something like this: WordPress removes iframe html tags because of security reasons. Iframe shortcode is the replacement of the iframe html tag and accepts the same params as iframe html tag does. You may use iframe shortcode to embed content from YouTube, Vimeo, Google Maps or from any external page. If you need to embed content from YouTube, Vimeo, SlideShare, SoundCloud, Twitter via direct link, you may use [embed]http://www.youtube.com/watch?v=7_nAZQt9qu0[/embed] shortcode. [embed] shortcode is a core WordPress feature and can embed content from many resources via direct link. Important: You can not embed HTTP pages into HTTPS pages and vice versa. So the protocol (http or httpS) for parent and embedded page should match. iframe params: src – source of the iframe: [iframe src="http://www.youtube.com/embed/7_nAZQt9qu0"]; by default src=”http://www.youtube.com/embed/7_nAZQt9qu0″; width – width in pixels or in percents: [iframe width="100%"] or [iframe width="600"]; by default width=”100%”; height – height in pixels: [iframe height="500"]; by default height=”500″; scrolling – with or without the scrollbar: [iframe scrolling="no"]; by default scrolling=”yes”; frameborder – with or without the frame border: [iframe frameborder="0"]; by default frameborder=”0″; marginheight – height of the margin: [iframe marginheight="0"]; removed by default; marginwidth – width of the margin: [iframe marginwidth="0"]; removed by default; allowtransparency – allows to set transparency of the iframe: [iframe allowtransparency="true"]; removed by default; id – allows to add the id of the iframe: [iframe id="custom_id"]; removed by default; class – allows to add the class of the iframe: [iframe class="custom_class"]; by default class=”iframe-class”; style – allows to add the css styles of the iframe: [iframe style="margin-left:-30px;"]; removed by default; same_height_as – allows to set the height of iframe same as target element: [iframe same_height_as="div.sidebar"], [iframe same_height_as="div#content"], [iframe same_height_as="body"], [iframe same_height_as="html"]; removed by default; any_other_param – allows to add new parameter of the iframe [iframe any_other_param="any_value"]; any_other_empty_param – allows to add new empty parameter of the iframe (like “allowfullscreen” on youtube) [iframe any_other_empty_param=""];
Videojs HTML5 Player
Video.js HTML5 Player is a user-friendly plugin that supports video playback on desktop and mobile devices. It makes super easy for you to embed both self-hosted video files or video files that are externally hosted using Video.js library. Video.js HTML5 Player Add-ons Disable Right Click Themes Video.js HTML5 Player Features Embed MP4 video files into a post/page or anywhere on your WordPress site Embed responsive videos for a better user experience while viewing from a mobile device Embed HTML5 videos which are compatible with modern browsers Embed videos with poster images Embed videos using videojs player Automatically play a video when the page is rendered if the device and browser support it Embed videos uploaded to your WordPress media library using direct links in the shortcode Clean and sleek player with no watermark fallbacks for other HTML5-supported filetypes (WebM, Ogv) HTTP streaming How to Use Video.js HTML5 Player In order to embed a video create a new post/page and use the following shortcode: [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.mp4"] Here, “url” is the location of the MP4 video source file (H.264 encoded). You need to replace the sample URL with the actual URL of the video file. Video Shortcode Options The following options are supported in the shortcode. WebM You can specify a WebM video file in addition to the source MP4 video file. This parameter is optional. [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.mp4" webm="https://example.com/wp-content/uploads/videos/myvid.webm"] Ogv You can specify a Ogv video file in addition to the source MP4 & WebM video files. This parameter is optional. [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.mp4" webm="https://example.com/wp-content/uploads/videos/myvid.webm" ogv="https://example.com/wp-content/uploads/videos/myvid.ogv"] Width Defines the width of the video file (Height is automatically calculated). This option is not required unless you want to limit the maximum width of the video. [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.mp4" width="480"] Preload Specifies if and how the video should be loaded when the page loads. Defaults to “auto” (the video should be loaded entirely when the page loads). Other options: “metadata” – only metadata should be loaded when the page loads “none” – the video should not be loaded when the page loads [videojs_video url=”https://example.com/wp-content/uploads/videos/myvid.mp4″ preload=”metadata”] Controls Specifies that video controls should be displayed. Defaults to “true”. In order to hide controls set this parameter to “false”. [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.mp4" controls="false"] When you disable controls users will not be able to interact with your videos. So It is recommended that you enable autoplay for a video with no controls. Autoplay Causes the video file to automatically play when the page loads. [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.mp4" autoplay="true"] Poster Defines image to show as placeholder before the video plays. [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.mp4" poster="https://example.com/wp-content/uploads/poster.jpg"] Loop Causes the video file to loop to beginning when finished and automatically continue playing. [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.mp4" loop="true"] Muted Specifies that the audio output of the video should be muted. [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.mp4" muted="true"] Video.js HTTP Streaming The plugin supports the m3u8 file format that can be used for Video.js HTTP Streaming. It allows you to play HLS, DASH, and other HTTP streaming protocols with Video.js, even where they are not natively supported. [videojs_video url="https://example.com/wp-content/uploads/videos/myvid.m3u8"] For detailed documentation please visit the Videojs HTML5 Player plugin page