Implement more embed code
Supported Media Files: - Youtube - Vimeo - Instagram - Flickr - Slidershare - Speakerdeck close #26
This commit is contained in:
parent
587126218d
commit
cbb4b40bc0
6 changed files with 54 additions and 12 deletions
|
|
@ -23,18 +23,29 @@
|
|||
%span.label{:style =>"background-color: #{@event.track.color};"}
|
||||
= @event.track.name
|
||||
.col-md-9
|
||||
-unless @event.video_id
|
||||
-unless @event.media_id
|
||||
.row
|
||||
.col-md-12
|
||||
%h5.text-error
|
||||
No video of the event yet, sorry! Meanwhile...
|
||||
.row
|
||||
.col-md-12
|
||||
.flexvideo
|
||||
-if @event.video_id
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=>"http://www.youtube.com/embed/#{@event.video_id}?rel=0"}
|
||||
-else
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=>"http://www.youtube.com/embed/Eiv4e5ZxTmg?rel=0"}
|
||||
.col-md-13
|
||||
-if not @event.media_id.blank?
|
||||
.flexvideo
|
||||
-if @event.media_type == Event.media_types[:slideshare]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> request.ssl? ? "https://" : "http://" + "www.slideshare.net/slideshow/embed_code/#{@event.media_id}"}
|
||||
-elsif @event.media_type == Event.media_types[:flickr]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> request.ssl? ? "https://" : "http://" + "flic.kr/p/#{@event.media_id}/player/268a054da2"}
|
||||
-elsif @event.media_type == Event.media_types[:vimeo]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//player.vimeo.com/video/#{@event.media_id}"}
|
||||
-elsif @event.media_type == Event.media_types[:speakerdeck]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> "//speakerdeck.com/player/#{@event.media_id}?"}
|
||||
-elsif @event.media_type == Event.media_types[:instagram]
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :scrolling =>"no", :allowtransparency=>"true", :src=> "//instagram.com/p/#{@event.media_id}/embed/"}
|
||||
-else
|
||||
%iframe{:width=>"560", :height=>"315", :frameborder=>"0", :allowfullscreen=>"true", :src=> request.ssl? ? "https://" : "http://" + "www.youtube.com/embed/#{@event.media_id}?rel=0"}
|
||||
-else
|
||||
%div.well.well-lg="No video of the event yet, sorry! Meanwhile..."
|
||||
.row
|
||||
.col-md-8
|
||||
%h3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue