--- title: Media presentation_title: Lyon Dojo presenter: <a href="http://www.epitech.eu/lyon/ecole-informatique-lyon.aspx">epitech</a> iframe_url: <iframe width="640" height="390" src="http://www.youtube.com/embed/muUOhg12FKs" frameborder="0" allowfullscreen></iframe> event: Office Hours stream: true --- <% if @item[:stream] %> <% if @item[:presentation_title] %> <h1 class="video"> <%= @item[:presentation_title] %> </h1> <% end %> <% if @item[:presenter] %> <h2 class="video"> Sponsored By: <%= @item[:presenter] %> </h2> <% end %> <br /> <br /> <%# <%= @item[:iframe_url] %> <ul class="sessions"> </ul> <script> var playListURL = 'http://gdata.youtube.com/feeds/api/playlists/PLuRtbOXpVDjDoYh16MrnRjbx7xtjr1G4B?v=2&alt=json&callback=?'; var videoURL= 'http://www.youtube.com/watch?v='; $.getJSON(playListURL, function(data) { var list_data=""; $.each(data.feed.entry, function(i, item) { var feedTitle = item.title.$t; var feedURL = item.link[1].href; var fragments = feedURL.split("/"); var videoID = fragments[fragments.length - 2]; var url = videoURL + videoID; var thumb = "http://img.youtube.com/vi/"+ videoID +"/default.jpg"; list_data += '<li><a href="'+ url + '">' +feedTitle+ '</a>'; }); $(list_data).appendTo(".sessions"); }); </script> <% end %>