class Maglove::Widget::LegacyVideo
Public Instance Methods
defaults()
click to toggle source
# File lib/maglove/widget/video.rb, line 28 def defaults { width: "640", height: "360", preload: "auto", style: "default", source: false, poster: false, autoplay: false, controls: true, loop: false, margin_bottom: "0" } end
identifier()
click to toggle source
# File lib/maglove/widget/video.rb, line 24 def identifier "video" end
render(&block)
click to toggle source
Calls superclass method
Maglove::Widget::V1#render
# File lib/maglove/widget/video.rb, line 43 def render(&block) super do haml_tag :div, style: "margin-bottom: #{options[:margin_bottom]}", class: "video-widget player-style-#{options[:style]}" do haml_tag :video, controls: true, poster: options[:poster], style: "width: 100%" do haml_tag :source, src: options[:source].to_s, type: "video/mp4" end end end end