class Maglove::Widgets::Video
Public Instance Methods
defaults()
click to toggle source
# File lib/maglove/widgets/video.rb, line 8 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/widgets/video.rb, line 4 def identifier "video" end
template(&block)
click to toggle source
# File lib/maglove/widgets/video.rb, line 23 def template(&block) 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