Allow seeking stream backwards to the beginning #58

Closed
bilal.catic wants to merge 6 commits from allow-seeking-stream-backwards-to-the-beginning into master
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 209da288dc - Show all commits

View File

@@ -16,8 +16,7 @@ class StreamNotificationsController < ApplicationController
notify_users
when "video.asset.ready"
full_live_stream_playback_uid = notification.dig(:data, :playback_ids, 0, :id)
@broadcast.full_live_stream_playback_uid = full_live_stream_playback_uid
@broadcast.save
@broadcast.update(full_live_stream_playback_uid: full_live_stream_playback_uid)
notify_users
when "video.live_stream.active"
@broadcast.active!

View File

@@ -31,6 +31,8 @@ class Broadcast < ApplicationRecord
end
def full_live_stream_playback_url
return stream_playback_url if full_live_stream_playback_uid.blank?
"https://stream.mux.com/#{full_live_stream_playback_uid}.m3u8"
end