Sha256: acafab9314b6aeadc2c2c42b137492682dc84a13a1ab35c167bfb2a69f460c76

Contents?: true

Size: 359 Bytes

Versions: 3

Compression:

Stored size: 359 Bytes

Contents

module VideoJsHelper
  def video_player *args
    options = { width: 640, height: 360, class: 'video-js vjs-default-skin', :'data-setup' => '{}' }.merge args.extract_options!
    src = options.delete(:src) || {}

    content_tag :video, options do
      raw src.map { |type, url| raw tag(:source, src: url, type: "video/#{type}") }.join('')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
video-js-rails-4.3.0.1 app/helpers/video_js_helper.rb
video-js-rails-4.3.0.0 app/helpers/video_js_helper.rb
video-js-rails-3.2.3.1 app/helpers/video_js_helper.rb