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.5.21 lib/onebox/engine/video_onebox.rb
onebox-1.5.20 lib/onebox/engine/video_onebox.rb
onebox-1.5.19 lib/onebox/engine/video_onebox.rb
onebox-1.5.18 lib/onebox/engine/video_onebox.rb
onebox-1.5.17 lib/onebox/engine/video_onebox.rb
onebox-1.5.16 lib/onebox/engine/video_onebox.rb
onebox-1.5.14 lib/onebox/engine/video_onebox.rb
onebox-1.5.13 lib/onebox/engine/video_onebox.rb
onebox-1.5.12 lib/onebox/engine/video_onebox.rb
onebox-1.5.11 lib/onebox/engine/video_onebox.rb
onebox-1.5.10 lib/onebox/engine/video_onebox.rb
onebox-1.5.9 lib/onebox/engine/video_onebox.rb
onebox-1.5.8 lib/onebox/engine/video_onebox.rb
onebox-1.5.7 lib/onebox/engine/video_onebox.rb
onebox-1.5.6 lib/onebox/engine/video_onebox.rb
onebox-1.5.5 lib/onebox/engine/video_onebox.rb
onebox-1.5.3 lib/onebox/engine/video_onebox.rb
onebox-1.5.2 lib/onebox/engine/video_onebox.rb
onebox-1.5.1 lib/onebox/engine/video_onebox.rb
onebox-1.5.0 lib/onebox/engine/video_onebox.rb