{"id":780,"date":"2015-06-08T14:16:14","date_gmt":"2015-06-08T13:16:14","guid":{"rendered":"http:\/\/powered-by-haiku.co.uk\/?p=780"},"modified":"2015-06-08T14:16:14","modified_gmt":"2015-06-08T13:16:14","slug":"loading-youtube-playlists-in-jw-player","status":"publish","type":"post","link":"http:\/\/powered-by-haiku.co.uk\/?p=780","title":{"rendered":"Loading YouTube playlists in JW Player"},"content":{"rendered":"<p><strong>As of March 4, 2014 the YouTube Data API (v2) was officially deprecated, and in early June 2015 was completely removed &#8211; meaning that any JW Player implementation which uses a YouTube playlist for it&#8217;s source (in the format shown below) will now fail to load:<\/strong><\/p>\n<p><code class=\"code-block\">&nbsp;&nbsp;jwplayer(\"example\").setup({<br \/> <br \/>\n&nbsp;&nbsp;...<br \/> <br \/>\n&nbsp;&nbsp;\"playlist\":\"http:\/\/gdata.youtube.com\/feeds\/api\/playlists\/xxxxxxxxxxxxx\",<br \/> <br \/>\n&nbsp;&nbsp;...<br \/> <br \/>\n&nbsp;&nbsp;}<br \/>\n<\/code><\/p>\n<p>Now, whilst there are new URL&#8217;s available allowing access to YouTube feeds without the need for an API key or oAUTH authentication, these don&#8217;t currently work in JW Player due to the feed\/media structure not being compatible with JW Player&#8217;s expected Media RSS format:<\/p>\n<p><code class=\"code-block\">https:\/\/www.youtube.com\/feeds\/videos.xml?playlist_id=PLAYLISTID<br \/>\nhttps:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=CHANNELID<br \/>\nhttps:\/\/www.youtube.com\/feeds\/videos.xml?user=USERNAME<br \/>\n<\/code><\/p>\n<p>Additionally they have restrictive CORS headers and appear to only return the latest 15 videos with no apparent way to page through the full feed&#8230;<\/p>\n<p><strong>Ho hum!<\/strong><\/p>\n<p>Fortunately there is still a way you can make use of YouTube playlists in your JW Player setup.<\/p>\n<p><a href=\"http:\/\/dev.powered-by-haiku.co.uk\/solutions\/tubey\/\">Tubey is a JW Player plugin<\/a> which, with a slight tweak to your configuration, will allow you to continue to load the full YouTube playlist. It also provides the ability to merge multiple YouTube playlists into one.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As of March 4, 2014 the YouTube Data API (v2) was officially deprecated, and in early June 2015 was completely removed &#8211; meaning that any JW Player implementation which uses a YouTube playlist for it&#8217;s source (in the format shown below) will now fail to load: &nbsp;&nbsp;jwplayer(&#8220;example&#8221;).setup({ &nbsp;&nbsp;&#8230; &nbsp;&nbsp;&#8220;playlist&#8221;:&#8221;http:\/\/gdata.youtube.com\/feeds\/api\/playlists\/xxxxxxxxxxxxx&#8221;, &nbsp;&nbsp;&#8230; &nbsp;&nbsp;} Now, whilst there are&hellip; <a href=\"http:\/\/powered-by-haiku.co.uk\/?p=780\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-780","post","type-post","status-publish","format-standard","hentry","category-jw-player"],"_links":{"self":[{"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=780"}],"version-history":[{"count":3,"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/780\/revisions"}],"predecessor-version":[{"id":784,"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/780\/revisions\/784"}],"wp:attachment":[{"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=780"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/powered-by-haiku.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}