Sha256: 4761935b8f2cd02437b33df7657a352c1c23949a4f9d60cb948d12b8bafee45e

Contents?: true

Size: 427 Bytes

Versions: 40

Compression:

Stored size: 427 Bytes

Contents

module Onebox
  module Engine
    class VideoOnebox
      include Engine

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

      def always_https?
        WhitelistedGenericOnebox.host_matches(uri, WhitelistedGenericOnebox.https_hosts)
      end

      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

40 entries across 40 versions & 1 rubygems

Version Path
onebox-1.5.41 lib/onebox/engine/video_onebox.rb
onebox-1.5.40 lib/onebox/engine/video_onebox.rb
onebox-1.5.39 lib/onebox/engine/video_onebox.rb
onebox-1.5.38 lib/onebox/engine/video_onebox.rb
onebox-1.5.37 lib/onebox/engine/video_onebox.rb
onebox-1.5.36 lib/onebox/engine/video_onebox.rb
onebox-1.5.35 lib/onebox/engine/video_onebox.rb
onebox-1.5.34 lib/onebox/engine/video_onebox.rb
onebox-1.5.33 lib/onebox/engine/video_onebox.rb
onebox-1.5.32 lib/onebox/engine/video_onebox.rb
onebox-1.5.31 lib/onebox/engine/video_onebox.rb
onebox-1.5.30 lib/onebox/engine/video_onebox.rb
onebox-1.5.29 lib/onebox/engine/video_onebox.rb
onebox-1.5.28 lib/onebox/engine/video_onebox.rb
onebox-1.5.27 lib/onebox/engine/video_onebox.rb
onebox-1.5.26 lib/onebox/engine/video_onebox.rb
onebox-1.5.25 lib/onebox/engine/video_onebox.rb
onebox-1.5.24 lib/onebox/engine/video_onebox.rb
onebox-1.5.23 lib/onebox/engine/video_onebox.rb
onebox-1.5.22 lib/onebox/engine/video_onebox.rb