@xibosignage/xibo-layout-renderer 1.0.1 → 1.0.2

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.
@@ -13,6 +13,7 @@ export declare function getFileExt(filename: string): string;
13
13
  export declare function audioFileType(str: string): string | undefined;
14
14
  export declare function composeResourceUrlByPlatform(options: OptionsType, params: any): string;
15
15
  export declare function composeResourceUrl(options: OptionsType, params: any): string;
16
+ export declare function composeVideoUrl(params: any): string;
16
17
  export declare function composeBgUrlByPlatform(platform: OptionsType['platform'], params: any): string;
17
18
  type LayoutIndexType = {
18
19
  [k: string]: InputLayoutType & {
@@ -716,6 +716,9 @@ function composeResourceUrl(options, params) {
716
716
  var serverKey = options && ((_options$config3 = options.config) === null || _options$config3 === void 0 ? void 0 : _options$config3.cmsKey);
717
717
  return '/pwa/getResource' + '?v=' + schemaVersion + '&serverKey=' + serverKey + '&hardwareKey=' + hardwareKey + '&layoutId=' + params.layoutId + '&regionId=' + params.regionId + '&mediaId=' + params.mediaId;
718
718
  }
719
+ function composeVideoUrl(params) {
720
+ return '/xmds.php?file=' + params.uri;
721
+ }
719
722
  function composeBgUrlByPlatform(platform, params) {
720
723
  var bgImageUrl = params.layoutBackgroundDownloadUrl.replace(":id", params.layout.id) + '?preview=1&width=' + params.layout.sWidth + '&height=' + params.layout.sHeight + '&dynamic&proportional=0';
721
724
  if (platform === 'chromeOS') {
@@ -1289,6 +1292,9 @@ function Media(region, mediaId, xml, options, xlr) {
1289
1292
  tmpUrl = composeResourceUrlByPlatform(xlr.config, resourceUrlParams);
1290
1293
  } else if (xlr.config.platform === 'chromeOS') {
1291
1294
  tmpUrl = composeResourceUrl(xlr.config, resourceUrlParams);
1295
+ if (self.mediaType === 'video') {
1296
+ tmpUrl = composeVideoUrl(resourceUrlParams);
1297
+ }
1292
1298
  }
1293
1299
  self.url = tmpUrl;
1294
1300
  // Loop if media has loop, or if region has loop and a single media
@@ -2074,7 +2080,9 @@ function Layout(data, options, xlr, layout) {
2074
2080
  $screen && $screen.appendChild($layout);
2075
2081
  if ($layout) {
2076
2082
  $layout.style.display = 'none';
2077
- $layout.style.outline = 'red solid thin';
2083
+ if (xlr.config.platform === 'CMS') {
2084
+ $layout.style.outline = 'red solid thin';
2085
+ }
2078
2086
  }
2079
2087
  layout.layoutNode = props.data;
2080
2088
  /* Calculate the screen size */