box-content-preview 3.48.0 → 3.49.0
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/README.md +7 -7
- package/dist/lib/index.js +16 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[](https://mergify.io)
|
|
3
3
|
[](https://github.com/prettier/prettier)
|
|
4
4
|
[](https://travis-ci.org/box/box-content-preview)
|
|
5
|
-
[](https://github.com/box/box-content-preview)
|
|
6
6
|
[](https://www.npmjs.com/package/box-ui-elements)
|
|
7
7
|
|
|
8
8
|
# [Box Content Preview](https://developer.box.com/docs/box-content-preview)
|
|
@@ -22,11 +22,11 @@ We encourage all users to update their applications to utilize modern browsers f
|
|
|
22
22
|
|
|
23
23
|
## Current Version
|
|
24
24
|
|
|
25
|
-
- Version: v3.
|
|
25
|
+
- Version: v3.49.0
|
|
26
26
|
- Locale: en-US
|
|
27
27
|
|
|
28
|
-
https://cdn01.boxcdn.net/platform/preview/3.
|
|
29
|
-
https://cdn01.boxcdn.net/platform/preview/3.
|
|
28
|
+
https://cdn01.boxcdn.net/platform/preview/3.49.0/en-US/preview.js
|
|
29
|
+
https://cdn01.boxcdn.net/platform/preview/3.49.0/en-US/preview.css
|
|
30
30
|
|
|
31
31
|
## Supported Locales
|
|
32
32
|
|
|
@@ -52,10 +52,10 @@ You can self-host the Box Content Preview library or reference the versions avai
|
|
|
52
52
|
<title>Box Content Preview Demo</title>
|
|
53
53
|
|
|
54
54
|
<!-- Latest version of Preview SDK for your locale -->
|
|
55
|
-
<script src="https://cdn01.boxcdn.net/platform/preview/3.
|
|
55
|
+
<script src="https://cdn01.boxcdn.net/platform/preview/3.49.0/en-US/preview.js"></script>
|
|
56
56
|
<link
|
|
57
57
|
rel="stylesheet"
|
|
58
|
-
href="https://cdn01.boxcdn.net/platform/preview/3.
|
|
58
|
+
href="https://cdn01.boxcdn.net/platform/preview/3.49.0/en-US/preview.css"
|
|
59
59
|
/>
|
|
60
60
|
</head>
|
|
61
61
|
<body>
|
|
@@ -76,7 +76,7 @@ To self-host the Box Content Preview library, follow these steps:
|
|
|
76
76
|
|
|
77
77
|
1. Either fork the repo and check out the version you want to host or download the specific version as a zip:
|
|
78
78
|
|
|
79
|
-
- Check out a specific version with `git checkout v3.
|
|
79
|
+
- Check out a specific version with `git checkout v3.49.0`
|
|
80
80
|
- Download a specific version as a zip from https://github.com/box/box-content-preview/releases
|
|
81
81
|
|
|
82
82
|
2. Install dependencies and build the library with `yarn install && yarn build:i18n && yarn build:prod`
|
package/dist/lib/index.js
CHANGED
|
@@ -9340,7 +9340,7 @@ function util_toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var
|
|
|
9340
9340
|
const CLIENT_NAME = "box-content-preview"; // eslint-disable-line no-undef
|
|
9341
9341
|
const CLIENT_NAME_KEY = 'box_client_name';
|
|
9342
9342
|
const CLIENT_VERSION_KEY = 'box_client_version';
|
|
9343
|
-
const CLIENT_VERSION = "3.
|
|
9343
|
+
const CLIENT_VERSION = "3.49.0"; // eslint-disable-line no-undef
|
|
9344
9344
|
const HEADER_CLIENT_NAME = 'X-Box-Client-Name';
|
|
9345
9345
|
const HEADER_CLIENT_VERSION = 'X-Box-Client-Version';
|
|
9346
9346
|
const PROMISE_MAP = {};
|
|
@@ -11058,7 +11058,7 @@ class Browser {
|
|
|
11058
11058
|
;// ./src/lib/Logger.js
|
|
11059
11059
|
/* eslint-disable no-undef */
|
|
11060
11060
|
const Logger_CLIENT_NAME = "box-content-preview";
|
|
11061
|
-
const Logger_CLIENT_VERSION = "3.
|
|
11061
|
+
const Logger_CLIENT_VERSION = "3.49.0";
|
|
11062
11062
|
/* eslint-enable no-undef */
|
|
11063
11063
|
|
|
11064
11064
|
class Logger {
|
|
@@ -26909,14 +26909,20 @@ class VideoBaseViewer extends media_MediaBaseViewer {
|
|
|
26909
26909
|
this.mediaEl.style.width = `${viewport.height * this.aspect}px`;
|
|
26910
26910
|
}
|
|
26911
26911
|
}
|
|
26912
|
-
if (this.
|
|
26913
|
-
|
|
26914
|
-
|
|
26915
|
-
|
|
26916
|
-
this.
|
|
26917
|
-
this.preloader
|
|
26918
|
-
|
|
26919
|
-
|
|
26912
|
+
if (this.mediaContainerEl && this.mediaEl.style.width) {
|
|
26913
|
+
this.mediaContainerEl.style.width = this.mediaEl.style.width;
|
|
26914
|
+
}
|
|
26915
|
+
if (this.featureEnabled('videoPlayerV2.enabled')) {
|
|
26916
|
+
this.mediaContainerEl.style.width = '';
|
|
26917
|
+
if (this.preloader?.wrapperEl && this.mediaEl.style.width) {
|
|
26918
|
+
const videoWidth = parseInt(this.mediaEl.style.width, 10);
|
|
26919
|
+
const videoHeight = videoWidth / this.aspect;
|
|
26920
|
+
this.preloader.wrapperEl.style.width = `${videoWidth}px`;
|
|
26921
|
+
this.preloader.wrapperEl.style.height = `${videoHeight}px`;
|
|
26922
|
+
this.preloader.wrapperEl.style.left = '50%';
|
|
26923
|
+
this.preloader.wrapperEl.style.top = '50%';
|
|
26924
|
+
this.preloader.wrapperEl.style.transform = 'translate(-50%, -50%)';
|
|
26925
|
+
}
|
|
26920
26926
|
}
|
|
26921
26927
|
}
|
|
26922
26928
|
|