Merge branch 'develop' into feature/musician_profile_enhancements
This commit is contained in:
commit
51dc0c408a
|
|
@ -24,15 +24,34 @@ context.JK.SinglePlayerProfileGuardDialog = class SinglePlayerProfileGuardDialog
|
|||
@audioLatency = @dialog.find('.audio-latency')
|
||||
@btnPrivateSession = @dialog.find('.btn-private-session')
|
||||
@btnGearSetup = @dialog.find('.btn-gear-setup')
|
||||
@btnRescan = @dialog.find('.btn-rescan')
|
||||
@rescanningNotice = @dialog.find('.rescanning-notice')
|
||||
|
||||
@btnPrivateSession.on('click', @onPrivateSessionChoice)
|
||||
@btnGearSetup.on('click', @onGearSetupChoice)
|
||||
@btnRescan.on('click', @onRescan)
|
||||
|
||||
beforeShow:() =>
|
||||
@dialog.data('result', { choice: null})
|
||||
|
||||
|
||||
afterShow:() =>
|
||||
onRescan: () =>
|
||||
@gearUtils.scheduleAudioRestart('single-player-guard', 1000, @beforeScan, @afterScan)
|
||||
|
||||
beforeScan: () =>
|
||||
@dialog.find('.action-buttons a').addClass('disabled')
|
||||
@rescanningNotice.show();
|
||||
|
||||
afterScan: (canceled) =>
|
||||
@dialog.find('.action-buttons a').removeClass('disabled')
|
||||
@rescanningNotice.hide();
|
||||
|
||||
if !canceled
|
||||
result = context.jamClient.ReloadAudioSystem(true, true, true);
|
||||
|
||||
@refresh();
|
||||
|
||||
refresh:() =>
|
||||
canPlayWithOthers = @gearUtils.canPlayWithOthers()
|
||||
|
||||
if canPlayWithOthers.isNoInputProfile
|
||||
|
|
@ -46,6 +65,11 @@ context.JK.SinglePlayerProfileGuardDialog = class SinglePlayerProfileGuardDialog
|
|||
|
||||
@audioLatency.text("#{latency} milliseconds.")
|
||||
|
||||
afterShow:() =>
|
||||
@refresh()
|
||||
|
||||
|
||||
|
||||
onPrivateSessionChoice: () =>
|
||||
@dialog.data('result', { choice: 'private_session'})
|
||||
@app.layout.closeDialog(@dialogId)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,13 @@
|
|||
var monitorPlaybackTimeout = null;
|
||||
var playbackMonitorMode = PLAYBACK_MONITOR_MODE.MEDIA_FILE;
|
||||
|
||||
function init() {
|
||||
updateSliderPosition(0);
|
||||
updateDurationTime(0);
|
||||
updateCurrentTime(0);
|
||||
seenActivity = false;
|
||||
}
|
||||
|
||||
function startPlay() {
|
||||
seenActivity = false;
|
||||
updateIsPlaying(true);
|
||||
|
|
@ -349,6 +356,9 @@
|
|||
|
||||
function startMonitor(_playbackMonitorMode) {
|
||||
|
||||
// resets everything to zero
|
||||
init();
|
||||
|
||||
if(_playbackMonitorMode === undefined || _playbackMonitorMode === null) {
|
||||
playbackMonitorMode = PLAYBACK_MONITOR_MODE.MEDIA_FILE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -937,12 +937,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
if(optionRequiresMultiplayerProfile()) {
|
||||
if(context.JK.guardAgainstSinglePlayerProfile(app).canPlay == false) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var valid = beforeMoveStep();
|
||||
if (!valid) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1273,9 +1273,10 @@
|
|||
});
|
||||
}
|
||||
|
||||
function renderJamTracks(jamTrackMixers) {
|
||||
function renderJamTracks(jamTrackMixersOrig) {
|
||||
logger.debug("rendering jam tracks")
|
||||
|
||||
var jamTrackMixers = jamTrackMixersOrig.slice();
|
||||
var jamTracks = []
|
||||
var jamTrackName = 'JamTrack';
|
||||
if(sessionModel.isPlayingRecording()) {
|
||||
|
|
@ -1305,7 +1306,7 @@
|
|||
var preMasteredClass = "";
|
||||
// find the track or tracks that correspond to the mixer
|
||||
var correspondingTracks = []
|
||||
$.each(jamTrackMixers, function(i, matchMixer) {
|
||||
$.each(jamTrackMixersOrig, function(i, matchMixer) {
|
||||
if(matchMixer.id == jamTrack.id) {
|
||||
correspondingTracks.push(jamTrack);
|
||||
mixer = matchMixer;
|
||||
|
|
@ -1327,6 +1328,9 @@
|
|||
return $.inArray(value, correspondingTracks) < 0;
|
||||
});
|
||||
|
||||
// prune found mixers
|
||||
jamTrackMixers.splice(mixer);
|
||||
|
||||
var oneOfTheTracks = correspondingTracks[0];
|
||||
var instrumentIcon = context.JK.getInstrumentIcon45(oneOfTheTracks.instrument.id);
|
||||
var photoUrl = "/assets/content/icon_recording.png";
|
||||
|
|
@ -2626,6 +2630,13 @@
|
|||
}
|
||||
|
||||
function checkPendingMetronome() {
|
||||
|
||||
if(sessionModel.jamTracks() !== null || sessionModel.recordedJamTracks() !== null) {
|
||||
// ignore all metronome events when jamtracks are open, because backend opens metronome mixer to play jamtrack tap-ins
|
||||
logger.debug("ignore checkPendingMetronome because JamTrack is open")
|
||||
return;
|
||||
}
|
||||
|
||||
//logger.debug("checkPendingMetronome", sessionModel.isMetronomeOpen(), getMetronomeMasterMixers().length)
|
||||
if(sessionModel.isMetronomeOpen() && getMetronomeMasterMixers().length == 0) {
|
||||
var pendingMetronome = $($templatePendingMetronome.html())
|
||||
|
|
@ -3157,7 +3168,8 @@
|
|||
|
||||
function showFTUEWhenNoInputs( ) {
|
||||
//app.afterFtue = function() { window.location.reload };
|
||||
app.layout.startNewFtue();
|
||||
//app.layout.startNewFtue();
|
||||
window.location = '/client#/account/audio'
|
||||
}
|
||||
|
||||
function events() {
|
||||
|
|
@ -3177,7 +3189,8 @@
|
|||
|
||||
if(gearUtils.isNoInputProfile()) {
|
||||
// show FTUE
|
||||
showFTUEWhenNoInputs();
|
||||
// showFTUEWhenNoInputs();
|
||||
app.notify({title:'Settings Disabled', text:'You can not alter any settings for the System Default playback device.'})
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,14 @@
|
|||
// as well have a score below 20 ms
|
||||
gearUtils.canPlayWithOthers = function(profile) {
|
||||
|
||||
if(gon.global.gear_check_reload_audio) {
|
||||
if (!context.jamClient.IsAudioStarted()) {
|
||||
context.jamClient.ReloadAudioSystem(true, true, true);
|
||||
context.jamClient.StopAudio();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var isNoInputProfile = gearUtils.isNoInputProfile(profile);
|
||||
var expectedLatency = context.jamClient.FTUEGetExpectedLatency();
|
||||
var audioLatency = expectedLatency ? expectedLatency.latency : null;
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@
|
|||
$mytracks-minwidth: 180px;
|
||||
$livetracks-minwidth:180px;
|
||||
$otheraudio-minwidth:195px;
|
||||
$otheraudio-open-minwidth:230px;
|
||||
$otheraudio-open-minwidth:260px;
|
||||
|
||||
#session-mytracks-notracks {
|
||||
display:none;
|
||||
|
|
|
|||
|
|
@ -26,4 +26,13 @@
|
|||
p {
|
||||
line-height:125%;
|
||||
}
|
||||
|
||||
.rescanning-notice {
|
||||
display:none;
|
||||
|
||||
span.spinner-small {
|
||||
display:inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,8 @@
|
|||
%br/
|
||||
%select{:name => "genre"}
|
||||
.field.w100.left{:purpose => "description"}
|
||||
%label{:for => "description"}=Rails.application.config.video_available
|
||||
%label{:for => "description"} Description:
|
||||
%br/
|
||||
%textarea#claim-recording-description.w100{:name => "description"}
|
||||
-if (Rails.application.config.video_available=="full") || (current_user && current_user.admin)
|
||||
.field.left{:purpose => "save_video"}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@
|
|||
br
|
||||
| With this profile, you can't play with others in real-time. However, you can play with JamTracks and backing tracks by yourself in a private session, or go to the gear setup wizard and add a new audio profile that uses your gear.
|
||||
.right.action-buttons
|
||||
span.rescanning-notice
|
||||
span.spinner-small
|
||||
| Rescanning...
|
||||
a.button-grey.btn-cancel href='#' layout-action="cancel" CANCEL
|
||||
a.button-grey.btn-rescan.hidden href='#' RESCAN
|
||||
a.button-grey.btn-gear-setup href="/client#/account/audio" GO TO GEAR SETUP
|
||||
a.button-orange.btn-private-session href="#" PRIVATE SESSION
|
||||
|
|
@ -332,5 +332,6 @@ if defined?(Bundler)
|
|||
config.alerts_api_enabled = true
|
||||
|
||||
config.gear_check_ignore_high_latency = false
|
||||
config.gear_check_reload_audio = true
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -14,4 +14,5 @@ Gon.global.recurly_public_api_key = Rails.application.config.recurly_public_api_
|
|||
Gon.global.one_free_jamtrack_per_user = Rails.application.config.one_free_jamtrack_per_user
|
||||
Gon.global.video_available = Rails.application.config.video_available
|
||||
Gon.global.gear_check_ignore_high_latency = Rails.application.config.gear_check_ignore_high_latency
|
||||
Gon.global.gear_check_reload_audio = Rails.application.config.gear_check_reload_audio
|
||||
Gon.global.env = Rails.env
|
||||
|
|
|
|||
Loading…
Reference in New Issue