custom URL schema for create a session
handles URL loaded as a custom URL format (jamkazam://) which is meant to create a new session with the provided parameters
This commit is contained in:
parent
de115773ec
commit
cef7f1efbe
|
|
@ -280,7 +280,7 @@
|
|||
}
|
||||
console.log("logged with new msg", msg);
|
||||
const loggedInResp = await context.jamClient.OnLoggedIn(msg); // ACTS AS CONTINUATION
|
||||
console.log("** loggedInResp case1", loggedInResp);
|
||||
console.log("_DEBUG_ OnLoggedIn response (1)", loggedInResp);
|
||||
if (loggedInResp && loggedInResp['CustomUrl']) {
|
||||
handleLoggedInResponse(loggedInResp['CustomUrl']);
|
||||
}
|
||||
|
|
@ -292,7 +292,7 @@
|
|||
payload.username
|
||||
); // ACTS AS CONTINUATION
|
||||
if (loggedInResp && loggedInResp['CustomUrl']) {
|
||||
console.log("** loggedInResp case2", loggedInResp);
|
||||
console.log("_DEBUG_ OnLoggedIn response (2)", loggedInResp);
|
||||
handleLoggedInResponse(loggedInResp['CustomUrl']);
|
||||
}
|
||||
}
|
||||
|
|
@ -377,7 +377,7 @@
|
|||
try {
|
||||
const url = new URL(loggedInResp);
|
||||
const redirectTo = new URLSearchParams(url.search).get("redirect-to");
|
||||
console.log("** redirecting to", redirectTo);
|
||||
console.log("_DEBUG_ handleLoggedInResponse redirecting to", loggedInResp);
|
||||
if (redirectTo) {
|
||||
window.location.href = redirectTo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ logger = context.JK.logger
|
|||
else
|
||||
mediaCategoryMixer = mixers.getUserMediaCategoryMixer(@props.mode)
|
||||
|
||||
console.log('_DEBUG_ mediaCategoryMixer', mediaCategoryMixer)
|
||||
state =
|
||||
isRecording: session.isRecording
|
||||
mediaSummary: mixers.mediaSummary
|
||||
|
|
|
|||
|
|
@ -309,14 +309,12 @@
|
|||
}
|
||||
|
||||
function beforeShowStep0() {
|
||||
console.log('** beforeShowStep0');
|
||||
$scheduledSessions.empty();
|
||||
$noSessionFound.hide();
|
||||
$fetchingSpinner.show();
|
||||
$fetchingSpinnerLabel.show();
|
||||
|
||||
Promise.all([fetchScheduledSessions(), fetchUserDetail()]).then(function() {
|
||||
console.log('** calling createSessionByCustomUrlScheme');
|
||||
createSessionByCustomUrlScheme();
|
||||
});
|
||||
|
||||
|
|
@ -581,7 +579,9 @@
|
|||
createSessionSettings.timezone.label = "(GMT-06:00) Central Time (US & Canada)";
|
||||
createSessionSettings.timezone.value = "Central Time (US & Canada),America/Chicago";
|
||||
createSessionSettings.name = "Private Test Session";
|
||||
createSessionSettings.description = "Private session set up just to test things out in the session interface by myself.";
|
||||
if(createSessionSettings.description == null || createSessionSettings.description == '') {
|
||||
createSessionSettings.description = "Private session set up just to test things out in the session interface by myself.";
|
||||
}
|
||||
createSessionSettings.notations = [];
|
||||
createSessionSettings.language.label = 'English';
|
||||
createSessionSettings.language.value = 'eng';
|
||||
|
|
@ -599,7 +599,9 @@
|
|||
createSessionSettings.timezone.label = "(GMT-06:00) Central Time (US & Canada)";
|
||||
createSessionSettings.timezone.value = "Central Time (US & Canada),America/Chicago";
|
||||
createSessionSettings.name = "Open Session";
|
||||
createSessionSettings.description = "Feel free to join this session, it's open!";
|
||||
if(createSessionSettings.description == null || createSessionSettings.description == '') {
|
||||
createSessionSettings.description = "Feel free to join this session, it's open!";
|
||||
}
|
||||
createSessionSettings.notations = [];
|
||||
createSessionSettings.language.label = 'English';
|
||||
createSessionSettings.language.value = 'eng';
|
||||
|
|
@ -882,7 +884,6 @@
|
|||
data.friends_can_join = createSessionSettings.friends_can_join;
|
||||
|
||||
data.rsvp_slots = [];
|
||||
console.log("** calling getCreatorInstruments ");
|
||||
$.each(getCreatorInstruments(), function(index, instrument) {
|
||||
var slot = {};
|
||||
slot.instrument_id = instrument.id;
|
||||
|
|
@ -890,7 +891,6 @@
|
|||
slot.approve = true;
|
||||
data.rsvp_slots.push(slot);
|
||||
});
|
||||
console.log("** data.rsvp_slots 1", data.rsvp_slots);
|
||||
|
||||
var otherInstruments = instrumentRSVP.getSelectedInstruments();
|
||||
data.isUnstructuredRsvp = otherInstruments.length == 0 && userSelectedSlots(createSessionSettings.createType);
|
||||
|
|
@ -903,7 +903,6 @@
|
|||
data.rsvp_slots.push(slot);
|
||||
}
|
||||
});
|
||||
console.log("** data.rsvp_slots 2", data.rsvp_slots);
|
||||
}
|
||||
|
||||
var joinSession = function(sessionId) {
|
||||
|
|
@ -1514,7 +1513,6 @@
|
|||
var beginnerLevel = 1; // default to beginner
|
||||
instruments = [ {id: otherId, name: otherInstrumentInfo.display, level: beginnerLevel} ];
|
||||
}
|
||||
console.log("** creator instruments", instruments)
|
||||
return instruments;
|
||||
}
|
||||
|
||||
|
|
@ -1598,9 +1596,9 @@
|
|||
|
||||
waitUntilSessionCreated().then(function(){
|
||||
//now async send invitations
|
||||
console.log('** newSessionId', createSessionSettings.newSessionId)
|
||||
console.log('_DEBUG_ waitUntilSessionCreated createSessionSettings.newSessionId', createSessionSettings.newSessionId)
|
||||
if(createSessionSettings.newSessionId && inviteeIds !== undefined){
|
||||
var inviteUserIds = inviteeIds.split(',');
|
||||
var inviteUserIds = inviteeIds.split(',').filter(Boolean); //filter to remove empty strings
|
||||
inviteUserIds.forEach(function(inviteId){
|
||||
var invite = {
|
||||
music_session: createSessionSettings.newSessionId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue