Class: Embed::WistiaMedia
- Inherits:
-
Spark::Component::Base
- Object
- ActionView::Component::Base
- Spark::Component::Base
- Embed::WistiaMedia
- Defined in:
- app/components/spark/embed/wistia_media_component.rb
Instance Method Summary collapse
-
#initialize ⇒ WistiaMedia
constructor
A new instance of WistiaMedia.
Methods inherited from Spark::Component::Base
Constructor Details
#initialize ⇒ WistiaMedia
Returns a new instance of WistiaMedia.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/components/spark/embed/wistia_media_component.rb', line 10 def initialize(*) super classname.base = 'spark-wistia-media' = { class: "wistia_embed wistia_async_#{video_id} popover=true seo=false popoverContent=link popoverAnimation=none", style: 'height:100%;width:100%' } = { class: 'wistia-embed-background', style: "background-image: url('#{background_image_url}')" } unless height.blank? tag_attrs.merge!(style: "height: #{height}px;max-width: #{width}px") end end |