use var instead of let/const
let and const keywords in javascript can not use because the code based is also been used in the production client.
This commit is contained in:
parent
2459b3d447
commit
6ad9aed71f
|
|
@ -1531,13 +1531,13 @@
|
|||
//this custom url scheme is loaded and as a result the JamKazam app loads create session window.
|
||||
function initCustomUrlScheme(){
|
||||
//an example URL would be: https://www.jamkazam.com/client#/createSession/custom~yes|privacy~2|description~hello|inviteeIds~1,2,3,4
|
||||
const hash = decodeURIComponent(context.location.hash);
|
||||
const qStr = hash.substring(hash.lastIndexOf('/') + 1);
|
||||
var hash = decodeURIComponent(context.location.hash);
|
||||
var qStr = hash.substring(hash.lastIndexOf('/') + 1);
|
||||
//decode the query params according to the custom format
|
||||
const qParamsArr = qStr.split('|');
|
||||
let isCustom, privacy, description, inviteeIds;
|
||||
var qParamsArr = qStr.split('|');
|
||||
var isCustom, privacy, description, inviteeIds;
|
||||
qParamsArr.forEach(function(q){
|
||||
const qp = q.split('~')
|
||||
var qp = q.split('~')
|
||||
if(qp[0] === 'custom') isCustom = qp[1]
|
||||
if(qp[0] === 'privacy') privacy = qp[1]
|
||||
if(qp[0] === 'description') description = qp[1]
|
||||
|
|
@ -1567,9 +1567,9 @@
|
|||
waitUntilSessionCreated().then(function(){
|
||||
//now async send invitations
|
||||
if(createSessionSettings.newSessionId && inviteeIds !== undefined){
|
||||
const inviteUserIds = inviteeIds.split(',');
|
||||
var inviteUserIds = inviteeIds.split(',');
|
||||
inviteUserIds.forEach(function(inviteId){
|
||||
const invite = {
|
||||
var invite = {
|
||||
music_session: createSessionSettings.newSessionId,
|
||||
receiver: inviteId
|
||||
};
|
||||
|
|
@ -1587,10 +1587,10 @@
|
|||
|
||||
function waitUntilSessionCreated(){
|
||||
return new Promise(function(resolve, reject){
|
||||
const maxAttempts = 5;
|
||||
let attempt = 0;
|
||||
var maxAttempts = 5;
|
||||
var attempt = 0;
|
||||
try{
|
||||
const sessionCreateInterval = setInterval(function(){
|
||||
var sessionCreateInterval = setInterval(function(){
|
||||
attempt++;
|
||||
console.log('_DEBUG_ trying to get the sessionId....', attempt)
|
||||
if(createSessionSettings.newSessionId){
|
||||
|
|
|
|||
Loading…
Reference in New Issue