Sha256: cb5c53e146344bc5976d370669c3a933f6fefc88f3cf69ec7b8a1ec6935553ea

Contents?: true

Size: 736 Bytes

Versions: 49

Compression:

Stored size: 736 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]+/)

      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

49 entries across 49 versions & 1 rubygems

Version Path
onebox-2.0.2 lib/onebox/engine/kaltura_onebox.rb
onebox-2.0.1 lib/onebox/engine/kaltura_onebox.rb
onebox-2.0.0 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.30 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.29 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.28.4 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.28.3 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.28.2 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.28.1 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.28 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.27.2 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.27.1 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.26 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.25 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.24 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.23 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.22 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.21 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.20 lib/onebox/engine/kaltura_onebox.rb
onebox-1.9.19 lib/onebox/engine/kaltura_onebox.rb