{"id":10840105,"date":"2018-11-02T04:26:12","date_gmt":"2018-11-02T04:26:12","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=helphub_article&p=10840105"},"modified":"2024-06-09T09:29:02","modified_gmt":"2024-06-09T09:29:02","slug":"video-shortcode","status":"publish","type":"helphub_article","link":"https:\/\/wordpress.org\/documentation\/article\/video-shortcode\/","title":{"rendered":"Video shortcode"},"content":{"rendered":"\n

The Video<\/strong> feature allows you to embed video files and play them back using a simple shortcode. This was added as of WordPress Version 3.6<\/a> and is used like this:<\/p>\n\n\n\n

[video]<\/pre>\n\n\n\n

You can also use built in embeds and simply put the media file on its own line:<\/p>\n\n\n\n

My cool content
http:\/\/my.movies.com\/cool\/movie\/coolest.mp4
More cool content<\/pre>\n\n\n\n

Usage<\/h2>\n\n\n\n

I have an old post that has an audio file in the Media Library attached to it, and I want to use the new shortcode:<\/p>\n\n\n\n

[video]<\/pre>\n\n\n\n

Note: Do Not put Space between “[” and “video”.<\/p>\n\n\n\n

I have the URL for an MP3, from the Media Library or external, that I want to play:<\/p>\n\n\n\n

[video src=\"video-source.mp4\"]<\/pre>\n\n\n\n

I have a source URL and fallbacks for other HTML5-supported filetypes:<\/p>\n\n\n\n

[video mp4=\"source.mp4\" ogv=\"source.ogv\" webm=\"source.webm\"]<\/pre>\n\n\n\n

Options<\/h2>\n\n\n\n

The following basic options are supported:<\/p>\n\n\n\n

src<\/code>
\n(string) (optional) The source of your video file. If not included it will auto-populate with the first video file attached to the post. You can use the following options to define specific filetypes, allowing for graceful fallbacks:<\/p>\n\n\n\n