@micromag/screen-video 0.2.407 → 0.2.408
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/es/index.js +4 -2
- package/lib/index.js +4 -2
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -75,6 +75,8 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
75
75
|
isCapture = _useScreenRenderConte.isCapture;
|
|
76
76
|
|
|
77
77
|
var backgroundPlaying = current && (isView || isEdit);
|
|
78
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
79
|
+
var videoShouldLoad = current || active || !isView;
|
|
78
80
|
var apiRef = useRef();
|
|
79
81
|
|
|
80
82
|
var _ref2 = apiRef.current || {},
|
|
@@ -278,7 +280,7 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
278
280
|
onSeeked: onSeeked,
|
|
279
281
|
onVolumeChanged: onVolumeChanged,
|
|
280
282
|
focusable: current && isView,
|
|
281
|
-
preload:
|
|
283
|
+
preload: videoShouldLoad ? 'auto' : 'metadata' // onPosterLoaded={onPosterLoaded}
|
|
282
284
|
|
|
283
285
|
}))) : null), !isPlaceholder ? /*#__PURE__*/React.createElement("div", {
|
|
284
286
|
key: "bottom-content",
|
|
@@ -322,7 +324,7 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
322
324
|
width: width,
|
|
323
325
|
height: height,
|
|
324
326
|
playing: backgroundPlaying,
|
|
325
|
-
shouldLoad:
|
|
327
|
+
shouldLoad: backgroundShouldLoad
|
|
326
328
|
}) : null, /*#__PURE__*/React.createElement(Container, {
|
|
327
329
|
width: width,
|
|
328
330
|
height: height
|
package/lib/index.js
CHANGED
|
@@ -96,6 +96,8 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
96
96
|
isCapture = _useScreenRenderConte.isCapture;
|
|
97
97
|
|
|
98
98
|
var backgroundPlaying = current && (isView || isEdit);
|
|
99
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
100
|
+
var videoShouldLoad = current || active || !isView;
|
|
99
101
|
var apiRef = React.useRef();
|
|
100
102
|
|
|
101
103
|
var _ref2 = apiRef.current || {},
|
|
@@ -299,7 +301,7 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
299
301
|
onSeeked: onSeeked,
|
|
300
302
|
onVolumeChanged: onVolumeChanged,
|
|
301
303
|
focusable: current && isView,
|
|
302
|
-
preload:
|
|
304
|
+
preload: videoShouldLoad ? 'auto' : 'metadata' // onPosterLoaded={onPosterLoaded}
|
|
303
305
|
|
|
304
306
|
}))) : null), !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
305
307
|
key: "bottom-content",
|
|
@@ -343,7 +345,7 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
343
345
|
width: width,
|
|
344
346
|
height: height,
|
|
345
347
|
playing: backgroundPlaying,
|
|
346
|
-
shouldLoad:
|
|
348
|
+
shouldLoad: backgroundShouldLoad
|
|
347
349
|
}) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
348
350
|
width: width,
|
|
349
351
|
height: height
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-video",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.408",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "4bc2ba99622adef74bd0da42cb52d1a575c1a544"
|
|
72
72
|
}
|