Add onboarding weather and template gradients
This commit is contained in:
+23
-4
@@ -37,6 +37,9 @@ async function start() {
|
||||
let lastDisconnectAt = 0;
|
||||
let playerPublicBaseUrl = PLAYER_PUBLIC_URL || null;
|
||||
let refreshThinClientRegistration = null;
|
||||
let activePairingCode = '';
|
||||
let activePairingCodes = [];
|
||||
let activePairingSessions = [];
|
||||
const playerRuntime = createPlayerRuntime({
|
||||
pool: pool,
|
||||
normalizeDeviceId: normalizeDeviceId,
|
||||
@@ -262,7 +265,7 @@ async function start() {
|
||||
}
|
||||
response.ok = true;
|
||||
}
|
||||
} else if (['refresh', 'reload', 'redirect', 'pause', 'blackout', 'previous', 'next', 'setclientname'].indexOf(command) !== -1) {
|
||||
} else if (['refresh', 'reload', 'redirect', 'pause', 'blackout', 'previous', 'next', 'setclientname', 'announcement-refresh'].indexOf(command) !== -1) {
|
||||
const screenSlug = String(payload.screenSlug || payload.slug || '').trim();
|
||||
if (!screenSlug) {
|
||||
response.error = 'Screen slug is required.';
|
||||
@@ -305,7 +308,17 @@ async function start() {
|
||||
playerPublicBaseUrl: getPlayerPublicBaseUrl(),
|
||||
playerInternalBaseUrl: PLAYER_INTERNAL_URL,
|
||||
bridgeBaseUrl: BRIDGE_PUBLIC_URL,
|
||||
playerDeviceId: PLAYER_DEVICE_ID
|
||||
playerDeviceId: PLAYER_DEVICE_ID,
|
||||
onPairingCode: function (code, codes) {
|
||||
activePairingCode = String(code || '').trim().toUpperCase();
|
||||
activePairingSessions = Array.isArray(codes) ? codes.map(function (entry) {
|
||||
return { deviceId: String(entry && entry.deviceId || '').trim(), clientId: String(entry && entry.clientId || '').trim(), code: String(entry && entry.code || '').trim().toUpperCase() };
|
||||
}).filter(function (entry) { return entry.deviceId && entry.code; }) : [];
|
||||
activePairingCodes = activePairingSessions.map(function (entry) { return entry.code; });
|
||||
if (typeof refreshThinClientRegistration === 'function') {
|
||||
refreshThinClientRegistration();
|
||||
}
|
||||
}
|
||||
});
|
||||
registerPlayerRoutes(app, {
|
||||
pool: pool,
|
||||
@@ -375,7 +388,10 @@ async function start() {
|
||||
type: 'heartbeat',
|
||||
deviceId: PLAYER_DEVICE_ID,
|
||||
publicBaseUrl: getPlayerPublicBaseUrl(),
|
||||
internalBaseUrl: PLAYER_INTERNAL_URL
|
||||
internalBaseUrl: PLAYER_INTERNAL_URL,
|
||||
pairingCode: activePairingCode,
|
||||
pairingCodes: activePairingCodes,
|
||||
pairingSessions: activePairingSessions
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -439,7 +455,10 @@ async function start() {
|
||||
type: 'register',
|
||||
deviceId: PLAYER_DEVICE_ID,
|
||||
publicBaseUrl: getPlayerPublicBaseUrl(),
|
||||
internalBaseUrl: PLAYER_INTERNAL_URL
|
||||
internalBaseUrl: PLAYER_INTERNAL_URL,
|
||||
pairingCode: activePairingCode,
|
||||
pairingCodes: activePairingCodes,
|
||||
pairingSessions: activePairingSessions
|
||||
}));
|
||||
|
||||
playerRuntime.snapshotSlugs().forEach(function (slug) {
|
||||
|
||||
Reference in New Issue
Block a user