lib/videos/video.rb in rb42-videos-1.0.1 vs lib/videos/video.rb in rb42-videos-1.0.2

- old
+ new

@@ -7,19 +7,20 @@ attr_reader :uri attr_accessor :options DEFAULTS = { width: 640, - height: 360 + height: 360, + controls: true } def initialize(uri,options={}) @uri = uri @options = DEFAULTS.merge(options) end def embed_code - content_tag(:video) do + content_tag(:video, '', controls: controls) do concat(tag(:source, src: @uri.to_s, type: @uri.content_type)) concat(content_tag(:span, sorry_message, class: 'sorry')) end end alias_method :to_html, :embed_code @@ -32,7 +33,11 @@ @options[:width] end def height @options[:height] + end + + def controls + @options[:controls] end end