jrd / centos / centos.org

Forked from centos/centos.org 4 years ago
Clone

Blame content/media.erb

e8ec7a
---
e8ec7a
title: Media
78b354
presentation_title: Lyon Dojo
78b354
presenter: epitech
3d2044
iframe_url: <iframe width="640" height="390" src="http://www.youtube.com/embed/muUOhg12FKs" frameborder="0" allowfullscreen></iframe>
e8ec7a
event: Office Hours
e8ec7a
stream: true
e8ec7a
---
e8ec7a
<% if @item[:stream] %>
e8ec7a
e8ec7a
  <% if @item[:presentation_title] %>
e8ec7a
    

<%= @item[:presentation_title] %>

e8ec7a
  <% end %>
e8ec7a
  <% if @item[:presenter] %>
78b354
    

Sponsored By: <%= @item[:presenter] %>

e8ec7a
  <% end %>
e8ec7a
  
e8ec7a
  
78b354
  <%#  <%= @item[:iframe_url] %>
78b354
  
    78b354
    78b354
      <script>
    78b354
    var playListURL = 'http://gdata.youtube.com/feeds/api/playlists/PLuRtbOXpVDjDoYh16MrnRjbx7xtjr1G4B?v=2&alt=json&callback=?';
    78b354
    var videoURL= 'http://www.youtube.com/watch?v=';
    78b354
    $.getJSON(playListURL, function(data) {
    78b354
        var list_data="";
    78b354
        $.each(data.feed.entry, function(i, item) {
    78b354
            var feedTitle = item.title.$t;
    78b354
            var feedURL = item.link[1].href;
    78b354
            var fragments = feedURL.split("/");
    78b354
            var videoID = fragments[fragments.length - 2];
    78b354
            var url = videoURL + videoID;
    78b354
            var thumb = "http://img.youtube.com/vi/"+ videoID +"/default.jpg";
    78b354
            list_data += '
  • ' +feedTitle+ '';
  • 78b354
        });
    78b354
        $(list_data).appendTo(".sessions");
    78b354
    });
    78b354
    78b354
    78b354
    </script>
    e8ec7a
    e8ec7a
    <% end %>
    e8ec7a