Sha256: 279184c6957a307d25335edc337aeb3b4b528bc8aad77718e42daa94a50447cc

Contents?: true

Size: 336 Bytes

Versions: 1

Compression:

Stored size: 336 Bytes

Contents

module VideoJsHelper
  def video_player *args
    options = { width: 640, height: 360, class: 'video-js vjs-default-skin' }.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

1 entries across 1 versions & 1 rubygems

Version Path
video-js-rails-3.2.3 app/helpers/video_js_helper.rb