diff --git a/ruby/lib/jam_ruby/models/connection.rb b/ruby/lib/jam_ruby/models/connection.rb index 47abee3cc..7a8b05c9f 100644 --- a/ruby/lib/jam_ruby/models/connection.rb +++ b/ruby/lib/jam_ruby/models/connection.rb @@ -145,6 +145,7 @@ module JamRuby end end + #removing this check to allow users to join recording sessions # if music_session.is_recording? # errors.add(:music_session, ValidationMessages::CANT_JOIN_RECORDING_SESSION) # end diff --git a/ruby/lib/jam_ruby/models/recording.rb b/ruby/lib/jam_ruby/models/recording.rb index d9eba2a4a..25bd1628c 100644 --- a/ruby/lib/jam_ruby/models/recording.rb +++ b/ruby/lib/jam_ruby/models/recording.rb @@ -32,7 +32,7 @@ module JamRuby foreign_key: :foreign_key1_id, dependent: :destroy - #validate :not_already_recording, :on => :create + validate :not_already_recording, :on => :create #validate :not_still_finalizing_previous, :on => :create validate :not_playback_recording, :on => :create validate :already_stopped_recording diff --git a/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee b/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee index a96d5c9a6..1c243c4bc 100644 --- a/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee +++ b/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee @@ -1391,7 +1391,6 @@ ConfigureTracksActions = @ConfigureTracksActions return this.app.notifyAlert("No Inputs Configured", $('You will need to reconfigure your audio device.')); } else if (response["errors"] && response["errors"]["music_session"] && (response["errors"]["music_session"][0] === ["is currently recording"])) { - alert("Unable to Join Session", "The session is currently recording."); leaveBehavior = { location: "/client#/findSession", notify: { @@ -2008,7 +2007,6 @@ ConfigureTracksActions = @ConfigureTracksActions # @issueChange() performLeaveSession: `async function(deferred) { - alert('SessionStore#performLeaveSession') logger.debug("SessionModel.leaveCurrentSession()"); logger.debug("performLeaveSession: calling jamClient.LeaveSession for clientId=" + this.app.clientId); diff --git a/web/app/assets/javascripts/recordingModel.js b/web/app/assets/javascripts/recordingModel.js index 553ffea91..3b8099733 100644 --- a/web/app/assets/javascripts/recordingModel.js +++ b/web/app/assets/javascripts/recordingModel.js @@ -115,7 +115,8 @@ } /** Nulls can be passed for all 3 currently; that's a user request. */ - function stopRecording(recordingId, reason, detail, serverStop = false) { + function stopRecording(recordingId, reason, detail) { + if(stoppingRecording) { logger.debug("ignoring stopRecording because we are already stopping"); return; @@ -139,10 +140,11 @@ // logger.debug("preemptive stop media") //context.jamClient.SessionStopPlay(); //} - - if(serverStop){ - await jamClient.PeerStopRecording(recording.id, groupedTracks); - }else{ + + console.log("_DEBUG_ stopRecording", recording.owner, context.JK.currentUserId) + + if(recording.owner.id === context.JK.currentUserId){ + alert("stopping recording for owner") await jamClient.StopRecording(recording.id, groupedTracks); } @@ -209,7 +211,7 @@ } function onServerStopRecording(recordingId) { - stopRecording(recordingId, null, null, true); + stopRecording(recordingId, null, null); } function handleRecordingStartResult(recordingId, result) {