Sha256: e212f87948e3464ee39fb8be216b682dda4fa51e40df0afe06b078cc25a06733

Contents?: true

Size: 303 Bytes

Versions: 38

Compression:

Stored size: 303 Bytes

Contents

module Onebox
  module Engine
    class VideoOnebox
      include Engine

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

      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

38 entries across 38 versions & 1 rubygems

Version Path
onebox-1.4.9 lib/onebox/engine/video_onebox.rb
onebox-1.4.8 lib/onebox/engine/video_onebox.rb
onebox-1.4.7 lib/onebox/engine/video_onebox.rb
onebox-1.4.5 lib/onebox/engine/video_onebox.rb
onebox-1.4.4 lib/onebox/engine/video_onebox.rb
onebox-1.4.3 lib/onebox/engine/video_onebox.rb
onebox-1.4.2 lib/onebox/engine/video_onebox.rb
onebox-1.4.1 lib/onebox/engine/video_onebox.rb
onebox-1.4.0 lib/onebox/engine/video_onebox.rb
onebox-1.3.9 lib/onebox/engine/video_onebox.rb
onebox-1.3.8 lib/onebox/engine/video_onebox.rb
onebox-1.3.7 lib/onebox/engine/video_onebox.rb
onebox-1.3.6 lib/onebox/engine/video_onebox.rb
onebox-1.3.5 lib/onebox/engine/video_onebox.rb
onebox-1.3.4 lib/onebox/engine/video_onebox.rb
onebox-1.3.3 lib/onebox/engine/video_onebox.rb
onebox-1.3.2 lib/onebox/engine/video_onebox.rb
onebox-1.3.1 lib/onebox/engine/video_onebox.rb