@xibosignage/xibo-layout-renderer 1.0.12 → 1.0.13
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 +1 -1
- package/dist/src/Types/Media/Media.types.d.ts +2 -0
- package/dist/xibo-layout-renderer.cjs.js +172 -188
- 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 +172 -188
- package/dist/xibo-layout-renderer.esm.js.map +1 -1
- package/dist/xibo-layout-renderer.js +172 -188
- 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,6 +1,6 @@
|
|
|
1
1
|
import { IMedia } from '../../Types/Media';
|
|
2
2
|
import { IXlr } from '../../types';
|
|
3
|
-
export declare function composeVideoSource($media: HTMLVideoElement, media: IMedia):
|
|
3
|
+
export declare function composeVideoSource($media: HTMLVideoElement, media: IMedia): HTMLVideoElement;
|
|
4
4
|
export default function VideoMedia(media: IMedia, xlr: IXlr): {
|
|
5
5
|
init: () => void;
|
|
6
6
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Emitter, Unsubscribe } from 'nanoevents';
|
|
2
|
+
import Player from "video.js/dist/types/player";
|
|
2
3
|
import { IMediaEvents } from '../../Modules/Media/Media';
|
|
3
4
|
import { IRegion } from '../Region';
|
|
4
5
|
import { OptionsType } from '../Layout';
|
|
@@ -43,5 +44,6 @@ export interface IMedia {
|
|
|
43
44
|
emitter: Emitter<IMediaEvents>;
|
|
44
45
|
enableStat: boolean;
|
|
45
46
|
muted?: boolean;
|
|
47
|
+
player?: Player;
|
|
46
48
|
}
|
|
47
49
|
export declare const initialMedia: IMedia;
|
|
@@ -69562,7 +69562,8 @@ var initialMedia = {
|
|
|
69562
69562
|
},
|
|
69563
69563
|
emitter: {},
|
|
69564
69564
|
enableStat: false,
|
|
69565
|
-
muted: false
|
|
69565
|
+
muted: false,
|
|
69566
|
+
player: undefined
|
|
69566
69567
|
};
|
|
69567
69568
|
|
|
69568
69569
|
/*
|
|
@@ -72625,166 +72626,149 @@ function PwaSW() {
|
|
|
72625
72626
|
};
|
|
72626
72627
|
}
|
|
72627
72628
|
|
|
72628
|
-
function composeVideoSource(
|
|
72629
|
-
|
|
72630
|
-
|
|
72631
|
-
|
|
72632
|
-
|
|
72633
|
-
var
|
|
72634
|
-
|
|
72635
|
-
|
|
72636
|
-
|
|
72637
|
-
|
|
72638
|
-
|
|
72639
|
-
case 2:
|
|
72640
|
-
videoSrc = _context4.sent;
|
|
72641
|
-
vidType = videoFileType(getFileExt(media.uri)); // Only add one source per type
|
|
72642
|
-
if ($media.querySelectorAll("source[type=\"".concat(vidType, "\"]")).length === 0) {
|
|
72643
|
-
$videoSource = document.createElement('source');
|
|
72644
|
-
$videoSource.src = videoSrc;
|
|
72645
|
-
$videoSource.type = vidType;
|
|
72646
|
-
$media.insertBefore($videoSource, $media.lastElementChild);
|
|
72647
|
-
}
|
|
72648
|
-
return _context4.abrupt("return", $media);
|
|
72649
|
-
case 6:
|
|
72650
|
-
case "end":
|
|
72651
|
-
return _context4.stop();
|
|
72652
|
-
}
|
|
72653
|
-
}, _callee4);
|
|
72654
|
-
}));
|
|
72655
|
-
return _composeVideoSource.apply(this, arguments);
|
|
72629
|
+
function composeVideoSource($media, media) {
|
|
72630
|
+
// const videoSrc = await preloadMediaBlob(media.url as string, media.mediaType as MediaTypes);
|
|
72631
|
+
var vidType = videoFileType(getFileExt(media.uri));
|
|
72632
|
+
// Only add one source per type
|
|
72633
|
+
if ($media.querySelectorAll("source[type=\"".concat(vidType, "\"]")).length === 0) {
|
|
72634
|
+
var $videoSource = document.createElement('source');
|
|
72635
|
+
$videoSource.src = media.url;
|
|
72636
|
+
$videoSource.type = vidType;
|
|
72637
|
+
$media.insertBefore($videoSource, $media.lastElementChild);
|
|
72638
|
+
}
|
|
72639
|
+
return $media;
|
|
72656
72640
|
}
|
|
72657
72641
|
function VideoMedia(media, xlr) {
|
|
72658
72642
|
return {
|
|
72659
72643
|
init: function init() {
|
|
72660
|
-
var
|
|
72661
|
-
if (
|
|
72662
|
-
var
|
|
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
|
-
|
|
72706
|
-
|
|
72707
|
-
|
|
72708
|
-
|
|
72709
|
-
vjsPlayer.
|
|
72710
|
-
|
|
72711
|
-
|
|
72712
|
-
|
|
72713
|
-
|
|
72714
|
-
|
|
72715
|
-
|
|
72716
|
-
|
|
72717
|
-
|
|
72718
|
-
|
|
72719
|
-
|
|
72720
|
-
|
|
72721
|
-
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " autoplay error"));
|
|
72722
|
-
if (!(xlr.config.platform === 'chromeOS')) {
|
|
72723
|
-
_context2.next = 4;
|
|
72724
|
-
break;
|
|
72725
|
-
}
|
|
72644
|
+
var vjsPlayer = media.player;
|
|
72645
|
+
if (vjsPlayer !== undefined) {
|
|
72646
|
+
var playerReportFault = /*#__PURE__*/function () {
|
|
72647
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(msg) {
|
|
72648
|
+
var playerSW, hasSW;
|
|
72649
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
72650
|
+
while (1) switch (_context.prev = _context.next) {
|
|
72651
|
+
case 0:
|
|
72652
|
+
// Immediately expire media and report a fault
|
|
72653
|
+
playerSW = PwaSW();
|
|
72654
|
+
_context.next = 3;
|
|
72655
|
+
return playerSW.getSW();
|
|
72656
|
+
case 3:
|
|
72657
|
+
hasSW = _context.sent;
|
|
72658
|
+
if (hasSW) {
|
|
72659
|
+
playerSW.postMsg({
|
|
72660
|
+
type: 'MEDIA_FAULT',
|
|
72661
|
+
code: 5002,
|
|
72662
|
+
reason: msg,
|
|
72663
|
+
mediaId: media.id,
|
|
72664
|
+
regionId: media.region.id,
|
|
72665
|
+
layoutId: media.region.layout.id,
|
|
72666
|
+
date: format(new Date(), 'yyyy-MM-dd HH:mm:ss'),
|
|
72667
|
+
// Temporary setting
|
|
72668
|
+
expires: format(new Date(setExpiry(1)), 'yyyy-MM-dd HH:mm:ss')
|
|
72669
|
+
})["finally"](function () {
|
|
72670
|
+
// Expire the media and dispose the video
|
|
72671
|
+
vjsPlayer.dispose();
|
|
72672
|
+
media.emitter.emit('end', media);
|
|
72673
|
+
});
|
|
72674
|
+
}
|
|
72675
|
+
case 5:
|
|
72676
|
+
case "end":
|
|
72677
|
+
return _context.stop();
|
|
72678
|
+
}
|
|
72679
|
+
}, _callee);
|
|
72680
|
+
}));
|
|
72681
|
+
return function playerReportFault(_x) {
|
|
72682
|
+
return _ref.apply(this, arguments);
|
|
72683
|
+
};
|
|
72684
|
+
}();
|
|
72685
|
+
vjsPlayer.on('loadstart', function () {
|
|
72686
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " has started loading data . . ."));
|
|
72687
|
+
});
|
|
72688
|
+
vjsPlayer.on('canplay', function () {
|
|
72689
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " can be played . . ."));
|
|
72690
|
+
});
|
|
72691
|
+
vjsPlayer.on('ready', function () {
|
|
72692
|
+
vjsPlayer.muted(true);
|
|
72693
|
+
var promise = vjsPlayer.play();
|
|
72694
|
+
if (promise !== undefined) {
|
|
72695
|
+
promise.then(function () {
|
|
72696
|
+
// Autoplay restarted
|
|
72697
|
+
console.debug('autoplay started . . .');
|
|
72698
|
+
})["catch"]( /*#__PURE__*/function () {
|
|
72699
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(error) {
|
|
72700
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
72701
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
72702
|
+
case 0:
|
|
72703
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " autoplay error"));
|
|
72704
|
+
if (!(xlr.config.platform === 'chromeOS')) {
|
|
72726
72705
|
_context2.next = 4;
|
|
72727
|
-
|
|
72728
|
-
|
|
72729
|
-
|
|
72730
|
-
|
|
72731
|
-
|
|
72732
|
-
|
|
72733
|
-
|
|
72734
|
-
|
|
72735
|
-
|
|
72736
|
-
|
|
72737
|
-
|
|
72738
|
-
|
|
72739
|
-
|
|
72740
|
-
|
|
72741
|
-
|
|
72742
|
-
|
|
72743
|
-
|
|
72744
|
-
|
|
72745
|
-
|
|
72746
|
-
|
|
72747
|
-
|
|
72748
|
-
|
|
72749
|
-
|
|
72750
|
-
|
|
72751
|
-
|
|
72752
|
-
|
|
72753
|
-
|
|
72754
|
-
_context3.next =
|
|
72755
|
-
return playerReportFault('Video file source not supported');
|
|
72756
|
-
case 4:
|
|
72757
|
-
_context3.next = 7;
|
|
72706
|
+
break;
|
|
72707
|
+
}
|
|
72708
|
+
_context2.next = 4;
|
|
72709
|
+
return playerReportFault('Media autoplay error');
|
|
72710
|
+
case 4:
|
|
72711
|
+
case "end":
|
|
72712
|
+
return _context2.stop();
|
|
72713
|
+
}
|
|
72714
|
+
}, _callee2);
|
|
72715
|
+
}));
|
|
72716
|
+
return function (_x2) {
|
|
72717
|
+
return _ref2.apply(this, arguments);
|
|
72718
|
+
};
|
|
72719
|
+
}());
|
|
72720
|
+
}
|
|
72721
|
+
});
|
|
72722
|
+
vjsPlayer.on('playing', function () {
|
|
72723
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " is now playing . . ."));
|
|
72724
|
+
vjsPlayer.muted(media.muted);
|
|
72725
|
+
});
|
|
72726
|
+
vjsPlayer.on('error', /*#__PURE__*/function () {
|
|
72727
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err) {
|
|
72728
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
72729
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
72730
|
+
case 0:
|
|
72731
|
+
console.debug("Media Error: ".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id));
|
|
72732
|
+
if (!(xlr.config.platform === 'chromeOS')) {
|
|
72733
|
+
_context3.next = 6;
|
|
72758
72734
|
break;
|
|
72759
|
-
|
|
72760
|
-
|
|
72761
|
-
|
|
72762
|
-
|
|
72763
|
-
|
|
72764
|
-
|
|
72765
|
-
|
|
72766
|
-
|
|
72767
|
-
|
|
72768
|
-
|
|
72769
|
-
|
|
72770
|
-
|
|
72771
|
-
|
|
72772
|
-
|
|
72773
|
-
|
|
72774
|
-
|
|
72775
|
-
|
|
72776
|
-
|
|
72777
|
-
|
|
72778
|
-
|
|
72779
|
-
|
|
72780
|
-
|
|
72781
|
-
|
|
72782
|
-
|
|
72783
|
-
|
|
72784
|
-
|
|
72785
|
-
|
|
72735
|
+
}
|
|
72736
|
+
_context3.next = 4;
|
|
72737
|
+
return playerReportFault('Video file source not supported');
|
|
72738
|
+
case 4:
|
|
72739
|
+
_context3.next = 7;
|
|
72740
|
+
break;
|
|
72741
|
+
case 6:
|
|
72742
|
+
// End media after 5 seconds
|
|
72743
|
+
setTimeout(function () {
|
|
72744
|
+
console.debug("".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " has ended . . ."));
|
|
72745
|
+
media.emitter.emit('end', media);
|
|
72746
|
+
vjsPlayer.dispose();
|
|
72747
|
+
}, 5000);
|
|
72748
|
+
case 7:
|
|
72749
|
+
case "end":
|
|
72750
|
+
return _context3.stop();
|
|
72751
|
+
}
|
|
72752
|
+
}, _callee3);
|
|
72753
|
+
}));
|
|
72754
|
+
return function (_x3) {
|
|
72755
|
+
return _ref3.apply(this, arguments);
|
|
72756
|
+
};
|
|
72757
|
+
}());
|
|
72758
|
+
vjsPlayer.on('ended', function () {
|
|
72759
|
+
var _media$emitter;
|
|
72760
|
+
console.debug("VideoMedia: onended: ".concat(capitalizeStr(media.mediaType), " for media > ").concat(media.id, " has ended playing . . ."));
|
|
72761
|
+
(_media$emitter = media.emitter) === null || _media$emitter === void 0 || _media$emitter.emit('end', media);
|
|
72762
|
+
vjsPlayer.dispose();
|
|
72763
|
+
});
|
|
72764
|
+
vjsPlayer.on('durationchange', function () {
|
|
72765
|
+
if (media.duration === 0 && vjsPlayer.duration() !== undefined) {
|
|
72766
|
+
media.duration = vjsPlayer.duration();
|
|
72767
|
+
} else if (media.duration > 0) {
|
|
72768
|
+
vjsPlayer.duration(media.duration);
|
|
72786
72769
|
}
|
|
72787
|
-
|
|
72770
|
+
console.debug('VIDEOJS: ondurationchange: Showing Media ' + media.id + ' for ' + vjsPlayer.duration() + 's of Region ' + media.region.regionId);
|
|
72771
|
+
});
|
|
72788
72772
|
}
|
|
72789
72773
|
}
|
|
72790
72774
|
};
|
|
@@ -72865,10 +72849,11 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
72865
72849
|
mediaTimer = setInterval(function () {
|
|
72866
72850
|
mediaTimeCount++;
|
|
72867
72851
|
if (mediaTimeCount > media.duration) {
|
|
72852
|
+
console.debug('startMediaTimer: emit>end: on media ' + media.id + ' of Region ' + media.region.regionId);
|
|
72868
72853
|
media.emitter.emit('end', media);
|
|
72869
72854
|
}
|
|
72870
72855
|
}, 1000);
|
|
72871
|
-
console.debug('Showing Media ' + media.id + ' for ' + media.duration + 's of Region ' + media.region.regionId);
|
|
72856
|
+
console.debug('startMediaTimer: Showing Media ' + media.id + ' for ' + media.duration + 's of Region ' + media.region.regionId);
|
|
72872
72857
|
};
|
|
72873
72858
|
emitter.on('start', function (media) {
|
|
72874
72859
|
if (media.mediaType === 'video') {
|
|
@@ -73023,8 +73008,11 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73023
73008
|
$media.style.cssText = $media.style.cssText.concat("background-position: ".concat(align, " ").concat(valign));
|
|
73024
73009
|
}
|
|
73025
73010
|
} else if (self.mediaType === 'video') {
|
|
73026
|
-
var $videoMedia = $media;
|
|
73027
|
-
|
|
73011
|
+
var $videoMedia = composeVideoSource($media, self);
|
|
73012
|
+
var isMuted = false;
|
|
73013
|
+
if (Boolean(self.options['mute'])) {
|
|
73014
|
+
isMuted = self.options.mute === '1';
|
|
73015
|
+
}
|
|
73028
73016
|
if (Boolean(self.options['scaletype'])) {
|
|
73029
73017
|
if (self.options.scaletype === 'stretch') {
|
|
73030
73018
|
$videoMedia.style.objectFit = 'fill';
|
|
@@ -73032,8 +73020,10 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73032
73020
|
}
|
|
73033
73021
|
$videoMedia.classList.add('video-js', 'vjs-default-skin');
|
|
73034
73022
|
if (self.loop) {
|
|
73023
|
+
self.loop = true;
|
|
73035
73024
|
$videoMedia.loop = true;
|
|
73036
73025
|
}
|
|
73026
|
+
self.muted = isMuted;
|
|
73037
73027
|
$media = $videoMedia;
|
|
73038
73028
|
} else if (self.mediaType === 'audio') {
|
|
73039
73029
|
var $audioMedia = $media;
|
|
@@ -73136,7 +73126,7 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73136
73126
|
}
|
|
73137
73127
|
var showCurrentMedia = /*#__PURE__*/function () {
|
|
73138
73128
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
73139
|
-
var $mediaId, $media, isCMS
|
|
73129
|
+
var $mediaId, $media, isCMS;
|
|
73140
73130
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
73141
73131
|
while (1) switch (_context2.prev = _context2.next) {
|
|
73142
73132
|
case 0:
|
|
@@ -73147,7 +73137,7 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73147
73137
|
$media = getNewMedia();
|
|
73148
73138
|
}
|
|
73149
73139
|
if (!$media) {
|
|
73150
|
-
_context2.next =
|
|
73140
|
+
_context2.next = 40;
|
|
73151
73141
|
break;
|
|
73152
73142
|
}
|
|
73153
73143
|
$media.style.setProperty('display', 'block');
|
|
@@ -73176,54 +73166,48 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73176
73166
|
_context2.t3 = _context2.t2;
|
|
73177
73167
|
_context2.t4 = _context2.t1.concat.call(_context2.t1, _context2.t3);
|
|
73178
73168
|
_context2.t0.setProperty.call(_context2.t0, 'background-image', _context2.t4);
|
|
73179
|
-
_context2.next =
|
|
73169
|
+
_context2.next = 39;
|
|
73180
73170
|
break;
|
|
73181
73171
|
case 22:
|
|
73182
73172
|
if (!(self.mediaType === 'video' && self.url !== null)) {
|
|
73183
|
-
_context2.next =
|
|
73173
|
+
_context2.next = 27;
|
|
73184
73174
|
break;
|
|
73185
73175
|
}
|
|
73186
|
-
|
|
73187
|
-
return composeVideoSource($media, self);
|
|
73188
|
-
case 25:
|
|
73189
|
-
$media = _context2.sent;
|
|
73190
|
-
isMuted = false;
|
|
73191
|
-
if (Boolean(self.options['mute'])) {
|
|
73192
|
-
isMuted = self.options.mute === '1';
|
|
73193
|
-
}
|
|
73194
|
-
self.muted = isMuted;
|
|
73176
|
+
// Initialize video.js
|
|
73195
73177
|
videojs($media, {
|
|
73196
73178
|
controls: false,
|
|
73197
73179
|
preload: 'auto',
|
|
73198
73180
|
autoplay: false,
|
|
73199
|
-
muted:
|
|
73181
|
+
muted: self.muted,
|
|
73200
73182
|
errorDisplay: xlr.config.platform !== 'chromeOS',
|
|
73201
|
-
restoreEl: $media
|
|
73183
|
+
restoreEl: $media,
|
|
73184
|
+
loop: self.loop
|
|
73202
73185
|
});
|
|
73203
|
-
|
|
73186
|
+
self.player = videojs($media);
|
|
73187
|
+
_context2.next = 39;
|
|
73204
73188
|
break;
|
|
73205
|
-
case
|
|
73189
|
+
case 27:
|
|
73206
73190
|
if (!(self.mediaType === 'audio' && self.url !== null)) {
|
|
73207
|
-
_context2.next =
|
|
73191
|
+
_context2.next = 38;
|
|
73208
73192
|
break;
|
|
73209
73193
|
}
|
|
73210
73194
|
if (!isCMS) {
|
|
73211
|
-
_context2.next =
|
|
73195
|
+
_context2.next = 34;
|
|
73212
73196
|
break;
|
|
73213
73197
|
}
|
|
73214
|
-
_context2.next =
|
|
73198
|
+
_context2.next = 31;
|
|
73215
73199
|
return preloadMediaBlob(self.url, self.mediaType);
|
|
73216
|
-
case
|
|
73200
|
+
case 31:
|
|
73217
73201
|
_context2.t5 = _context2.sent;
|
|
73218
|
-
_context2.next =
|
|
73202
|
+
_context2.next = 35;
|
|
73219
73203
|
break;
|
|
73220
|
-
case
|
|
73204
|
+
case 34:
|
|
73221
73205
|
_context2.t5 = self.url;
|
|
73222
|
-
case
|
|
73206
|
+
case 35:
|
|
73223
73207
|
$media.src = _context2.t5;
|
|
73224
|
-
_context2.next =
|
|
73208
|
+
_context2.next = 39;
|
|
73225
73209
|
break;
|
|
73226
|
-
case
|
|
73210
|
+
case 38:
|
|
73227
73211
|
if ((self.render === 'html' || self.mediaType === 'webpage') && self.iframe && self.checkIframeStatus) {
|
|
73228
73212
|
// Set state as false ( for now )
|
|
73229
73213
|
self.ready = false;
|
|
@@ -73239,9 +73223,9 @@ function Media(region, mediaId, xml, options, xlr) {
|
|
|
73239
73223
|
// }
|
|
73240
73224
|
// });
|
|
73241
73225
|
}
|
|
73242
|
-
case
|
|
73226
|
+
case 39:
|
|
73243
73227
|
self.emitter.emit('start', self);
|
|
73244
|
-
case
|
|
73228
|
+
case 40:
|
|
73245
73229
|
case "end":
|
|
73246
73230
|
return _context2.stop();
|
|
73247
73231
|
}
|
|
@@ -73366,7 +73350,7 @@ function Region(layout, xml, regionId, options, xlr) {
|
|
|
73366
73350
|
console.debug('Region::finished called . . . ', self.id);
|
|
73367
73351
|
// Mark as complete
|
|
73368
73352
|
self.complete = true;
|
|
73369
|
-
self.layout.regions[regionObject.index] =
|
|
73353
|
+
self.layout.regions[regionObject.index] = self;
|
|
73370
73354
|
self.layout.regionExpired();
|
|
73371
73355
|
};
|
|
73372
73356
|
regionObject.prepareMediaObjects = function () {
|
|
@@ -73488,7 +73472,7 @@ function Region(layout, xml, regionId, options, xlr) {
|
|
|
73488
73472
|
}
|
|
73489
73473
|
};
|
|
73490
73474
|
regionObject.playNextMedia = function () {
|
|
73491
|
-
var _self$curMedia, _self$curMedia2, _self$curMedia3, _self$curMedia4;
|
|
73475
|
+
var _self$curMedia, _self$curMedia2, _self$curMedia3, _self$curMedia4, _self$curMedia5;
|
|
73492
73476
|
var self = regionObject;
|
|
73493
73477
|
/* The current media has finished running */
|
|
73494
73478
|
if (self.ended) {
|
|
@@ -73508,7 +73492,7 @@ function Region(layout, xml, regionId, options, xlr) {
|
|
|
73508
73492
|
// When the region has completed and mediaObjects.length = 1
|
|
73509
73493
|
// and curMedia.loop = false, then put the media on
|
|
73510
73494
|
// its current state
|
|
73511
|
-
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$
|
|
73495
|
+
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)) {
|
|
73512
73496
|
return;
|
|
73513
73497
|
}
|
|
73514
73498
|
self.currentMediaIndex = self.currentMediaIndex + 1;
|