@xibosignage/xibo-layout-renderer 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73133,7 +73133,7 @@ function Media(region, mediaId, xml, options, xlr) {
73133
73133
  $media = getNewMedia();
73134
73134
  }
73135
73135
  if (!$media) {
73136
- _context2.next = 40;
73136
+ _context2.next = 39;
73137
73137
  break;
73138
73138
  }
73139
73139
  $media.style.setProperty('display', 'block');
@@ -73162,48 +73162,46 @@ function Media(region, mediaId, xml, options, xlr) {
73162
73162
  _context2.t3 = _context2.t2;
73163
73163
  _context2.t4 = _context2.t1.concat.call(_context2.t1, _context2.t3);
73164
73164
  _context2.t0.setProperty.call(_context2.t0, 'background-image', _context2.t4);
73165
- _context2.next = 39;
73165
+ _context2.next = 38;
73166
73166
  break;
73167
73167
  case 22:
73168
73168
  if (!(self.mediaType === 'video' && self.url !== null)) {
73169
- _context2.next = 27;
73169
+ _context2.next = 26;
73170
73170
  break;
73171
73171
  }
73172
73172
  // Initialize video.js
73173
- videojs($media, {
73173
+ self.player = videojs($media, {
73174
73174
  controls: false,
73175
73175
  preload: 'auto',
73176
73176
  autoplay: false,
73177
73177
  muted: self.muted,
73178
73178
  errorDisplay: xlr.config.platform !== 'chromeOS',
73179
- restoreEl: $media,
73180
73179
  loop: self.loop
73181
73180
  });
73182
- self.player = videojs($media);
73183
- _context2.next = 39;
73181
+ _context2.next = 38;
73184
73182
  break;
73185
- case 27:
73183
+ case 26:
73186
73184
  if (!(self.mediaType === 'audio' && self.url !== null)) {
73187
- _context2.next = 38;
73185
+ _context2.next = 37;
73188
73186
  break;
73189
73187
  }
73190
73188
  if (!isCMS) {
73191
- _context2.next = 34;
73189
+ _context2.next = 33;
73192
73190
  break;
73193
73191
  }
73194
- _context2.next = 31;
73192
+ _context2.next = 30;
73195
73193
  return preloadMediaBlob(self.url, self.mediaType);
73196
- case 31:
73194
+ case 30:
73197
73195
  _context2.t5 = _context2.sent;
73198
- _context2.next = 35;
73196
+ _context2.next = 34;
73199
73197
  break;
73200
- case 34:
73198
+ case 33:
73201
73199
  _context2.t5 = self.url;
73202
- case 35:
73200
+ case 34:
73203
73201
  $media.src = _context2.t5;
73204
- _context2.next = 39;
73202
+ _context2.next = 38;
73205
73203
  break;
73206
- case 38:
73204
+ case 37:
73207
73205
  if ((self.render === 'html' || self.mediaType === 'webpage') && self.iframe && self.checkIframeStatus) {
73208
73206
  // Set state as false ( for now )
73209
73207
  self.ready = false;
@@ -73219,9 +73217,9 @@ function Media(region, mediaId, xml, options, xlr) {
73219
73217
  // }
73220
73218
  // });
73221
73219
  }
73222
- case 39:
73220
+ case 38:
73223
73221
  self.emitter.emit('start', self);
73224
- case 40:
73222
+ case 39:
73225
73223
  case "end":
73226
73224
  return _context2.stop();
73227
73225
  }
@@ -73283,6 +73281,9 @@ function Region(layout, xml, regionId, options, xlr) {
73283
73281
  self.complete = false;
73284
73282
  self.ending = false;
73285
73283
  self.ended = false;
73284
+ self.curMedia = undefined;
73285
+ self.nxtMedia = undefined;
73286
+ self.currentMediaIndex = 0;
73286
73287
  self.id = props.regionId;
73287
73288
  self.uniqueId = "".concat(nextId(self.options));
73288
73289
  self.options = _objectSpread2(_objectSpread2({}, platform), props.options);
@@ -74570,9 +74571,7 @@ function XiboLayoutRenderer(inputLayouts, options) {
74570
74571
  console.debug('prepareLayouts::xlr>layouts', self.layouts);
74571
74572
  return _context3.abrupt("return", new Promise(function (resolve) {
74572
74573
  layouts.map(function (layoutItem) {
74573
- if (!Boolean(self.layouts[layoutItem.index])) {
74574
- self.layouts[layoutItem.index] = layoutItem;
74575
- }
74574
+ self.layouts[layoutItem.index] = layoutItem;
74576
74575
  });
74577
74576
  self.currentLayoutIndex = xlrLayouts.currentLayoutIndex;
74578
74577
  self.currentLayout = self.layouts[self.currentLayoutIndex];