Sha256: 0db09a49c5bc6c290572c54c0c630ea13ee9ea6eddefcb6dcfeae2cd43904eb4

Contents?: true

Size: 562 Bytes

Versions: 45

Compression:

Stored size: 562 Bytes

Contents

module Onebox
  module Engine
    class VimeoOnebox
      include Engine
      include StandardEmbed

      matches_regexp(/^https?:\/\/(www\.)?vimeo\.com\/\d+(\/[^\/]+)?$/)
      always_https

      def placeholder_html
        oembed = get_oembed
        escaped_src = ::Onebox::Helpers.normalize_url_for_output(oembed[:thumbnail_url])
        "<img src='#{escaped_src}' width='#{oembed[:thumbnail_width]}' height='#{oembed[:thumbnail_height]}' #{Helpers.title_attr(oembed)}>"
      end

      def to_html
        get_oembed[:html]
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
onebox-1.8.79 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.78 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.77 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.76 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.75 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.74 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.73 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.72 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.71 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.70 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.69 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.68 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.67 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.66 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.65 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.64 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.63 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.62 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.61 lib/onebox/engine/vimeo_onebox.rb
onebox-1.8.60 lib/onebox/engine/vimeo_onebox.rb