Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from Matho/master

Ability to change player skin in config
  • Loading branch information...
commit b2bf2efdc4563ce48a0c9c19444675e66d17e3d4 2 parents 334b6dd + a81daf4
@antonmi antonmi authored
View
2  app/models/refinery/videos/video.rb
@@ -64,7 +64,7 @@ def to_html
sources << ["<source src='#{file.url}' type='#{file.file_mime_type}'/>"]
end if file.exist?
end
- html = %Q{<video id="video_#{self.id}" class="video-js vjs-default-skin" width="#{config[:width]}" height="#{config[:height]}" data-setup=' {#{data_setup.join(',')}}'>#{sources.join}</video>}
+ html = %Q{<video id="video_#{self.id}" class="video-js #{Refinery::Videos.skin_css_class}" width="#{config[:width]}" height="#{config[:height]}" data-setup=' {#{data_setup.join(',')}}'>#{sources.join}</video>}
html.html_safe
end
View
3  lib/generators/refinery/videos/templates/config/initializers/refinery/videos.rb.erb
@@ -7,6 +7,9 @@ Refinery::Videos.configure do |config|
# Configure white-listed mime types for validation
#config.whitelisted_mime_types = <%= Refinery::Videos.whitelisted_mime_types %>
+
+ # Configure skin. Put css class name to activate skin. For YouTube like skin put tubecss and add css with images to assets path.
+ # config.skin_css_class = <%= Refinery::Videos.skin_css_class %>
# Configure Dragonfly
# This is where in the middleware stack to insert the Dragonfly middleware
View
3  lib/refinery/videos/configuration.rb
@@ -6,7 +6,7 @@ module Videos
:max_file_size, :pages_per_dialog, :pages_per_admin_index,
:s3_backend, :s3_bucket_name, :s3_region,
:s3_access_key_id, :s3_secret_access_key,
- :datastore_root_path, :trust_file_extensions, :whitelisted_mime_types
+ :datastore_root_path, :trust_file_extensions, :whitelisted_mime_types, :skin_css_class
self.dragonfly_insert_before = 'ActionDispatch::Callbacks'
self.dragonfly_secret = Refinery::Core.dragonfly_secret
@@ -16,6 +16,7 @@ module Videos
self.pages_per_dialog = 7
self.pages_per_admin_index = 20
self.whitelisted_mime_types = %w(video/mp4 video/x-flv application/ogg video/webm video/flv video/ogg)
+ self.skin_css_class = "vjs-default-skin"
class << self
def datastore_root_path
Please sign in to comment.
Something went wrong with that request. Please try again.