@micromag/viewer 0.3.346 → 0.3.348
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/assets/css/styles.css +9 -9
- package/es/index.js +132 -133
- package/lib/index.js +131 -132
- package/package.json +10 -10
package/es/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { animated } from '@react-spring/web';
|
|
|
16
16
|
import classNames from 'classnames';
|
|
17
17
|
import { Helmet } from 'react-helmet';
|
|
18
18
|
import EventEmitter from 'wolfy87-eventemitter';
|
|
19
|
-
import { Label, ScreenPreview, Screen, Button as Button$1, Meta, FontFaces } from '@micromag/core/components';
|
|
19
|
+
import { Label, CloseIcon, ScreenPreview, Screen, ArrowIcon, Button as Button$1, UnmuteIcon, MuteIcon, PauseIcon, PlayIcon, Meta, FontFaces } from '@micromag/core/components';
|
|
20
20
|
import { useDimensionObserver, useTrackEvent, useDragProgress, useMediaProgress, useMediaReady, useParsedStory, useLoadedFonts, useTrackScreenView, useScreenSizeFromElement, useFullscreen } from '@micromag/core/hooks';
|
|
21
21
|
import { getStyleFromColor, easings, getColorAsString, getDeviceScreens } from '@micromag/core/utils';
|
|
22
22
|
import { ShareIncentive } from '@micromag/elements/all';
|
|
@@ -200,8 +200,8 @@ function useScreenInteraction() {
|
|
|
200
200
|
|
|
201
201
|
var styles$g = {"container":"micromag-viewer-buttons-button-container","asLink":"micromag-viewer-buttons-button-asLink","icon":"micromag-viewer-buttons-button-icon","label":"micromag-viewer-buttons-button-label","withIcon":"micromag-viewer-buttons-button-withIcon","right":"micromag-viewer-buttons-button-right","icon-right":"micromag-viewer-buttons-button-icon-right","withIconColumns":"micromag-viewer-buttons-button-withIconColumns","linkDisabled":"micromag-viewer-buttons-button-linkDisabled"};
|
|
202
202
|
|
|
203
|
-
var _excluded$
|
|
204
|
-
var propTypes$
|
|
203
|
+
var _excluded$9 = ["type", "theme", "size", "href", "external", "direct", "target", "label", "children", "focusable", "active", "icon", "iconPosition", "disabled", "loading", "disableOnLoading", "withoutTheme", "asLink", "onClick", "className", "iconClassName", "labelClassName", "refButton"];
|
|
204
|
+
var propTypes$o = {
|
|
205
205
|
type: PropTypes.string,
|
|
206
206
|
theme: PropTypes$1.buttonTheme,
|
|
207
207
|
size: PropTypes$1.buttonSize,
|
|
@@ -229,7 +229,7 @@ var propTypes$n = {
|
|
|
229
229
|
})])
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
-
var defaultProps$
|
|
232
|
+
var defaultProps$o = {
|
|
233
233
|
type: 'button',
|
|
234
234
|
theme: null,
|
|
235
235
|
size: null,
|
|
@@ -279,7 +279,7 @@ var Button = function Button(_ref) {
|
|
|
279
279
|
iconClassName = _ref.iconClassName,
|
|
280
280
|
labelClassName = _ref.labelClassName,
|
|
281
281
|
refButton = _ref.refButton,
|
|
282
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
282
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
283
283
|
var finalLabel = label || children;
|
|
284
284
|
var text = finalLabel !== null ? /*#__PURE__*/React.createElement(Label, null, finalLabel) : null;
|
|
285
285
|
var hasChildren = label !== null && children !== null;
|
|
@@ -337,10 +337,32 @@ var Button = function Button(_ref) {
|
|
|
337
337
|
tabIndex: focusable ? '0' : '-1'
|
|
338
338
|
}), content);
|
|
339
339
|
};
|
|
340
|
-
Button.propTypes = propTypes$
|
|
341
|
-
Button.defaultProps = defaultProps$
|
|
340
|
+
Button.propTypes = propTypes$o;
|
|
341
|
+
Button.defaultProps = defaultProps$o;
|
|
342
342
|
|
|
343
|
-
var styles$f = {"container":"micromag-viewer-buttons-icon-button-container","
|
|
343
|
+
var styles$f = {"container":"micromag-viewer-buttons-icon-button-container","label":"micromag-viewer-buttons-icon-button-label","icon":"micromag-viewer-buttons-icon-button-icon"};
|
|
344
|
+
|
|
345
|
+
var _excluded$8 = ["iconClassName", "className"];
|
|
346
|
+
var propTypes$n = {
|
|
347
|
+
iconClassName: PropTypes.string,
|
|
348
|
+
className: PropTypes.string
|
|
349
|
+
};
|
|
350
|
+
var defaultProps$n = {
|
|
351
|
+
iconClassName: null,
|
|
352
|
+
className: null
|
|
353
|
+
};
|
|
354
|
+
var IconButton = function IconButton(_ref) {
|
|
355
|
+
var iconClassName = _ref.iconClassName,
|
|
356
|
+
className = _ref.className,
|
|
357
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
358
|
+
return /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
359
|
+
className: classNames([styles$f.container, _defineProperty({}, className, className !== null)]),
|
|
360
|
+
labelClassName: styles$f.label,
|
|
361
|
+
iconClassName: classNames([styles$f.icon, _defineProperty({}, iconClassName, iconClassName !== null)])
|
|
362
|
+
}, props));
|
|
363
|
+
};
|
|
364
|
+
IconButton.propTypes = propTypes$n;
|
|
365
|
+
IconButton.defaultProps = defaultProps$n;
|
|
344
366
|
|
|
345
367
|
var _excluded$7 = ["className"];
|
|
346
368
|
var propTypes$m = {
|
|
@@ -349,17 +371,24 @@ var propTypes$m = {
|
|
|
349
371
|
var defaultProps$m = {
|
|
350
372
|
className: null
|
|
351
373
|
};
|
|
352
|
-
var
|
|
374
|
+
var CloseButton$1 = function CloseButton(_ref) {
|
|
353
375
|
var className = _ref.className,
|
|
354
376
|
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
377
|
+
var intl = useIntl();
|
|
378
|
+
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
379
|
+
className: classNames([_defineProperty({}, className, className !== null)]),
|
|
380
|
+
label: intl.formatMessage({
|
|
381
|
+
id: "dj/p/q",
|
|
382
|
+
defaultMessage: [{
|
|
383
|
+
"type": 0,
|
|
384
|
+
"value": "Close"
|
|
385
|
+
}]
|
|
386
|
+
}),
|
|
387
|
+
icon: /*#__PURE__*/React.createElement(CloseIcon, null)
|
|
359
388
|
}, props));
|
|
360
389
|
};
|
|
361
|
-
|
|
362
|
-
|
|
390
|
+
CloseButton$1.propTypes = propTypes$m;
|
|
391
|
+
CloseButton$1.defaultProps = defaultProps$m;
|
|
363
392
|
|
|
364
393
|
var _excluded$6 = ["className"];
|
|
365
394
|
var propTypes$l = {
|
|
@@ -382,13 +411,34 @@ var CloseButton = function CloseButton(_ref) {
|
|
|
382
411
|
}]
|
|
383
412
|
}),
|
|
384
413
|
icon: /*#__PURE__*/React.createElement("svg", {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
414
|
+
width: "19",
|
|
415
|
+
height: "23",
|
|
416
|
+
viewBox: "0 0 19 23",
|
|
417
|
+
fill: "none",
|
|
418
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
419
|
+
}, /*#__PURE__*/React.createElement("mask", {
|
|
420
|
+
id: "path-1-inside-1_560_19911",
|
|
389
421
|
fill: "currentColor"
|
|
390
|
-
}, /*#__PURE__*/React.createElement("
|
|
391
|
-
|
|
422
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
423
|
+
d: "M0 7C0 4.79086 1.79086 3 4 3H12C14.2091 3 16 4.79086 16 7V19C16 21.2091 14.2091 23 12 23H4C1.79086 23 0 21.2091 0 19V7Z"
|
|
424
|
+
})), /*#__PURE__*/React.createElement("path", {
|
|
425
|
+
d: "M0 3H16H0ZM16 19C16 21.7614 13.7614 24 11 24H4C1.23858 24 -1 21.7614 -1 19H1C1 20.6569 2.34315 22 4 22H12C14.2091 22 16 20.6569 16 19ZM4 24C1.23858 24 -1 21.7614 -1 19V8C-1 5.23858 1.23858 3 4 3C2.34315 3 1 4.79086 1 7V19C1 20.6569 2.34315 22 4 22V24ZM16 3V23V3Z",
|
|
426
|
+
fill: "currentColor",
|
|
427
|
+
mask: "url(#path-1-inside-1_560_19911)"
|
|
428
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
429
|
+
x: "3.5",
|
|
430
|
+
y: "0.5",
|
|
431
|
+
width: "15",
|
|
432
|
+
height: "19",
|
|
433
|
+
rx: "2.5",
|
|
434
|
+
stroke: "currentColor"
|
|
435
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
436
|
+
d: "M7.35333 6.35333L14.6467 13.6467",
|
|
437
|
+
stroke: "currentColor",
|
|
438
|
+
strokeLinejoin: "round"
|
|
439
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
440
|
+
d: "M7.35333 13.6467L14.6467 6.35333",
|
|
441
|
+
stroke: "currentColor"
|
|
392
442
|
}))
|
|
393
443
|
}, props));
|
|
394
444
|
};
|
|
@@ -420,15 +470,27 @@ var MenuButton = function MenuButton(_ref) {
|
|
|
420
470
|
}),
|
|
421
471
|
iconPosition: "right",
|
|
422
472
|
icon: /*#__PURE__*/React.createElement("svg", {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
473
|
+
width: "19",
|
|
474
|
+
height: "23",
|
|
475
|
+
viewBox: "0 0 19 23",
|
|
476
|
+
fill: "none",
|
|
477
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
478
|
+
}, /*#__PURE__*/React.createElement("mask", {
|
|
479
|
+
id: "path-1-inside-1_572_15622",
|
|
427
480
|
fill: "currentColor"
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
481
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
482
|
+
d: "M0 7C0 4.79086 1.79086 3 4 3H12C14.2091 3 16 4.79086 16 7V19C16 21.2091 14.2091 23 12 23H4C1.79086 23 0 21.2091 0 19V7Z"
|
|
483
|
+
})), /*#__PURE__*/React.createElement("path", {
|
|
484
|
+
d: "M0 3H16H0ZM16 19C16 21.7614 13.7614 24 11 24H4C1.23858 24 -1 21.7614 -1 19H1C1 20.6569 2.34315 22 4 22H12C14.2091 22 16 20.6569 16 19ZM4 24C1.23858 24 -1 21.7614 -1 19V8C-1 5.23858 1.23858 3 4 3C2.34315 3 1 4.79086 1 7V19C1 20.6569 2.34315 22 4 22V24ZM16 3V23V3Z",
|
|
485
|
+
fill: "currentColor",
|
|
486
|
+
mask: "url(#path-1-inside-1_572_15622)"
|
|
487
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
488
|
+
x: "3.5",
|
|
489
|
+
y: "0.5",
|
|
490
|
+
width: "15",
|
|
491
|
+
height: "19",
|
|
492
|
+
rx: "2.5",
|
|
493
|
+
stroke: "currentColor"
|
|
432
494
|
}))
|
|
433
495
|
}, props));
|
|
434
496
|
};
|
|
@@ -457,15 +519,21 @@ var ShareButton = function ShareButton(_ref) {
|
|
|
457
519
|
}),
|
|
458
520
|
iconPosition: "left",
|
|
459
521
|
icon: /*#__PURE__*/React.createElement("svg", {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
522
|
+
width: "16",
|
|
523
|
+
height: "22",
|
|
524
|
+
viewBox: "0 0 16 22",
|
|
525
|
+
fill: "none",
|
|
526
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
527
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
528
|
+
fillRule: "evenodd",
|
|
529
|
+
clipRule: "evenodd",
|
|
530
|
+
d: "M7.55806 0.183058C7.80213 -0.0610194 8.19786 -0.0610194 8.44194 0.183058L12.4194 4.16053C12.6635 4.40461 12.6635 4.80034 12.4194 5.04442C12.1753 5.2885 11.7796 5.2885 11.5355 5.04442L8.625 2.13388V11.25H7.375V2.13388L4.46446 5.04442C4.22039 5.2885 3.82466 5.2885 3.58058 5.04442C3.3365 4.80034 3.3365 4.40461 3.58058 4.16053L7.55806 0.183058Z",
|
|
531
|
+
fill: "currentColor"
|
|
532
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
533
|
+
fillRule: "evenodd",
|
|
534
|
+
clipRule: "evenodd",
|
|
535
|
+
d: "M16 18.25V10.25C16 8.59315 14.6569 7.25 13 7.25C14.1046 7.25 15 8.59315 15 10.25V18.25C15 19.3546 14.1046 20.25 13 20.25H3C1.89543 20.25 1 19.3546 1 18.25V10.25C1 8.59315 1.89543 7.25 3 7.25C1.34315 7.25 0 8.59315 0 10.25V18.25C0 19.9069 1.34315 21.25 3 21.25H13C14.6569 21.25 16 19.9069 16 18.25Z",
|
|
464
536
|
fill: "currentColor"
|
|
465
|
-
}, /*#__PURE__*/React.createElement("polygon", {
|
|
466
|
-
points: "8.5 14.5 1.5 14.5 1.5 8 0 8 0 16 10 16 10 8 8.5 8 8.5 14.5"
|
|
467
|
-
}), /*#__PURE__*/React.createElement("polygon", {
|
|
468
|
-
points: "9.62 4.62 5 0 0.38 4.62 1.44 5.68 4.25 2.87 4.25 11.26 5.75 11.26 5.75 2.87 8.56 5.68 9.62 4.62"
|
|
469
537
|
}))
|
|
470
538
|
}, props));
|
|
471
539
|
};
|
|
@@ -1524,13 +1592,16 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1524
1592
|
};
|
|
1525
1593
|
}, [menuOpened, onOpenMenu, onCloseMenu]);
|
|
1526
1594
|
useKeyboardShortcuts(keyboardShortcuts);
|
|
1527
|
-
var menuOpenedProgressValue = menuOpenedProgress ? menuOpenedProgress.value || 0 : 0;
|
|
1528
|
-
var shareOpenedProgressValue = shareOpenedProgress ? shareOpenedProgress.value || 0 : 0;
|
|
1529
1595
|
|
|
1596
|
+
// @TODO: Fix if needed
|
|
1597
|
+
// const menuOpenedProgressValue = menuOpenedProgress ? menuOpenedProgress.value || 0 : 0;
|
|
1598
|
+
// const shareOpenedProgressValue = shareOpenedProgress ? shareOpenedProgress.value || 0 : 0;
|
|
1530
1599
|
// should be zero if either screens menu or share menu is opened
|
|
1531
|
-
|
|
1600
|
+
// const dotsOpacity = useEffect(() => {
|
|
1601
|
+
// Math.min(1, Math.max(0, 1 - (menuOpenedProgressValue + shareOpenedProgressValue)));
|
|
1602
|
+
// }, [menuOpenedProgressValue, shareOpenedProgressValue]);
|
|
1532
1603
|
|
|
1533
|
-
// console.log(dotsOpacity
|
|
1604
|
+
// console.log(dotsOpacity);
|
|
1534
1605
|
|
|
1535
1606
|
useEffect(function () {
|
|
1536
1607
|
if ((menuOpened || draggingMenu) && !menuMounted) {
|
|
@@ -1559,7 +1630,7 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1559
1630
|
iconPosition: "left",
|
|
1560
1631
|
focusable: !shareOpened
|
|
1561
1632
|
}),
|
|
1562
|
-
toggledButton: /*#__PURE__*/React.createElement(CloseButton, {
|
|
1633
|
+
toggledButton: /*#__PURE__*/React.createElement(CloseButton$1, {
|
|
1563
1634
|
className: styles$6.menuButton,
|
|
1564
1635
|
onClick: onCloseShare,
|
|
1565
1636
|
theme: menuTheme,
|
|
@@ -1597,10 +1668,10 @@ var ViewerMenu = function ViewerMenu(_ref) {
|
|
|
1597
1668
|
withoutScreensMenu: withoutScreensMenu,
|
|
1598
1669
|
withoutShareMenu: withoutShareMenu,
|
|
1599
1670
|
onClose: onClickCloseViewer,
|
|
1600
|
-
className: styles$6.dots
|
|
1601
|
-
style
|
|
1602
|
-
|
|
1603
|
-
}
|
|
1671
|
+
className: styles$6.dots
|
|
1672
|
+
// style={{
|
|
1673
|
+
// opacity: dotsOpacity ** 5, // @note this is like a "quint" easing, meaning it'll go towards 1 slowly first and then fast as it approaches 1
|
|
1674
|
+
// }}
|
|
1604
1675
|
}))), /*#__PURE__*/React.createElement(ViewerMenuContainer, {
|
|
1605
1676
|
className: styles$6.menuContainer,
|
|
1606
1677
|
progressSpring: shareOpenedProgress,
|
|
@@ -1794,24 +1865,14 @@ var ArrowHint = function ArrowHint(_ref) {
|
|
|
1794
1865
|
className: classNames([styles$3.container, _defineProperty({}, className, className !== null)])
|
|
1795
1866
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1796
1867
|
className: styles$3.inner
|
|
1797
|
-
}, /*#__PURE__*/React.createElement(
|
|
1798
|
-
className: styles$3.arrow
|
|
1799
|
-
|
|
1800
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1801
|
-
x: "0px",
|
|
1802
|
-
y: "0px",
|
|
1803
|
-
width: "10px",
|
|
1804
|
-
height: "16px",
|
|
1805
|
-
viewBox: "0 0 10 16",
|
|
1806
|
-
fill: "currentColor"
|
|
1807
|
-
}, /*#__PURE__*/React.createElement("polygon", {
|
|
1808
|
-
points: "9.62 4.62 5 0 0.38 4.62 1.44 5.68 4.25 2.87 4.25 14.39 5.75 14.39 5.75 2.87 8.56 5.68 9.62 4.62"
|
|
1809
|
-
}))));
|
|
1868
|
+
}, /*#__PURE__*/React.createElement(ArrowIcon, {
|
|
1869
|
+
className: styles$3.arrow
|
|
1870
|
+
})));
|
|
1810
1871
|
};
|
|
1811
1872
|
ArrowHint.propTypes = propTypes$6;
|
|
1812
1873
|
ArrowHint.defaultProps = defaultProps$6;
|
|
1813
1874
|
|
|
1814
|
-
var styles$2 = {"track":"micromag-viewer-partials-seek-bar-track","progress":"micromag-viewer-partials-seek-bar-progress","inner":"micromag-viewer-partials-seek-bar-inner","progressBar":"micromag-viewer-partials-seek-bar-progressBar","playHead":"micromag-viewer-partials-seek-bar-playHead","withSeekHead":"micromag-viewer-partials-seek-bar-withSeekHead","scrubbedTime":"micromag-viewer-partials-seek-bar-scrubbedTime","showTimestamp":"micromag-viewer-partials-seek-bar-showTimestamp"};
|
|
1875
|
+
var styles$2 = {"track":"micromag-viewer-partials-seek-bar-track","progress":"micromag-viewer-partials-seek-bar-progress","inner":"micromag-viewer-partials-seek-bar-inner","progressBarContainer":"micromag-viewer-partials-seek-bar-progressBarContainer","progressBar":"micromag-viewer-partials-seek-bar-progressBar","playHead":"micromag-viewer-partials-seek-bar-playHead","withSeekHead":"micromag-viewer-partials-seek-bar-withSeekHead","scrubbedTime":"micromag-viewer-partials-seek-bar-scrubbedTime","showTimestamp":"micromag-viewer-partials-seek-bar-showTimestamp"};
|
|
1815
1876
|
|
|
1816
1877
|
var stopDragEventsPropagation = {
|
|
1817
1878
|
onTouchMove: function onTouchMove(e) {
|
|
@@ -1950,12 +2011,14 @@ var SeekBar = function SeekBar(_ref3) {
|
|
|
1950
2011
|
className: classNames([styles$2.container, (_ref6 = {}, _defineProperty(_ref6, className, className !== null), _defineProperty(_ref6, styles$2.withSeekHead, withSeekHead), _defineProperty(_ref6, styles$2.showTimestamp, showTimestamp), _ref6)])
|
|
1951
2012
|
}, stopDragEventsPropagation), /*#__PURE__*/React.createElement("div", {
|
|
1952
2013
|
className: styles$2.inner
|
|
2014
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2015
|
+
className: styles$2.progressBarContainer
|
|
1953
2016
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1954
2017
|
className: styles$2.progressBar,
|
|
1955
2018
|
style: {
|
|
1956
2019
|
backgroundColor: backgroundColor
|
|
1957
2020
|
}
|
|
1958
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2021
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1959
2022
|
className: styles$2.playHead,
|
|
1960
2023
|
style: {
|
|
1961
2024
|
left: "".concat(progress * 100, "%"),
|
|
@@ -2142,42 +2205,11 @@ function PlaybackControls(_ref) {
|
|
|
2142
2205
|
progressColor = _ref3.progressColor,
|
|
2143
2206
|
seekBarOnly = _ref3.seekBarOnly;
|
|
2144
2207
|
var isCollapsed = controls && !controlsVisible && playing || !controls && mediaHasAudio;
|
|
2145
|
-
var icon = playing ? /*#__PURE__*/React.createElement(
|
|
2146
|
-
className: styles$1.icon
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
y: "0px",
|
|
2151
|
-
width: "10px",
|
|
2152
|
-
height: "16px",
|
|
2153
|
-
viewBox: "0 0 10 16",
|
|
2154
|
-
xmlSpace: "preserve"
|
|
2155
|
-
}, /*#__PURE__*/React.createElement("rect", {
|
|
2156
|
-
fill: color,
|
|
2157
|
-
x: "1",
|
|
2158
|
-
y: "3.27",
|
|
2159
|
-
width: "3",
|
|
2160
|
-
height: "9.69"
|
|
2161
|
-
}), /*#__PURE__*/React.createElement("rect", {
|
|
2162
|
-
fill: color,
|
|
2163
|
-
x: "6",
|
|
2164
|
-
y: "3.27",
|
|
2165
|
-
width: "3",
|
|
2166
|
-
height: "9.69"
|
|
2167
|
-
})) : /*#__PURE__*/React.createElement("svg", {
|
|
2168
|
-
className: styles$1.icon,
|
|
2169
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2170
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2171
|
-
x: "0px",
|
|
2172
|
-
y: "0px",
|
|
2173
|
-
width: "10px",
|
|
2174
|
-
height: "16px",
|
|
2175
|
-
viewBox: "0 0 10 16",
|
|
2176
|
-
xmlSpace: "preserve"
|
|
2177
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
2178
|
-
fill: color,
|
|
2179
|
-
d: "M1,3.16V12.84l8-4.84L1,3.16"
|
|
2180
|
-
}));
|
|
2208
|
+
var icon = playing ? /*#__PURE__*/React.createElement(PauseIcon, {
|
|
2209
|
+
className: styles$1.icon
|
|
2210
|
+
}) : /*#__PURE__*/React.createElement(PlayIcon, {
|
|
2211
|
+
className: styles$1.icon
|
|
2212
|
+
});
|
|
2181
2213
|
return /*#__PURE__*/React.createElement("div", {
|
|
2182
2214
|
className: classNames([styles$1.container, (_ref4 = {}, _defineProperty(_ref4, className, className !== null), _defineProperty(_ref4, styles$1.withPlayPause, controls && !seekBarOnly), _defineProperty(_ref4, styles$1.withMute, hasMedia || controls), _defineProperty(_ref4, styles$1.withSeekBar, controls), _defineProperty(_ref4, styles$1.withSeekBarOnly, seekBarOnly), _defineProperty(_ref4, styles$1.isCollapsed, isCollapsed), _defineProperty(_ref4, styles$1.isMuted, muted), _defineProperty(_ref4, collapsedClassName, collapsedClassName !== null && isCollapsed), _ref4)])
|
|
2183
2215
|
}, /*#__PURE__*/React.createElement(Button$1, {
|
|
@@ -2226,44 +2258,11 @@ function PlaybackControls(_ref) {
|
|
|
2226
2258
|
},
|
|
2227
2259
|
onClick: muted ? onUnmute : onMute,
|
|
2228
2260
|
focusable: controlsVisible || mediaHasAudio,
|
|
2229
|
-
icon: muted ? /*#__PURE__*/React.createElement(
|
|
2230
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2231
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2232
|
-
x: "0px",
|
|
2233
|
-
y: "0px",
|
|
2234
|
-
width: "10px",
|
|
2235
|
-
height: "16px",
|
|
2236
|
-
viewBox: "0 0 10 16",
|
|
2237
|
-
xmlSpace: "preserve",
|
|
2261
|
+
icon: muted ? /*#__PURE__*/React.createElement(UnmuteIcon, {
|
|
2238
2262
|
className: styles$1.icon
|
|
2239
|
-
}
|
|
2240
|
-
fill: color,
|
|
2241
|
-
points: "2.75 4.63 1.24 6 0 6 0 10 1.24 10 4.54 13 4.54 3 2.75 4.63"
|
|
2242
|
-
}), /*#__PURE__*/React.createElement("polygon", {
|
|
2243
|
-
fill: color,
|
|
2244
|
-
points: "10 6.63 8.94 5.57 7.58 6.93 6.21 5.57 5.15 6.63 6.52 7.99 5.15 9.35 6.21 10.43 7.58 9.06 8.94 10.43 10 9.35 8.64 7.99 10 6.63"
|
|
2245
|
-
})) : /*#__PURE__*/React.createElement("svg", {
|
|
2246
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2247
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2248
|
-
x: "0px",
|
|
2249
|
-
y: "0px",
|
|
2250
|
-
width: "10px",
|
|
2251
|
-
height: "16px",
|
|
2252
|
-
viewBox: "0 0 10 16",
|
|
2253
|
-
xmlSpace: "preserve",
|
|
2263
|
+
}) : /*#__PURE__*/React.createElement(MuteIcon, {
|
|
2254
2264
|
className: styles$1.icon
|
|
2255
|
-
},
|
|
2256
|
-
fill: color,
|
|
2257
|
-
points: "2.75 4.63 1.24 6 0 6 0 10 1.24 10 4.54 13 4.54 3 2.75 4.63"
|
|
2258
|
-
}), /*#__PURE__*/React.createElement("circle", {
|
|
2259
|
-
fill: color,
|
|
2260
|
-
cx: "6.14",
|
|
2261
|
-
cy: "8",
|
|
2262
|
-
r: ".99"
|
|
2263
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2264
|
-
fill: color,
|
|
2265
|
-
d: "M6.14,11.88v-1.5c1.31,0,2.38-1.07,2.38-2.38s-1.07-2.38-2.38-2.38v-1.5c2.14,0,3.88,1.74,3.88,3.88s-1.74,3.88-3.88,3.88Z"
|
|
2266
|
-
})),
|
|
2265
|
+
}),
|
|
2267
2266
|
"aria-label": muted ? intl.formatMessage({
|
|
2268
2267
|
id: "RK/QEY",
|
|
2269
2268
|
defaultMessage: [{
|