@micromag/element-video 0.3.120 → 0.3.124
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 +8 -5
- package/lib/index.js +8 -5
- package/package.json +5 -5
package/es/index.js
CHANGED
|
@@ -38,7 +38,8 @@ var propTypes = {
|
|
|
38
38
|
onDurationChanged: PropTypes$1.func,
|
|
39
39
|
onVolumeChanged: PropTypes$1.func,
|
|
40
40
|
focusable: PropTypes$1.bool,
|
|
41
|
-
supportedMimes: PropTypes$1.arrayOf(PropTypes$1.string)
|
|
41
|
+
supportedMimes: PropTypes$1.arrayOf(PropTypes$1.string),
|
|
42
|
+
withPoster: PropTypes$1.bool // onPosterLoaded: PropTypes.func,
|
|
42
43
|
|
|
43
44
|
};
|
|
44
45
|
var defaultProps = {
|
|
@@ -65,7 +66,8 @@ var defaultProps = {
|
|
|
65
66
|
onDurationChanged: null,
|
|
66
67
|
onVolumeChanged: null,
|
|
67
68
|
focusable: true,
|
|
68
|
-
supportedMimes: ['video/mp4', 'video/webm', 'video/ogg']
|
|
69
|
+
supportedMimes: ['video/mp4', 'video/webm', 'video/ogg'],
|
|
70
|
+
withPoster: false // onPosterLoaded: null,
|
|
69
71
|
|
|
70
72
|
};
|
|
71
73
|
|
|
@@ -95,7 +97,8 @@ var Video = function Video(_ref) {
|
|
|
95
97
|
onDurationChanged = _ref.onDurationChanged,
|
|
96
98
|
onVolumeChanged = _ref.onVolumeChanged,
|
|
97
99
|
focusable = _ref.focusable,
|
|
98
|
-
supportedMimes = _ref.supportedMimes
|
|
100
|
+
supportedMimes = _ref.supportedMimes,
|
|
101
|
+
withPoster = _ref.withPoster;
|
|
99
102
|
|
|
100
103
|
var _ref2 = media || {},
|
|
101
104
|
_ref2$url = _ref2.url,
|
|
@@ -240,12 +243,12 @@ var Video = function Video(_ref) {
|
|
|
240
243
|
autoPlay: autoPlay,
|
|
241
244
|
loop: loop,
|
|
242
245
|
muted: muted,
|
|
243
|
-
poster: shouldLoad ? thumbnailUrl : null,
|
|
246
|
+
poster: shouldLoad && withPoster ? thumbnailUrl : null,
|
|
244
247
|
preload: shouldLoad ? preload : 'none',
|
|
245
248
|
playsInline: playsInline,
|
|
246
249
|
crossOrigin: withoutCors ? 'anonymous' : null,
|
|
247
250
|
tabIndex: focusable ? '0' : '-1',
|
|
248
|
-
className: styles.video
|
|
251
|
+
className: classNames(styles.video)
|
|
249
252
|
}, (sourceFiles || []).map(function (_ref8) {
|
|
250
253
|
var sourceUrl = _ref8.url,
|
|
251
254
|
sourceMime = _ref8.mime;
|
package/lib/index.js
CHANGED
|
@@ -49,7 +49,8 @@ var propTypes = {
|
|
|
49
49
|
onDurationChanged: PropTypes__default["default"].func,
|
|
50
50
|
onVolumeChanged: PropTypes__default["default"].func,
|
|
51
51
|
focusable: PropTypes__default["default"].bool,
|
|
52
|
-
supportedMimes: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string)
|
|
52
|
+
supportedMimes: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
|
53
|
+
withPoster: PropTypes__default["default"].bool // onPosterLoaded: PropTypes.func,
|
|
53
54
|
|
|
54
55
|
};
|
|
55
56
|
var defaultProps = {
|
|
@@ -76,7 +77,8 @@ var defaultProps = {
|
|
|
76
77
|
onDurationChanged: null,
|
|
77
78
|
onVolumeChanged: null,
|
|
78
79
|
focusable: true,
|
|
79
|
-
supportedMimes: ['video/mp4', 'video/webm', 'video/ogg']
|
|
80
|
+
supportedMimes: ['video/mp4', 'video/webm', 'video/ogg'],
|
|
81
|
+
withPoster: false // onPosterLoaded: null,
|
|
80
82
|
|
|
81
83
|
};
|
|
82
84
|
|
|
@@ -106,7 +108,8 @@ var Video = function Video(_ref) {
|
|
|
106
108
|
onDurationChanged = _ref.onDurationChanged,
|
|
107
109
|
onVolumeChanged = _ref.onVolumeChanged,
|
|
108
110
|
focusable = _ref.focusable,
|
|
109
|
-
supportedMimes = _ref.supportedMimes
|
|
111
|
+
supportedMimes = _ref.supportedMimes,
|
|
112
|
+
withPoster = _ref.withPoster;
|
|
110
113
|
|
|
111
114
|
var _ref2 = media || {},
|
|
112
115
|
_ref2$url = _ref2.url,
|
|
@@ -251,12 +254,12 @@ var Video = function Video(_ref) {
|
|
|
251
254
|
autoPlay: autoPlay,
|
|
252
255
|
loop: loop,
|
|
253
256
|
muted: muted,
|
|
254
|
-
poster: shouldLoad ? thumbnailUrl : null,
|
|
257
|
+
poster: shouldLoad && withPoster ? thumbnailUrl : null,
|
|
255
258
|
preload: shouldLoad ? preload : 'none',
|
|
256
259
|
playsInline: playsInline,
|
|
257
260
|
crossOrigin: withoutCors ? 'anonymous' : null,
|
|
258
261
|
tabIndex: focusable ? '0' : '-1',
|
|
259
|
-
className: styles.video
|
|
262
|
+
className: classNames__default["default"](styles.video)
|
|
260
263
|
}, (sourceFiles || []).map(function (_ref8) {
|
|
261
264
|
var sourceUrl = _ref8.url,
|
|
262
265
|
sourceMime = _ref8.mime;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-video",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.124",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
|
53
53
|
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
|
54
54
|
"@fortawesome/react-fontawesome": "^0.1.13",
|
|
55
|
-
"@micromag/core": "^0.3.
|
|
56
|
-
"@micromag/element-closed-captions": "^0.3.
|
|
57
|
-
"@micromag/element-media-controls": "^0.3.
|
|
55
|
+
"@micromag/core": "^0.3.124",
|
|
56
|
+
"@micromag/element-closed-captions": "^0.3.124",
|
|
57
|
+
"@micromag/element-media-controls": "^0.3.124",
|
|
58
58
|
"classnames": "^2.2.6",
|
|
59
59
|
"prop-types": "^15.7.2",
|
|
60
60
|
"react-intl": "^5.12.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "9050944df1d66cae14e04a771f739e2743894fb8"
|
|
67
67
|
}
|