@micromag/element-background 0.3.583 → 0.3.585
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 +24 -8
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -33,7 +33,9 @@ var propTypes$1 = {
|
|
|
33
33
|
shouldLoad: PropTypes.bool,
|
|
34
34
|
onPlayError: PropTypes.func,
|
|
35
35
|
withoutVideo: PropTypes.bool,
|
|
36
|
-
forceMuted: PropTypes.bool
|
|
36
|
+
forceMuted: PropTypes.bool,
|
|
37
|
+
qualityStartLevel: PropTypes.number,
|
|
38
|
+
onQualityLevelChange: PropTypes.func
|
|
37
39
|
};
|
|
38
40
|
var defaultProps$1 = {
|
|
39
41
|
width: null,
|
|
@@ -54,7 +56,9 @@ var defaultProps$1 = {
|
|
|
54
56
|
shouldLoad: true,
|
|
55
57
|
onPlayError: null,
|
|
56
58
|
withoutVideo: false,
|
|
57
|
-
forceMuted: false
|
|
59
|
+
forceMuted: false,
|
|
60
|
+
qualityStartLevel: null,
|
|
61
|
+
onQualityLevelChange: null
|
|
58
62
|
};
|
|
59
63
|
var Background = function Background(_ref) {
|
|
60
64
|
var width = _ref.width,
|
|
@@ -75,7 +79,9 @@ var Background = function Background(_ref) {
|
|
|
75
79
|
shouldLoad = _ref.shouldLoad,
|
|
76
80
|
onPlayError = _ref.onPlayError,
|
|
77
81
|
withoutVideo = _ref.withoutVideo,
|
|
78
|
-
forceMuted = _ref.forceMuted
|
|
82
|
+
forceMuted = _ref.forceMuted,
|
|
83
|
+
qualityStartLevel = _ref.qualityStartLevel,
|
|
84
|
+
onQualityLevelChange = _ref.onQualityLevelChange;
|
|
79
85
|
var _ref2 = media || {},
|
|
80
86
|
_ref2$type = _ref2.type,
|
|
81
87
|
mediaType = _ref2$type === void 0 ? null : _ref2$type,
|
|
@@ -158,7 +164,9 @@ var Background = function Background(_ref) {
|
|
|
158
164
|
autoPlay: true,
|
|
159
165
|
loop: true,
|
|
160
166
|
withPoster: true,
|
|
161
|
-
focusable: false
|
|
167
|
+
focusable: false,
|
|
168
|
+
qualityStartLevel: qualityStartLevel,
|
|
169
|
+
onQualityLevelChange: onQualityLevelChange
|
|
162
170
|
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
163
171
|
className: styles.content
|
|
164
172
|
}, children));
|
|
@@ -185,7 +193,9 @@ var propTypes = {
|
|
|
185
193
|
})]),
|
|
186
194
|
shouldLoad: PropTypes.bool,
|
|
187
195
|
withoutVideo: PropTypes.bool,
|
|
188
|
-
onPlayError: PropTypes.bool
|
|
196
|
+
onPlayError: PropTypes.bool,
|
|
197
|
+
qualityStartLevel: PropTypes.number,
|
|
198
|
+
onQualityLevelChange: PropTypes.func
|
|
189
199
|
};
|
|
190
200
|
var defaultProps = {
|
|
191
201
|
width: null,
|
|
@@ -202,7 +212,9 @@ var defaultProps = {
|
|
|
202
212
|
mediaRef: null,
|
|
203
213
|
shouldLoad: true,
|
|
204
214
|
withoutVideo: false,
|
|
205
|
-
onPlayError: null
|
|
215
|
+
onPlayError: null,
|
|
216
|
+
qualityStartLevel: null,
|
|
217
|
+
onQualityLevelChange: null
|
|
206
218
|
};
|
|
207
219
|
var BackgroundLayers = function BackgroundLayers(_ref) {
|
|
208
220
|
var width = _ref.width,
|
|
@@ -219,7 +231,9 @@ var BackgroundLayers = function BackgroundLayers(_ref) {
|
|
|
219
231
|
mediaRef = _ref.mediaRef,
|
|
220
232
|
shouldLoad = _ref.shouldLoad,
|
|
221
233
|
withoutVideo = _ref.withoutVideo,
|
|
222
|
-
onPlayError = _ref.onPlayError
|
|
234
|
+
onPlayError = _ref.onPlayError,
|
|
235
|
+
qualityStartLevel = _ref.qualityStartLevel,
|
|
236
|
+
onQualityLevelChange = _ref.onQualityLevelChange;
|
|
223
237
|
var hasSize = width > 0 && height > 0;
|
|
224
238
|
var layers = useMemo(function () {
|
|
225
239
|
return getLayersFromBackground(background);
|
|
@@ -264,7 +278,9 @@ var BackgroundLayers = function BackgroundLayers(_ref) {
|
|
|
264
278
|
shouldLoad: shouldLoad,
|
|
265
279
|
mediaRef: mediaRef,
|
|
266
280
|
withoutVideo: withoutVideo,
|
|
267
|
-
onPlayError: onPlayError
|
|
281
|
+
onPlayError: onPlayError,
|
|
282
|
+
qualityStartLevel: qualityStartLevel,
|
|
283
|
+
onQualityLevelChange: onQualityLevelChange
|
|
268
284
|
}, layer)));
|
|
269
285
|
})), /*#__PURE__*/React.createElement("div", {
|
|
270
286
|
className: styles.content
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-background",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.585",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@babel/runtime": "^7.13.10",
|
|
60
60
|
"@folklore/size": "^0.1.20",
|
|
61
|
-
"@micromag/core": "^0.3.
|
|
62
|
-
"@micromag/element-video": "^0.3.
|
|
61
|
+
"@micromag/core": "^0.3.585",
|
|
62
|
+
"@micromag/element-video": "^0.3.585",
|
|
63
63
|
"classnames": "^2.2.6",
|
|
64
64
|
"lodash": "^4.17.21",
|
|
65
65
|
"prop-types": "^15.7.2",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"access": "public",
|
|
71
71
|
"registry": "https://registry.npmjs.org/"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "f8c2902ea472fcb2d1cdd3fe5d6054afd0cc766b"
|
|
74
74
|
}
|