Class: Maglove::Widget::LegacyVideo
- Defined in:
- lib/maglove/widget/video.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from V1
#drop_container, #widget_options
Methods inherited from Base
#initialize, #style_string, #widget_options
Constructor Details
This class inherits a constructor from Maglove::Widget::Base
Instance Method Details
#defaults ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# 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 ⇒ Object
24 25 26 |
# File 'lib/maglove/widget/video.rb', line 24 def identifier "video" end |
#render(&block) ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/maglove/widget/video.rb', line 43 def render(&block) super do haml_tag :div, style: "margin-bottom: #{[:margin_bottom]}", class: "video-widget player-style-#{[:style]}" do haml_tag :video, controls: true, poster: [:poster], style: "width: 100%" do haml_tag :source, src: [:source].to_s, type: "video/mp4" end end end end |