class Onebox::Engine::BandCampOnebox

Public Instance Methods

placeholder_html() click to toggle source
# File lib/onebox/engine/bandcamp_onebox.rb, line 13
def placeholder_html
  og = get_opengraph
  "<img src='#{og.image}' height='#{og.video_height}' #{og.title_attr}>"
end
to_html() click to toggle source
# File lib/onebox/engine/bandcamp_onebox.rb, line 18
      def to_html
        og = get_opengraph
        escaped_src = og.video_secure_url || og.video

        <<-HTML
          <iframe
            src="#{escaped_src}"
            width="#{og.video_width}"
            height="#{og.video_height}"
            scrolling="no"
            frameborder="0"
            allowfullscreen
          ></iframe>
        HTML
      end