Class: AnimateIt::PublicPlayersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- AnimateIt::PublicPlayersController
- Defined in:
- app/controllers/animate_it/public_players_controller.rb
Overview
The only production-accessible AnimateIt surface. Compositions must opt in
explicitly with public_player!; all Studio and rendering controllers keep
their local-environment guard.
Constant Summary collapse
- AUDIO_BASE =
Rails.root.join("app/audio").freeze
Constants inherited from ApplicationController
ApplicationController::NullPolicy
Instance Method Summary collapse
Instance Method Details
#audio ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/animate_it/public_players_controller.rb', line 22 def audio segment = audio_segments[params[:index].to_i] return head :not_found unless segment file_path = resolve_audio_path(segment.source[:path]) return head :not_found unless file_path serve_with_byte_ranges(file_path) end |
#show ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/animate_it/public_players_controller.rb', line 12 def show @props = {} @track_document = composition.track_document TrackDocumentSchema.validate!(@track_document) @audio_segments = audio_segments @public_player = true @public_player_options = composition. render "animate_it/frames/player" end |