Skip to content

Commit

Permalink
Merge pull request #3 from Matho/master
Browse files Browse the repository at this point in the history
Ability to change player skin in config
  • Loading branch information
antonmi committed Aug 11, 2012
2 parents 334b6dd + a81daf4 commit b2bf2ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/refinery/videos/video.rb
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/refinery/videos/configuration.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b2bf2ef

Please sign in to comment.