Aggiunge modulo Replay, Garage dev e YouTube a livello società.
Pipeline registrazione/upload con storage S3, archivio web e app, proxy replay per il browser, OAuth YouTube sulla pagina club (Premium Full) e footer legale. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
20
backend/app/services/recordings/playback_url.rb
Normal file
20
backend/app/services/recordings/playback_url.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
module Recordings
|
||||
class PlaybackUrl
|
||||
def initialize(recording)
|
||||
@recording = recording
|
||||
end
|
||||
|
||||
def call
|
||||
raise ArgumentError, "Replay non pronto" unless @recording.ready?
|
||||
raise ArgumentError, "Storage key mancante" if @recording.storage_key.blank?
|
||||
|
||||
"#{MatchLiveTv.app_public_url.chomp('/')}/replay/#{@recording.stream_session_id}/stream"
|
||||
end
|
||||
|
||||
def local_path
|
||||
storage = Recordings::Storage.new
|
||||
path = storage.local_path_for_key(@recording.storage_key)
|
||||
path if path && File.exist?(path)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user