docker updates.
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
<script>
|
||||
const slug = {{SLUG_JSON}};
|
||||
const initialData = {{INITIAL_DATA_JSON}};
|
||||
function parseTemplateJson(templateValue, fallbackValue) {
|
||||
if (typeof templateValue !== 'string' || /^\s*\{\{.*\}\}\s*$/.test(templateValue)) {
|
||||
return fallbackValue;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(templateValue);
|
||||
} catch (_error) {
|
||||
return fallbackValue;
|
||||
}
|
||||
}
|
||||
|
||||
const slug = parseTemplateJson('{{SLUG_JSON}}', '');
|
||||
const initialData = parseTemplateJson('{{INITIAL_DATA_JSON}}', {});
|
||||
const app = document.getElementById('app');
|
||||
let slides = Array.isArray(initialData && initialData.slides) ? initialData.slides.map(normalizeSlide) : [];
|
||||
let currentPlaylistSignature = '';
|
||||
@@ -31,7 +42,7 @@
|
||||
let slideExpiresAt = null;
|
||||
const slideFadeDurationMs = 560;
|
||||
const commandSocketPath = '/ws/screens/' + encodeURIComponent(slug);
|
||||
const commandClientStorageKey = 'digital-signage-player-client-id:' + slug;
|
||||
const commandClientStorageKey = 'pulse-signage-player-client-id:' + slug;
|
||||
|
||||
// Escape text before inserting it into HTML.
|
||||
function escapeHtml(value) {
|
||||
|
||||
Reference in New Issue
Block a user