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>
21 lines
560 B
Ruby
21 lines
560 B
Ruby
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
|