Sha256: 6e658ce74b64d5f813b1fb038148adabc401898c13bf3457c6e92f6e871c5834

Contents?: true

Size: 285 Bytes

Versions: 1

Compression:

Stored size: 285 Bytes

Contents

module Onebox
  module Engine
    class VideoOnebox
      include Engine

      matches_regexp /^https?:\/\/.*\.(mov|mp4)$/

      def to_html
        "<video width='100%' height='100%' controls><source src='#{@url}'><a href='#{@url}'>#{@url}</a></video>"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
onebox-1.3.0 lib/onebox/engine/video_onebox.rb