module Onebox module Engine class VimeoOnebox include Engine include StandardEmbed matches_regexp(/^https?:\/\/(www\.)?vimeo\.com\/\d+(\/[^\/]+)?$/) always_https WIDTH ||= 640 HEIGHT ||= 360 def placeholder_html image_src = og_data.image_secure_url || og_data.image_url "" end def to_html video_src = og_data.video_secure_url || og_data.video_url video_src = video_src.gsub('autoplay=1', '').chomp("?") <<-HTML HTML end private def og_data @og_data = get_opengraph end end end end