Sha256: a1af039c309687907006254de84a30b4057e4fc966df12f26b249c5e80281c17

Contents?: true

Size: 612 Bytes

Versions: 11

Compression:

Stored size: 612 Bytes

Contents

module Onebox
  module Engine
    class AudioboomOnebox
      include Engine
      include StandardEmbed

      matches_regexp(/^https?:\/\/audioboom\.com\/posts\/\d+/)
      always_https

      def placeholder_html
        oembed = get_oembed

        # we want the image to have the same dimensions as the embedded html

        <<-HTML
          <img src="#{oembed[:thumbnail_url]}" style="max-width: #{oembed[:width]}px; max-height: #{oembed[:height]}px;" #{Helpers.title_attr(oembed)}>
        HTML
      end

      def to_html
        oembed = get_oembed
        oembed[:html]
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
onebox-1.7.3 lib/onebox/engine/audioboom_onebox.rb
onebox-1.7.2 lib/onebox/engine/audioboom_onebox.rb
onebox-1.7.1 lib/onebox/engine/audioboom_onebox.rb
onebox-1.7.0 lib/onebox/engine/audioboom_onebox.rb
onebox-1.6.9 lib/onebox/engine/audioboom_onebox.rb
onebox-1.6.8 lib/onebox/engine/audioboom_onebox.rb
onebox-1.6.7 lib/onebox/engine/audioboom_onebox.rb
onebox-1.6.6 lib/onebox/engine/audioboom_onebox.rb
onebox-1.6.5 lib/onebox/engine/audioboom_onebox.rb
onebox-1.6.4 lib/onebox/engine/audioboom_onebox.rb
onebox-1.6.3 lib/onebox/engine/audioboom_onebox.rb