Sha256: a9063d8481586ebd6fb7e46d989b0cd53c6053b8ee5ca71b540e7581a3f88027

Contents?: true

Size: 790 Bytes

Versions: 21

Compression:

Stored size: 790 Bytes

Contents

# frozen_string_literal: true

module Onebox
  module Engine
    class KalturaOnebox
      include Engine
      include StandardEmbed

      always_https
      matches_regexp(/^https?:\/\/[a-z0-9]+\.kaltura\.com\/id\/[a-zA-Z0-9]+/)
      requires_iframe_origins "https://*.kaltura.com"

      def preview_html
        og = get_opengraph

        <<~HTML
          <img src="#{og.image_secure_url}" width="#{og.video_width}" height="#{og.video_height}" >
        HTML
      end

      def to_html
        og = get_opengraph

        <<~HTML
          <iframe src="#{og.video_secure_url}"
                  width="#{og.video_width}" height="#{og.video_height}"
                  frameborder='0'
                  allowfullscreen >
          </iframe>
        HTML
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
onebox-2.2.12 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.11 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.10 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.9 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.8 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.6 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.5 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.4 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.2 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.1 lib/onebox/engine/kaltura_onebox.rb
onebox-2.2.0 lib/onebox/engine/kaltura_onebox.rb
onebox-2.1.9 lib/onebox/engine/kaltura_onebox.rb
onebox-2.1.8 lib/onebox/engine/kaltura_onebox.rb
onebox-2.1.7 lib/onebox/engine/kaltura_onebox.rb
onebox-2.1.6 lib/onebox/engine/kaltura_onebox.rb
onebox-2.1.5 lib/onebox/engine/kaltura_onebox.rb
onebox-2.1.4 lib/onebox/engine/kaltura_onebox.rb
onebox-2.1.3 lib/onebox/engine/kaltura_onebox.rb
onebox-2.1.2 lib/onebox/engine/kaltura_onebox.rb
onebox-2.1.1 lib/onebox/engine/kaltura_onebox.rb