@xibosignage/xibo-layout-renderer 1.0.12 → 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.
- package/dist/src/Modules/Media/VideoMedia.d.ts +2 -1
- package/dist/src/Types/Media/Media.types.d.ts +2 -0
- package/dist/styles.css +5 -0
- package/dist/xibo-layout-renderer.cjs.js +175 -192
- package/dist/xibo-layout-renderer.cjs.js.map +1 -1
- package/dist/xibo-layout-renderer.d.ts +2 -0
- package/dist/xibo-layout-renderer.esm.js +175 -192
- package/dist/xibo-layout-renderer.esm.js.map +1 -1
- package/dist/xibo-layout-renderer.js +175 -192
- package/dist/xibo-layout-renderer.min.js +4 -4
- package/dist/xibo-layout-renderer.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Emitter, Unsubscribe, DefaultEvents } from 'nanoevents';
|
|
2
|
+
import Player from 'video.js/dist/types/player';
|
|
2
3
|
|
|
3
4
|
declare enum ELayoutType {
|
|
4
5
|
CURRENT = 0,
|
|
@@ -73,6 +74,7 @@ interface IMedia {
|
|
|
73
74
|
emitter: Emitter<IMediaEvents>;
|
|
74
75
|
enableStat: boolean;
|
|
75
76
|
muted?: boolean;
|
|
77
|
+
player?: Player;
|
|
76
78
|
}
|
|
77
79
|
declare const initialMedia: IMedia;
|
|
78
80
|
|
|
@@ -69558,7 +69558,8 @@ var initialMedia = {
|
|
|
69558
69558
|
},
|
|
69559
69559
|
emitter: {},
|
|
69560
69560
|
enableStat: false,
|
|
69561
|
-
muted: false
|
|
69561
|
+
muted: false,
|
|
69562
|
+
player: undefined
|
|
69562
69563
|
};
|
|
69563
69564
|
|
|
69564
69565
|
/*
|
|
@@ -72621,166 +72622,149 @@ function PwaSW() {
|
|
|
72621
72622
|
};
|
|
72622
72623
|
}
|
|
72623
72624
|
|
|
72624
|
-
function composeVideoSource(
|
|
72625
|
-
|
|
72626
|
-
|
|
72627
|
-
|
|
72628
|
-
|
|
72629
|
-
var
|
|
72630
|
-
|
|
72631
|
-
|
|
72632
|
-
|
|
72633
|
-
|
|
72634
|
-
|
|
72635
|
-
case 2:
|
|
72636
|
-
videoSrc = _context4.sent;
|
|
72637
|
-
vidType = videoFileType(getFileExt(media.uri)); // Only add one source per type
|
|
72638
|
-
if ($media.querySelectorAll("source[type=\"".concat(vidType, "\"]")).length === 0) {
|
|
72639
|
-
$videoSource = document.createElement('source');
|
|
72640
|
-
$videoSource.src = videoSrc;
|
|
72641
|
-
$videoSource.type = vidType;
|
|
72642
|
-
$media.insertBefore($videoSource, $media.lastElementChild);
|
|
72643
|
-
}
|
|
72644
|
-
return _context4.abrupt("return", $media);
|
|
72645
|
-
case 6:
|
|
72646
|
-
case "end":
|
|
72647
|
-
return _context4.stop();
|
|
72648
|
-
}
|
|
72649
|
-
}, _callee4);
|
|
72650
|
-
}));
|
|
72651
|
-
return _composeVideoSource.apply(this, arguments);
|
|
72625
|
+
function composeVideoSource($media, media) {
|
|
72626
|
+
// const videoSrc = await preloadMediaBlob(media.url as string, media.mediaType as MediaTypes);
|
|
72627
|
+
var vidType = videoFileType(getFileExt(media.uri));
|
|
72628
|
+
// Only add one source per type
|
|
72629
|
+
if ($media.querySelectorAll("source[type=\"".concat(vidType, "\"]")).length === 0) {
|
|
72630
|
+
var $videoSource = document.createElement('source');
|
|
72631
|
+
$videoSource.src = media.url;
|
|
72632
|
+
$videoSource.type = vidType;
|
|
72633
|
+
$media.insertBefore($videoSource, $media.lastElementChild);
|
|
72634
|
+
}
|
|
72635
|
+
return $media;
|
|
72652
72636
|
}
|
|
72653
72637
|
function VideoMedia(media, xlr) {
|
|
72654
72638
|
return {
|
|
72655
72639
|
init: function init() {
|
|
72656
|
-
var
|
|
72657
|
-
if (
|
|
72658
|
-
var
|
|
72659
|
-
|
|
72660
|
-
|
|
72661
|
-
|
|
72662
|
-
|
|
72663
|
-
|
|
72664
|
-
|
|
72665
|
-
|
|
72666
|
-
|
|
72667
|
-
|
|
72668
|
-
|
|
72669
|
-
|
|
72670
|
-
|
|
72671
|
-
|
|
72672
|
-
|
|
72673
|
-
|
|
72674
|
-
|
|
72675
|
-
|
|
72676
|
-
|
|
72677
|
-
|
|
72678
|
-
|
|
72679
|
-
|
|
72680
|
-
|
|
72681
|
-
|
|
72682
|
-
|
|
72683
|
-
|
|
72684
|
-
|
|
72685
|
-
|
|
72686
|
-
|
|
72687
|
-
|
|
72688
|
-
|
|
72689
|
-
|
|
72690
|
-
|
|
72691
|
-
|
|
72692
|
-
|
|
72693
|
-
|
|
72694
|
-
|
|
72695
|
-
|
|
72696
|
-
|
|
72697
|
-
|
|
72698
|
-
|
|
72699
|
-
|
|
72700
|
-
|
|
72701
|
-
|
|
72702
|
-
|
|
72703
|
-
|
|
72704
|
-
|
|
72705
|
-
vjsPlayer.
|
|
72706
|
-
|
|
72707
|
-
|
|
72708
|
-
|
|
72709
|
-
|
|
72710
|
-
|
|
72711
|
-
|
|
72712
|
-
|
|
72713
|
-
|
|
72714
|
-
|
|
72715
|
-
|
|
72716
|
-
|
|
72717
|
-
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " autoplay error"));
|
|
72718
|
-
if (!(xlr.config.platform === 'chromeOS')) {
|
|
72719
|
-
_context2.next = 4;
|
|
72720
|
-
break;
|
|
72721
|
-
}
|
|
72640
|
+
var vjsPlayer = media.player;
|
|
72641
|
+
if (vjsPlayer !== undefined) {
|
|
72642
|
+
var playerReportFault = /*#__PURE__*/function () {
|
|
72643
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(msg) {
|
|
72644
|
+
var playerSW, hasSW;
|
|
72645
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
72646
|
+
while (1) switch (_context.prev = _context.next) {
|
|
72647
|
+
case 0:
|
|
72648
|
+
// Immediately expire media and report a fault
|
|
72649
|
+
playerSW = PwaSW();
|
|
72650
|
+
_context.next = 3;
|
|
72651
|
+
return playerSW.getSW();
|
|
72652
|
+
case 3:
|
|
72653
|
+
hasSW = _context.sent;
|
|
72654
|
+
if (hasSW) {
|
|
72655
|
+
playerSW.postMsg({
|
|
72656
|
+
type: 'MEDIA_FAULT',
|
|
72657
|
+
code: 5002,
|
|
72658
|
+
reason: msg,
|
|
72659
|
+
mediaId: media.id,
|
|
72660
|
+
regionId: media.region.id,
|
|
72661
|
+
layoutId: media.region.layout.id,
|
|
72662
|
+
date: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
|
72663
|
+
// Temporary setting
|
|
72664
|
+
expires: format(new Date(setExpiry(1)), 'yyyy-MM-dd HH:mm:ss')
|
|
72665
|
+
})["finally"](function () {
|
|
72666
|
+
// Expire the media and dispose the video
|
|
72667
|
+
vjsPlayer.dispose();
|
|
72668
|
+
media.emitter.emit('end', media);
|
|
72669
|
+
});
|
|
72670
|
+
}
|
|
72671
|
+
case 5:
|
|
72672
|
+
case "end":
|
|
72673
|
+
return _context.stop();
|
|
72674
|
+
}
|
|
72675
|
+
}, _callee);
|
|
72676
|
+
}));
|
|
72677
|
+
return function playerReportFault(_x) {
|
|
72678
|
+
return _ref.apply(this, arguments);
|
|
72679
|
+
};
|
|
72680
|
+
}();
|
|
72681
|
+
vjsPlayer.on('loadstart', function () {
|
|
72682
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " has started loading data . . ."));
|
|
72683
|
+
});
|
|
72684
|
+
vjsPlayer.on('canplay', function () {
|
|
72685
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " can be played . . ."));
|
|
72686
|
+
});
|
|
72687
|
+
vjsPlayer.on('ready', function () {
|
|
72688
|
+
vjsPlayer.muted(true);
|
|
72689
|
+
var promise = vjsPlayer.play();
|
|
72690
|
+
if (promise !== undefined) {
|
|
72691
|
+
promise.then(function () {
|
|
72692
|
+
// Autoplay restarted
|
|
72693
|
+
console.debug('autoplay started . . .');
|
|
72694
|
+
})["catch"]( /*#__PURE__*/function () {
|
|
72695
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(error) {
|
|
72696
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
72697
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
72698
|
+
case 0:
|
|
72699
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " autoplay error"));
|
|
72700
|
+
if (!(xlr.config.platform === 'chromeOS')) {
|
|
72722
72701
|
_context2.next = 4;
|
|
72723
|
-
|
|
72724
|
-
|
|
72725
|
-
|
|
72726
|
-
|
|
72727
|
-
|
|
72728
|
-
|
|
72729
|
-
|
|
72730
|
-
|
|
72731
|
-
|
|
72732
|
-
|
|
72733
|
-
|
|
72734
|
-
|
|
72735
|
-
|
|
72736
|
-
|
|
72737
|
-
|
|
72738
|
-
|
|
72739
|
-
|
|
72740
|
-
|
|
72741
|
-
|
|
72742
|
-
|
|
72743
|
-
|
|
72744
|
-
|
|
72745
|
-
|
|
72746
|
-
|
|
72747
|
-
|
|
72748
|
-
|
|
72749
|
-
|
|
72750
|
-
_context3.next =
|
|
72751
|
-
return playerReportFault('Video file source not supported');
|
|
72752
|
-
case 4:
|
|
72753
|
-
_context3.next = 7;
|
|
72702
|
+
break;
|
|
72703
|
+
}
|
|
72704
|
+
_context2.next = 4;
|
|
72705
|
+
return playerReportFault('Media autoplay error');
|
|
72706
|
+
case 4:
|
|
72707
|
+
case "end":
|
|
72708
|
+
return _context2.stop();
|
|
72709
|
+
}
|
|
72710
|
+
}, _callee2);
|
|
72711
|
+
}));
|
|
72712
|
+
return function (_x2) {
|
|
72713
|
+
return _ref2.apply(this, arguments);
|
|
72714
|
+
};
|
|
72715
|
+
}());
|
|
72716
|
+
}
|
|
72717
|
+
});
|
|
72718
|
+
vjsPlayer.on('playing', function () {
|
|
72719
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " is now playing . . ."));
|
|
72720
|
+
vjsPlayer.muted(media.muted);
|
|
72721
|
+
});
|
|
72722
|
+
vjsPlayer.on('error', /*#__PURE__*/function () {
|
|
72723
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err) {
|
|
72724
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
72725
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
72726
|
+
case 0:
|
|
72727
|
+
console.debug("Media Error: ".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id));
|
|
72728
|
+
if (!(xlr.config.platform === 'chromeOS')) {
|
|
72729
|
+
_context3.next = 6;
|
|
72754
72730
|
break;
|
|
72755
|
-
|
|
72756
|
-
|
|
72757
|
-
|
|
72758
|
-
|
|
72759
|
-
|
|
72760
|
-
|
|
72761
|
-
|
|
72762
|
-
|
|
72763
|
-
|
|
72764
|
-
|
|
72765
|
-
|
|
72766
|
-
|
|
72767
|
-
|
|
72768
|
-
|
|
72769
|
-
|
|
72770
|
-
|
|
72771
|
-
|
|
72772
|
-
|
|
72773
|
-
|
|
72774
|
-
|
|
72775
|
-
|
|
72776
|
-
|
|
72777
|
-
|
|
72778
|
-
|
|
72779
|
-
|
|
72780
|
-
|
|
72781
|
-
|
|
72731
|
+
}
|
|
72732
|
+
_context3.next = 4;
|
|
72733
|
+
return playerReportFault('Video file source not supported');
|
|
72734
|
+
case 4:
|
|
72735
|
+
_context3.next = 7;
|
|
72736
|
+
break;
|
|
72737
|
+
case 6:
|
|
72738
|
+
// End media after 5 seconds
|
|
72739
|
+
setTimeout(function () {
|
|
72740
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " has ended . . ."));
|
|
72741
|
+
media.emitter.emit('end', media);
|
|
72742
|
+
vjsPlayer.dispose();
|
|
72743
|
+
}, 5000);
|
|
72744
|
+
case 7:
|
|
72745
|
+
case "end":
|
|
72746
|
+
return _context3.stop();
|
|
72747
|
+
}
|
|
72748
|
+
}, _callee3);
|
|
72749
|
+
}));
|
|
72750
|
+
return function (_x3) {
|
|
72751
|
+
return _ref3.apply(this, arguments);
|
|
72752
|
+
};
|
|
72753
|
+
}());
|
|
72754
|
+
vjsPlayer.on('ended', function () {
|
|
72755
|
+
var _media$emitter;
|
|
72756
|
+
console.debug("VideoMedia: onended: ".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " has ended playing . . ."));
|
|
72757
|
+
(_media$emitter = media.emitter) === null || _media$emitter === void 0 || _media$emitter.emit('end', media);
|
|
72758
|
+
vjsPlayer.dispose();
|
|
72759
|
+
});
|
|
72760
|
+
vjsPlayer.on('durationchange', function () {
|
|
72761
|
+
if (media.duration === 0 && vjsPlayer.duration() !== undefined) {
|
|
72762
|
+
media.duration = vjsPlayer.duration();
|
|
72763
|
+
} else if (media.duration > 0) {
|
|
72764
|
+
vjsPlayer.duration(media.duration);
|
|
72782
72765
|
}
|
|
72783
|
-
|
|
72766
|
+
console.debug('VIDEOJS: ondurationchange: Showing Media ' + media.id + ' for ' + vjsPlayer.duration() + 's of Region ' + media.region.regionId);
|
|
72767
|
+
});
|
|
72784
72768
|
}
|
|
72785
72769
|
}
|
|
72786
72770
|
};
|
|
@@ -72861,10 +72845,11 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
72861
72845
|
mediaTimer = setInterval(function () {
|
|
72862
72846
|
mediaTimeCount++;
|
|
72863
72847
|
if (mediaTimeCount > media.duration) {
|
|
72848
|
+
console.debug('startMediaTimer: emit>end: on media ' + media.id + ' of Region ' + media.region.regionId);
|
|
72864
72849
|
media.emitter.emit('end', media);
|
|
72865
72850
|
}
|
|
72866
72851
|
}, 1000);
|
|
72867
|
-
console.debug('Showing Media ' + media.id + ' for ' + media.duration + 's of Region ' + media.region.regionId);
|
|
72852
|
+
console.debug('startMediaTimer: Showing Media ' + media.id + ' for ' + media.duration + 's of Region ' + media.region.regionId);
|
|
72868
72853
|
};
|
|
72869
72854
|
emitter.on('start', function (media) {
|
|
72870
72855
|
if (media.mediaType === 'video') {
|
|
@@ -73019,8 +73004,11 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73019
73004
|
$media.style.cssText = $media.style.cssText.concat("background-position: ".concat(align, " ").concat(valign));
|
|
73020
73005
|
}
|
|
73021
73006
|
} else if (self.mediaType === 'video') {
|
|
73022
|
-
var $videoMedia = $media;
|
|
73023
|
-
|
|
73007
|
+
var $videoMedia = composeVideoSource($media, self);
|
|
73008
|
+
var isMuted = false;
|
|
73009
|
+
if (Boolean(self.options['mute'])) {
|
|
73010
|
+
isMuted = self.options.mute === '1';
|
|
73011
|
+
}
|
|
73024
73012
|
if (Boolean(self.options['scaletype'])) {
|
|
73025
73013
|
if (self.options.scaletype === 'stretch') {
|
|
73026
73014
|
$videoMedia.style.objectFit = 'fill';
|
|
@@ -73028,8 +73016,10 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73028
73016
|
}
|
|
73029
73017
|
$videoMedia.classList.add('video-js', 'vjs-default-skin');
|
|
73030
73018
|
if (self.loop) {
|
|
73019
|
+
self.loop = true;
|
|
73031
73020
|
$videoMedia.loop = true;
|
|
73032
73021
|
}
|
|
73022
|
+
self.muted = isMuted;
|
|
73033
73023
|
$media = $videoMedia;
|
|
73034
73024
|
} else if (self.mediaType === 'audio') {
|
|
73035
73025
|
var $audioMedia = $media;
|
|
@@ -73132,7 +73122,7 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73132
73122
|
}
|
|
73133
73123
|
var showCurrentMedia = /*#__PURE__*/function () {
|
|
73134
73124
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
73135
|
-
var $mediaId, $media, isCMS
|
|
73125
|
+
var $mediaId, $media, isCMS;
|
|
73136
73126
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
73137
73127
|
while (1) switch (_context2.prev = _context2.next) {
|
|
73138
73128
|
case 0:
|
|
@@ -73143,7 +73133,7 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73143
73133
|
$media = getNewMedia();
|
|
73144
73134
|
}
|
|
73145
73135
|
if (!$media) {
|
|
73146
|
-
_context2.next =
|
|
73136
|
+
_context2.next = 39;
|
|
73147
73137
|
break;
|
|
73148
73138
|
}
|
|
73149
73139
|
$media.style.setProperty('display', 'block');
|
|
@@ -73172,54 +73162,46 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73172
73162
|
_context2.t3 = _context2.t2;
|
|
73173
73163
|
_context2.t4 = _context2.t1.concat.call(_context2.t1, _context2.t3);
|
|
73174
73164
|
_context2.t0.setProperty.call(_context2.t0, 'background-image', _context2.t4);
|
|
73175
|
-
_context2.next =
|
|
73165
|
+
_context2.next = 38;
|
|
73176
73166
|
break;
|
|
73177
73167
|
case 22:
|
|
73178
73168
|
if (!(self.mediaType === 'video' && self.url !== null)) {
|
|
73179
|
-
_context2.next =
|
|
73169
|
+
_context2.next = 26;
|
|
73180
73170
|
break;
|
|
73181
73171
|
}
|
|
73182
|
-
|
|
73183
|
-
|
|
73184
|
-
case 25:
|
|
73185
|
-
$media = _context2.sent;
|
|
73186
|
-
isMuted = false;
|
|
73187
|
-
if (Boolean(self.options['mute'])) {
|
|
73188
|
-
isMuted = self.options.mute === '1';
|
|
73189
|
-
}
|
|
73190
|
-
self.muted = isMuted;
|
|
73191
|
-
videojs($media, {
|
|
73172
|
+
// Initialize video.js
|
|
73173
|
+
self.player = videojs($media, {
|
|
73192
73174
|
controls: false,
|
|
73193
73175
|
preload: 'auto',
|
|
73194
73176
|
autoplay: false,
|
|
73195
|
-
muted:
|
|
73177
|
+
muted: self.muted,
|
|
73196
73178
|
errorDisplay: xlr.config.platform !== 'chromeOS',
|
|
73197
|
-
|
|
73179
|
+
loop: self.loop
|
|
73198
73180
|
});
|
|
73199
|
-
_context2.next =
|
|
73181
|
+
_context2.next = 38;
|
|
73200
73182
|
break;
|
|
73201
|
-
case
|
|
73183
|
+
case 26:
|
|
73202
73184
|
if (!(self.mediaType === 'audio' && self.url !== null)) {
|
|
73203
|
-
_context2.next =
|
|
73185
|
+
_context2.next = 37;
|
|
73204
73186
|
break;
|
|
73205
73187
|
}
|
|
73206
73188
|
if (!isCMS) {
|
|
73207
|
-
_context2.next =
|
|
73189
|
+
_context2.next = 33;
|
|
73208
73190
|
break;
|
|
73209
73191
|
}
|
|
73210
|
-
_context2.next =
|
|
73192
|
+
_context2.next = 30;
|
|
73211
73193
|
return preloadMediaBlob(self.url, self.mediaType);
|
|
73212
|
-
case
|
|
73194
|
+
case 30:
|
|
73213
73195
|
_context2.t5 = _context2.sent;
|
|
73214
|
-
_context2.next =
|
|
73196
|
+
_context2.next = 34;
|
|
73215
73197
|
break;
|
|
73216
|
-
case
|
|
73198
|
+
case 33:
|
|
73217
73199
|
_context2.t5 = self.url;
|
|
73218
|
-
case
|
|
73200
|
+
case 34:
|
|
73219
73201
|
$media.src = _context2.t5;
|
|
73220
|
-
_context2.next =
|
|
73202
|
+
_context2.next = 38;
|
|
73221
73203
|
break;
|
|
73222
|
-
case
|
|
73204
|
+
case 37:
|
|
73223
73205
|
if ((self.render === 'html' || self.mediaType === 'webpage') && self.iframe && self.checkIframeStatus) {
|
|
73224
73206
|
// Set state as false ( for now )
|
|
73225
73207
|
self.ready = false;
|
|
@@ -73235,9 +73217,9 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73235
73217
|
// }
|
|
73236
73218
|
// });
|
|
73237
73219
|
}
|
|
73238
|
-
case
|
|
73220
|
+
case 38:
|
|
73239
73221
|
self.emitter.emit('start', self);
|
|
73240
|
-
case
|
|
73222
|
+
case 39:
|
|
73241
73223
|
case "end":
|
|
73242
73224
|
return _context2.stop();
|
|
73243
73225
|
}
|
|
@@ -73299,6 +73281,9 @@ function Region(layout, xml, regionId, options, xlr) {
|
|
|
73299
73281
|
self.complete = false;
|
|
73300
73282
|
self.ending = false;
|
|
73301
73283
|
self.ended = false;
|
|
73284
|
+
self.curMedia = undefined;
|
|
73285
|
+
self.nxtMedia = undefined;
|
|
73286
|
+
self.currentMediaIndex = 0;
|
|
73302
73287
|
self.id = props.regionId;
|
|
73303
73288
|
self.uniqueId = "".concat(nextId(self.options));
|
|
73304
73289
|
self.options = _objectSpread2(_objectSpread2({}, platform), props.options);
|
|
@@ -73362,7 +73347,7 @@ function Region(layout, xml, regionId, options, xlr) {
|
|
|
73362
73347
|
console.debug('Region::finished called . . . ', self.id);
|
|
73363
73348
|
// Mark as complete
|
|
73364
73349
|
self.complete = true;
|
|
73365
|
-
self.layout.regions[regionObject.index] =
|
|
73350
|
+
self.layout.regions[regionObject.index] = self;
|
|
73366
73351
|
self.layout.regionExpired();
|
|
73367
73352
|
};
|
|
73368
73353
|
regionObject.prepareMediaObjects = function () {
|
|
@@ -73484,7 +73469,7 @@ function Region(layout, xml, regionId, options, xlr) {
|
|
|
73484
73469
|
}
|
|
73485
73470
|
};
|
|
73486
73471
|
regionObject.playNextMedia = function () {
|
|
73487
|
-
var _self$curMedia, _self$curMedia2, _self$curMedia3, _self$curMedia4;
|
|
73472
|
+
var _self$curMedia, _self$curMedia2, _self$curMedia3, _self$curMedia4, _self$curMedia5;
|
|
73488
73473
|
var self = regionObject;
|
|
73489
73474
|
/* The current media has finished running */
|
|
73490
73475
|
if (self.ended) {
|
|
@@ -73504,7 +73489,7 @@ function Region(layout, xml, regionId, options, xlr) {
|
|
|
73504
73489
|
// When the region has completed and mediaObjects.length = 1
|
|
73505
73490
|
// and curMedia.loop = false, then put the media on
|
|
73506
73491
|
// its current state
|
|
73507
|
-
if (self.complete && self.mediaObjects.length === 1 && ((_self$curMedia2 = self.curMedia) === null || _self$curMedia2 === void 0 ? void 0 : _self$curMedia2.render) !== 'html' && ((_self$curMedia3 = self.curMedia) === null || _self$curMedia3 === void 0 ? void 0 : _self$curMedia3.mediaType) === 'image' && !((_self$
|
|
73492
|
+
if (self.complete && self.mediaObjects.length === 1 && ((_self$curMedia2 = self.curMedia) === null || _self$curMedia2 === void 0 ? void 0 : _self$curMedia2.render) !== 'html' && (((_self$curMedia3 = self.curMedia) === null || _self$curMedia3 === void 0 ? void 0 : _self$curMedia3.mediaType) === 'image' || ((_self$curMedia4 = self.curMedia) === null || _self$curMedia4 === void 0 ? void 0 : _self$curMedia4.mediaType) === 'video') && !((_self$curMedia5 = self.curMedia) !== null && _self$curMedia5 !== void 0 && _self$curMedia5.loop)) {
|
|
73508
73493
|
return;
|
|
73509
73494
|
}
|
|
73510
73495
|
self.currentMediaIndex = self.currentMediaIndex + 1;
|
|
@@ -74586,9 +74571,7 @@ function XiboLayoutRenderer(inputLayouts, options) {
|
|
|
74586
74571
|
console.debug('prepareLayouts::xlr>layouts', self.layouts);
|
|
74587
74572
|
return _context3.abrupt("return", new Promise(function (resolve) {
|
|
74588
74573
|
layouts.map(function (layoutItem) {
|
|
74589
|
-
|
|
74590
|
-
self.layouts[layoutItem.index] = layoutItem;
|
|
74591
|
-
}
|
|
74574
|
+
self.layouts[layoutItem.index] = layoutItem;
|
|
74592
74575
|
});
|
|
74593
74576
|
self.currentLayoutIndex = xlrLayouts.currentLayoutIndex;
|
|
74594
74577
|
self.currentLayout = self.layouts[self.currentLayoutIndex];
|