Sha256: 71d03b99f86848107953c94cde16acbeb6d2fee31884d100e047f7caf4e9a02a

Contents?: true

Size: 588 Bytes

Versions: 29

Compression:

Stored size: 588 Bytes

Contents

class VideosController < CommonDocumentsController
  respond_to :html,:js
  

  
  def show
    path = @video.file.path(params[:style])
    if(params[:style].present?) && Document::STYLE_FORMAT[params[:style]]
      path = path.split('.')[0]+'.'+Document::STYLE_FORMAT[params[:style]]
    end
    respond_to do |format|
      format.all {send_file path, 
                  :type => Document::STYLE_MIMETYPE[params[:style]],  # CANT USE: @video.file_content_type because it is allways video/mp4 and breaks explorer and firefox
                  :disposition => "inline"}
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
social_stream-0.9.5 documents/app/controllers/videos_controller.rb
social_stream-documents-0.2.8 app/controllers/videos_controller.rb
social_stream-0.9.4 documents/app/controllers/videos_controller.rb
social_stream-documents-0.2.7 app/controllers/videos_controller.rb
social_stream-0.9.3 documents/app/controllers/videos_controller.rb
social_stream-0.9.2 documents/app/controllers/videos_controller.rb
social_stream-documents-0.2.6 app/controllers/videos_controller.rb
social_stream-documents-0.2.5 app/controllers/videos_controller.rb
social_stream-documents-0.2.4 app/controllers/videos_controller.rb