{"id":6078,"date":"2013-02-15T18:43:16","date_gmt":"2013-02-16T02:43:16","guid":{"rendered":"http:\/\/www.lee.org\/blog\/?p=6078"},"modified":"2013-02-16T09:47:39","modified_gmt":"2013-02-16T17:47:39","slug":"how-to-use-videojs-html5-video-player-for-wordpress","status":"publish","type":"post","link":"https:\/\/www.lee.org\/blog\/2013\/02\/15\/how-to-use-videojs-html5-video-player-for-wordpress\/","title":{"rendered":"How to use VideoJS &#8211; HTML5 Video Player for WordPress"},"content":{"rendered":"<p>(I&#8217;m archiving this for my own purposes)<br \/>\nInstructions on using <strong>VideoJS &#8211; HTML5 Video Player for WordPress<\/strong>, taken from the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/videojs-html5-video-player-for-wordpress\/installation\/\">plugin page<\/a>. More at <a href=\"http:\/\/videojs.com\/\">Videojs.com<\/a><\/p>\n<p><!--more--><br \/>\nReplace the &#8220;{&#8221; with a square bracket in the following items<\/p>\n<p>Video Shortcode Options<br \/>\nmp4<br \/>\nThe location of the h.264\/MP4 source for the video.<\/p>\n<p>{video mp4=&#8221;http:\/\/video-js.zencoder.com\/oceans-clip.mp4&#8243;]<br \/>\nogg<br \/>\nThe location of the Theora\/Ogg source for the video.<\/p>\n<p>{video ogg=&#8221;http:\/\/video-js.zencoder.com\/oceans-clip.ogg&#8221;]<br \/>\nwebm<br \/>\nThe location of the VP8\/WebM source for the video.<\/p>\n<p>{video webm=&#8221;http:\/\/video-js.zencoder.com\/oceans-clip.webm&#8221;]<br \/>\nposter<br \/>\nThe location of the poster frame for the video.<\/p>\n<p>{video poster=&#8221;http:\/\/video-js.zencoder.com\/oceans-clip.png&#8221;]<br \/>\nwidth<br \/>\nThe width of the video.<\/p>\n<p>{video width=&#8221;640&#8243;]<br \/>\nheight<br \/>\nThe height of the video.<\/p>\n<p>{video height=&#8221;264&#8243;]<br \/>\npreload<br \/>\nStart loading the video as soon as possible, before the user clicks play. Use &#8216;auto&#8217;, &#8216;metadata&#8217;, or &#8216;none&#8217;. Auto will preload when the browser or device allows it. Metadata will load only the meta data of the video.<\/p>\n<p>{video preload=&#8221;auto&#8221;]<br \/>\nautoplay<br \/>\nStart playing the video as soon as it&#8217;s ready. Use &#8216;true&#8217; or &#8216;false&#8217;.<\/p>\n<p>{video autoplay=&#8221;true&#8221;]<br \/>\nloop<br \/>\nCauses the video to start over as soon as it ends. Use &#8216;true&#8217; or &#8216;false&#8217;.<\/p>\n<p>{video loop=&#8221;true&#8221;]<br \/>\ncontrols<br \/>\nUse &#8216;false&#8217; to hide the player controls.<\/p>\n<p>{video controls=&#8221;false&#8221;]<br \/>\nid<br \/>\nAdd a custom ID to your video player.<\/p>\n<p>{video id=&#8221;movie-id&#8221;]<br \/>\nclass<br \/>\nAdd a custom class to your player. Use full for floating the video player using &#8216;alignleft&#8217; or &#8216;alignright&#8217;.<\/p>\n<p>{video class=&#8221;alignright&#8221;]<br \/>\nTracks<br \/>\nText Tracks are a function of HTML5 video for providing time triggered text to the viewer. To use tracks use the {track] shortcode inside of the {video] shortcode. You can set values for the kind, src, srclang, label, and default attributes. More information is available in the Video.js Documentation.<\/p>\n<p>{video]{track kind=&#8221;captions&#8221; src=&#8221;http:\/\/video-js.zencoder.com\/oceans-captions.vtt&#8221; srclang=&#8221;en&#8221; label=&#8221;English&#8221; default=&#8221;true&#8221;]{\/video]<br \/>\nAll Attributes Example<br \/>\n{video mp4=&#8221;http:\/\/video-js.zencoder.com\/oceans-clip.mp4&#8243; ogg=&#8221;http:\/\/video-js.zencoder.com\/oceans-clip.ogg&#8221; webm=&#8221;http:\/\/video-js.zencoder.com\/oceans-clip.webm&#8221; poster=&#8221;http:\/\/video-js.zencoder.com\/oceans-clip.png&#8221; preload=&#8221;auto&#8221; autoplay=&#8221;true&#8221; width=&#8221;640&#8243; height=&#8221;264&#8243; id=&#8221;movie-id&#8221; class=&#8221;alignleft&#8221; controls=&#8221;false&#8221;]{track kind=&#8221;captions&#8221; src=&#8221;http:\/\/example.com\/path\/to\/captions.vtt&#8221; srclang=&#8221;en&#8221; label=&#8221;English&#8221; default=&#8221;true&#8221;]{\/video]<br \/>\nVideo.js Settings Screen<br \/>\nThe values set here will be the default values for all videos, unless you specify differently in the shortcode. Uncheck &#8220;Use CDN hosted version?&#8221; if you want to use a self-hosted copy of Video.js instead of the CDN hosted version. Using the CDN hosted version is preferable in most situations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(I&#8217;m archiving this for my own purposes) Instructions on using VideoJS &#8211; HTML5 Video Player for WordPress, taken from the plugin page. More at Videojs.com<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-6078","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/posts\/6078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/comments?post=6078"}],"version-history":[{"count":0,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/posts\/6078\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/media?parent=6078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/categories?post=6078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/tags?post=6078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}