Release v2.10.6
This commit is contained in:
@@ -44,6 +44,22 @@
|
||||
})
|
||||
.catch(function () { return null; });
|
||||
}
|
||||
function keepPairingSessionLoaded(deviceId, clientId) {
|
||||
var pairingSessionPoll = null;
|
||||
function poll() {
|
||||
loadPairingSession(deviceId, clientId).then(function (payload) {
|
||||
if (payload && payload.pairingCode) {
|
||||
loadQr(deviceId, clientId);
|
||||
if (pairingSessionPoll) {
|
||||
window.clearInterval(pairingSessionPoll);
|
||||
pairingSessionPoll = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
poll();
|
||||
pairingSessionPoll = window.setInterval(poll, 1000);
|
||||
}
|
||||
function getClientId() {
|
||||
var stored = getSessionStorageItem("pulse-signage-player-client-id");
|
||||
if (stored) { return stored; }
|
||||
@@ -74,9 +90,7 @@
|
||||
if (qr && !qr.getAttribute("src")) {
|
||||
qr.src = qrPlaceholderSrc;
|
||||
}
|
||||
loadPairingSession(deviceId, clientId).then(function () {
|
||||
loadQr(deviceId, clientId);
|
||||
});
|
||||
keepPairingSessionLoaded(deviceId, clientId);
|
||||
window.setInterval(function () { redirectIfOnboarded(deviceId); }, 2000);
|
||||
});
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user