Fix player cached images and blank time dates
This commit is contained in:
1 parent
ac18644fe8
commit
222162df57
5 files changed
+43
-8
No files matched your search
@@ -489,10 +489,6 @@ function createLocalControlService(options) {
|
||||
}
|
||||
}
|
||||
|
||||
app.use('/media/player-cache', function (_req, res) {
|
||||
return res.sendStatus(404);
|
||||
});
|
||||
|
||||
app.get('/local-control', function (req, res) {
|
||||
res.set('Cache-Control', 'no-store');
|
||||
res.type('html').send(renderPageV2());
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
var registry = window.pulsePlayerRegionTypes;
|
||||
var placeholderUtils = window.placeholderUtils || {};
|
||||
var DEFAULT_FORMAT = '{{hh}}:{{mm}}';
|
||||
var DEFAULT_STYLE = {
|
||||
font_family: 'Arial',
|
||||
font_size: 32,
|
||||
@@ -223,7 +222,7 @@ function resolveTimeDateTemplatePlaceholder(values, expression) {
|
||||
}
|
||||
|
||||
function renderTimeDateTemplate(format, timeZone, date) {
|
||||
var template = String(format || '').trim() || DEFAULT_FORMAT;
|
||||
var template = String(format || '').trim();
|
||||
var values = getTimeDateFormattedParts(timeZone, date);
|
||||
return template.replace(/\{\{\s*([a-zA-Z0-9_.()\-]+)\s*\}\}/g, function (_match, key) {
|
||||
return String(resolveTimeDateTemplatePlaceholder(values, key, { timeZone: timeZone }) || '');
|
||||
@@ -243,7 +242,7 @@ function getTextStyle(regionContent, region) {
|
||||
|
||||
function renderTimeDateRegion(region, regionContent) {
|
||||
var content = regionContent && typeof regionContent === 'object' ? regionContent : {};
|
||||
var format = String(content.value !== undefined ? content.value : content.text || '').trim() || DEFAULT_FORMAT;
|
||||
var format = String(content.value !== undefined ? content.value : content.text || '').trim();
|
||||
var timeZone = resolveTimeZone(content.timezone || content.time_zone || '');
|
||||
var style = getTextStyle(content, region);
|
||||
var fontFamily = style.font_family ? 'font-family:' + escapeHtml(style.font_family) + ';' : '';
|
||||
@@ -259,7 +258,7 @@ function updateTimeDateRegion(element) {
|
||||
return;
|
||||
}
|
||||
|
||||
var format = String(element.dataset.timeDateFormat || '').trim() || DEFAULT_FORMAT;
|
||||
var format = String(element.dataset.timeDateFormat || '').trim();
|
||||
var timeZone = String(element.dataset.timeDateTimezone || '').trim();
|
||||
var scaleWrapper = element.querySelector('.template-region-text-scale');
|
||||
if (!scaleWrapper) {
|
||||
|
||||
Reference in new issue
Block a user