suada-components 1.2.0 → 1.3.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/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/{DailyMotion-BM__Vhyo.js → DailyMotion-BRR94A6R.js} +1 -1
- package/dist/components/{DailyMotion-CxLlr0cR.esm.js → DailyMotion-fTfJbAKR.esm.js} +1 -1
- package/dist/components/{Facebook-Zkq5Dmij.js → Facebook-BYAo-2rH.js} +1 -1
- package/dist/components/{Facebook-DjA6gknl.esm.js → Facebook-g8siL1GN.esm.js} +1 -1
- package/dist/components/{FilePlayer-C-z4wNAs.esm.js → FilePlayer--e_TvukB.esm.js} +1 -1
- package/dist/components/{FilePlayer-PgJJpyg0.js → FilePlayer-CBlW9Z-Z.js} +1 -1
- package/dist/components/{Kaltura-B50rwAlx.esm.js → Kaltura-CgG6fwG2.esm.js} +1 -1
- package/dist/components/{Kaltura-Btu7etAO.js → Kaltura-Cw4p4d7w.js} +1 -1
- package/dist/components/{Mixcloud-DCuoGh8X.esm.js → Mixcloud-1pcndu_p.esm.js} +1 -1
- package/dist/components/{Mixcloud-CpyWM87F.js → Mixcloud-FU7dfnB-.js} +1 -1
- package/dist/components/{Mux-DQjOzSHN.js → Mux-CFgk1TgE.js} +1 -1
- package/dist/components/{Mux-Bj4ELcFh.esm.js → Mux-bOE4IGCQ.esm.js} +1 -1
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/Pagination.js +2 -2
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/Pagination.stories.js +2 -0
- package/dist/components/Pagination/Pagination.stories.js.map +1 -1
- package/dist/components/Pagination/pagination.interface.d.ts +1 -0
- package/dist/components/Pagination/styled-components.d.ts +3 -1
- package/dist/components/Pagination/styled-components.js +7 -1
- package/dist/components/Pagination/styled-components.js.map +1 -1
- package/dist/components/{Preview-M0CQw6-7.js → Preview-CFFnVBFk.js} +1 -1
- package/dist/components/{Preview-Cgl2b2Yo.esm.js → Preview-ZZ8yCxMr.esm.js} +1 -1
- package/dist/components/{SoundCloud-BQ1Bv-Ms.esm.js → SoundCloud-1OvUzexh.esm.js} +1 -1
- package/dist/components/{SoundCloud-D8ulCoOA.js → SoundCloud-BsdovEa4.js} +1 -1
- package/dist/components/{Streamable-C_gvjkdy.js → Streamable-C18bUmk1.js} +1 -1
- package/dist/components/{Streamable-DTv6vm7m.esm.js → Streamable-DkZbzMhq.esm.js} +1 -1
- package/dist/components/{Twitch-RxI4d-d5.js → Twitch-BwMnK2K5.js} +1 -1
- package/dist/components/{Twitch-BrQFLQcf.esm.js → Twitch-CAR5VDqo.esm.js} +1 -1
- package/dist/components/VideoPlayer/Controls/Controls.interface.d.ts +4 -0
- package/dist/components/VideoPlayer/Controls/Controls.js +87 -4
- package/dist/components/VideoPlayer/Controls/Controls.js.map +1 -1
- package/dist/components/VideoPlayer/Controls/Controls.styles.d.ts +1 -0
- package/dist/components/VideoPlayer/Controls/Controls.styles.js +6 -5
- package/dist/components/VideoPlayer/Controls/Controls.styles.js.map +1 -1
- package/dist/components/VideoPlayer/Player.d.ts +2 -1
- package/dist/components/VideoPlayer/Player.interface.d.ts +6 -1
- package/dist/components/VideoPlayer/Player.js +44 -23
- package/dist/components/VideoPlayer/Player.js.map +1 -1
- package/dist/components/VideoPlayer/Player.styles.d.ts +2 -0
- package/dist/components/VideoPlayer/Player.styles.js +21 -0
- package/dist/components/VideoPlayer/Player.styles.js.map +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.stories.d.ts +3 -0
- package/dist/components/VideoPlayer/VideoPlayer.stories.js +35 -0
- package/dist/components/VideoPlayer/VideoPlayer.stories.js.map +1 -1
- package/dist/components/VideoPlayer/useHlsSubtitles.d.ts +12 -0
- package/dist/components/VideoPlayer/useHlsSubtitles.js +73 -0
- package/dist/components/VideoPlayer/useHlsSubtitles.js.map +1 -0
- package/dist/components/VideoPlayer/usePlayerControls.js +52 -41
- package/dist/components/VideoPlayer/usePlayerControls.js.map +1 -1
- package/dist/components/{Vidyard-BCPvgfz4.esm.js → Vidyard-Dj__VHEu.esm.js} +1 -1
- package/dist/components/{Vidyard-uAwNCpw7.js → Vidyard-DjdEjiba.js} +1 -1
- package/dist/components/{Vimeo-BfnFWKlr.js → Vimeo-B2sdU2eb.js} +1 -1
- package/dist/components/{Vimeo-Ocs8S_PZ.esm.js → Vimeo-B6eklZts.esm.js} +1 -1
- package/dist/components/{Wistia-DU_Kavg4.js → Wistia-D8WmgJRA.js} +1 -1
- package/dist/components/{Wistia-CjqtkoU1.esm.js → Wistia-T3lTN9f9.esm.js} +1 -1
- package/dist/components/{YouTube-uIBmVRVn.js → YouTube-DpQU6ZH9.js} +1 -1
- package/dist/components/{YouTube-CBwRsGZb.esm.js → YouTube-DvS99YSi.esm.js} +1 -1
- package/dist/components/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/components/Pagination/pagination.interface.d.ts +1 -0
- package/dist/components/components/Pagination/styled-components.d.ts +3 -1
- package/dist/components/components/VideoPlayer/Controls/Controls.interface.d.ts +4 -0
- package/dist/components/components/VideoPlayer/Controls/Controls.styles.d.ts +1 -0
- package/dist/components/components/VideoPlayer/Player.d.ts +2 -1
- package/dist/components/components/VideoPlayer/Player.interface.d.ts +6 -1
- package/dist/components/components/VideoPlayer/Player.styles.d.ts +2 -0
- package/dist/components/components/VideoPlayer/useHlsSubtitles.d.ts +12 -0
- package/dist/components/{index-KXbxnyZn.esm.js → index-C_u0zRwP.esm.js} +325 -127
- package/dist/components/{index-Dwz3FwAA.js → index-D4JJ3W7g.js} +325 -127
- package/dist/components/index.esm.js +1 -1
- package/dist/icons/DownloadIcon.js +2 -2
- package/dist/icons/DownloadIcon.js.map +1 -1
- package/dist/icons/components/Pagination/Pagination.d.ts +1 -1
- package/dist/icons/components/Pagination/pagination.interface.d.ts +1 -0
- package/dist/icons/components/Pagination/styled-components.d.ts +3 -1
- package/dist/icons/components/VideoPlayer/Controls/Controls.interface.d.ts +4 -0
- package/dist/icons/components/VideoPlayer/Controls/Controls.styles.d.ts +1 -0
- package/dist/icons/components/VideoPlayer/Player.d.ts +2 -1
- package/dist/icons/components/VideoPlayer/Player.interface.d.ts +6 -1
- package/dist/icons/components/VideoPlayer/Player.styles.d.ts +2 -0
- package/dist/icons/components/VideoPlayer/useHlsSubtitles.d.ts +12 -0
- package/dist/icons/index.esm.js +5 -3
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
|
@@ -2445,7 +2445,7 @@ var Button$1 = function Button(_a) {
|
|
|
2445
2445
|
style: customStyles,
|
|
2446
2446
|
onClick: onClick,
|
|
2447
2447
|
type: htmlType,
|
|
2448
|
-
className: className,
|
|
2448
|
+
className: "".concat(className, " button-theme-color"),
|
|
2449
2449
|
children: [iconLeft, label, iconRight]
|
|
2450
2450
|
});
|
|
2451
2451
|
};
|
|
@@ -32391,7 +32391,7 @@ var StylesCardWrapper = dt.div(templateObject_10$2 || (templateObject_10$2 = __m
|
|
|
32391
32391
|
});
|
|
32392
32392
|
var StyledChecked = dt.div(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2;\n background-color: rgb(0 0 0 / 23%);\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2;\n background-color: rgb(0 0 0 / 23%);\n"])));
|
|
32393
32393
|
dt.div(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n position: relative;\n cursor: pointer;\n .icon_button {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n"], ["\n position: relative;\n cursor: pointer;\n .icon_button {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n"])));
|
|
32394
|
-
var CourseStatusContainer = dt.div(templateObject_13$
|
|
32394
|
+
var CourseStatusContainer = dt.div(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n color: #fff;\n height: 32px;\n padding: 4px 12px;\n text-transform: capitalize;\n border-radius: 4px;\n background: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n color: #fff;\n height: 32px;\n padding: 4px 12px;\n text-transform: capitalize;\n border-radius: 4px;\n background: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_a) {
|
|
32395
32395
|
var $status = _a.$status;
|
|
32396
32396
|
return !$status ? '#EA382A' : '#00905E';
|
|
32397
32397
|
});
|
|
@@ -32446,7 +32446,7 @@ var GridItem = dt.div(templateObject_32 || (templateObject_32 = __makeTemplateOb
|
|
|
32446
32446
|
var $isFromUser = _a.$isFromUser;
|
|
32447
32447
|
return $isFromUser && "\n figure {\n position: relative;\n &:after {\n content: 'View Analytics';\n position: absolute;\n top: 0;\n opacity: 0;\n color: #06c68f;\n left: 0;\n font-size: 24px;\n font-weight: 700;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(255, 255, 255, 0.9);\n width: 100%;\n height: 100%;\n transition: opacity 0.3s ease;\n z-index: 10;\n }\n }\n\n &:hover {\n figure {\n &:after {\n opacity: 1;\n }\n }\n }\n " || '';
|
|
32448
32448
|
});
|
|
32449
|
-
var templateObject_1$o, templateObject_2$j, templateObject_3$f, templateObject_4$c, templateObject_5$8, templateObject_6$7, templateObject_7$5, templateObject_8$4, templateObject_9$3, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$
|
|
32449
|
+
var templateObject_1$o, templateObject_2$j, templateObject_3$f, templateObject_4$c, templateObject_5$8, templateObject_6$7, templateObject_7$5, templateObject_8$4, templateObject_9$3, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$1, templateObject_15$1, templateObject_16$1, templateObject_17$1, templateObject_18$1, templateObject_19$1, templateObject_20$1, templateObject_21$1, templateObject_22$1, templateObject_23$1, templateObject_24$1, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32;
|
|
32450
32450
|
|
|
32451
32451
|
var TooltipHeight$1 = function TooltipHeight(_a) {
|
|
32452
32452
|
var text = _a.text,
|
|
@@ -34760,7 +34760,9 @@ DocumentAttachment.displayName = 'DocumentAttachment';
|
|
|
34760
34760
|
var DownloadIcon = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
34761
34761
|
var className = _a.className,
|
|
34762
34762
|
onClick = _a.onClick,
|
|
34763
|
-
|
|
34763
|
+
_b = _a.fill,
|
|
34764
|
+
fill = _b === void 0 ? '#FFFFFF' : _b,
|
|
34765
|
+
props = __rest(_a, ["className", "onClick", "fill"]);
|
|
34764
34766
|
return jsxRuntimeExports.jsxs("svg", __assign({
|
|
34765
34767
|
ref: ref,
|
|
34766
34768
|
width: '24',
|
|
@@ -34773,10 +34775,10 @@ var DownloadIcon = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
34773
34775
|
}, props, {
|
|
34774
34776
|
children: [jsxRuntimeExports.jsx("path", {
|
|
34775
34777
|
d: 'M19.5 18V21H4.5V18H3V21C3 21.3978 3.15804 21.7794 3.43934 22.0607C3.72064 22.342 4.10218 22.5 4.5 22.5H19.5C19.8978 22.5 20.2794 22.342 20.5607 22.0607C20.842 21.7794 21 21.3978 21 21V18H19.5Z',
|
|
34776
|
-
fill:
|
|
34778
|
+
fill: fill
|
|
34777
34779
|
}), jsxRuntimeExports.jsx("path", {
|
|
34778
34780
|
d: 'M19.5 10.5L18.4425 9.4425L12.75 15.1275V1.5H11.25V15.1275L5.5575 9.4425L4.5 10.5L12 18L19.5 10.5Z',
|
|
34779
|
-
fill:
|
|
34781
|
+
fill: fill
|
|
34780
34782
|
})]
|
|
34781
34783
|
}));
|
|
34782
34784
|
});
|
|
@@ -42830,7 +42832,7 @@ var ItemContainer = dt.div(templateObject_11$1 || (templateObject_11$1 = __makeT
|
|
|
42830
42832
|
return width || '100%';
|
|
42831
42833
|
});
|
|
42832
42834
|
dt.div(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n width: 390px;\n"], ["\n width: 390px;\n"])));
|
|
42833
|
-
var CancelButton = dt.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n top: ", ";\n cursor: pointer;\n"], ["\n position: absolute;\n right: ", ";\n top: ", ";\n cursor: pointer;\n"])), function (_a) {
|
|
42835
|
+
var CancelButton = dt.div(templateObject_13$1 || (templateObject_13$1 = __makeTemplateObject(["\n position: absolute;\n right: ", ";\n top: ", ";\n cursor: pointer;\n"], ["\n position: absolute;\n right: ", ";\n top: ", ";\n cursor: pointer;\n"])), function (_a) {
|
|
42834
42836
|
var right = _a.right;
|
|
42835
42837
|
return right || '-13px';
|
|
42836
42838
|
}, function (_a) {
|
|
@@ -42861,7 +42863,7 @@ var Title = dt.h2(templateObject_24 || (templateObject_24 = __makeTemplateObject
|
|
|
42861
42863
|
var $required = _a.$required;
|
|
42862
42864
|
return $required ? "\n &::after {\n content: '*';\n color: red;\n margin-left: 3px;\n }\n " : '';
|
|
42863
42865
|
});
|
|
42864
|
-
var templateObject_1$j, templateObject_2$e, templateObject_3$a, templateObject_4$7, templateObject_5$6, templateObject_6$5, templateObject_7$3, templateObject_8$2, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24;
|
|
42866
|
+
var templateObject_1$j, templateObject_2$e, templateObject_3$a, templateObject_4$7, templateObject_5$6, templateObject_6$5, templateObject_7$3, templateObject_8$2, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24;
|
|
42865
42867
|
|
|
42866
42868
|
var InsertDriveFile = {};
|
|
42867
42869
|
|
|
@@ -61157,7 +61159,13 @@ var Checkbox = function Checkbox(_a) {
|
|
|
61157
61159
|
});
|
|
61158
61160
|
};
|
|
61159
61161
|
|
|
61160
|
-
var PaginationWrapper = dt.div(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 20px;\n font-family: 'Open Sans', sans-serif;\n font-weight: 600;\n\n .MuiPagination-ul {\n flex-wrap: nowrap;\n }\n .MuiPaginationItem-root {\n background: #ffffff;\n border: 1px solid #e7e9ed !important;\n border-radius: 4px !important;\n width: 32px !important;\n height: 32px !important;\n padding: 6px 6px !important;\n\n &:hover {\n border: 1px solid #cdccd0;\n background-color: #ffffff;\n }\n\n &.Mui-selected {\n background:
|
|
61162
|
+
var PaginationWrapper = dt.div(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 20px;\n font-family: 'Open Sans', sans-serif;\n font-weight: 600;\n\n .MuiPagination-ul {\n flex-wrap: nowrap;\n }\n .MuiPaginationItem-root {\n background: #ffffff;\n border: 1px solid #e7e9ed !important;\n border-radius: 4px !important;\n width: 32px !important;\n height: 32px !important;\n padding: 6px 6px !important;\n\n &:hover {\n border: 1px solid #cdccd0;\n background-color: #ffffff;\n }\n\n &.Mui-selected {\n background: ", ";\n color: white;\n\n &:hover {\n background: ", ";\n border: none;\n }\n }\n }\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 20px;\n font-family: 'Open Sans', sans-serif;\n font-weight: 600;\n\n .MuiPagination-ul {\n flex-wrap: nowrap;\n }\n .MuiPaginationItem-root {\n background: #ffffff;\n border: 1px solid #e7e9ed !important;\n border-radius: 4px !important;\n width: 32px !important;\n height: 32px !important;\n padding: 6px 6px !important;\n\n &:hover {\n border: 1px solid #cdccd0;\n background-color: #ffffff;\n }\n\n &.Mui-selected {\n background: ", ";\n color: white;\n\n &:hover {\n background: ", ";\n border: none;\n }\n }\n }\n"])), function (_a) {
|
|
61163
|
+
var $themeColor = _a.$themeColor;
|
|
61164
|
+
return $themeColor || '#08c694';
|
|
61165
|
+
}, function (_a) {
|
|
61166
|
+
var $themeColor = _a.$themeColor;
|
|
61167
|
+
return $themeColor || '#08c694';
|
|
61168
|
+
});
|
|
61161
61169
|
var templateObject_1$e;
|
|
61162
61170
|
|
|
61163
61171
|
var Pagination = function Pagination(_a) {
|
|
@@ -61165,8 +61173,10 @@ var Pagination = function Pagination(_a) {
|
|
|
61165
61173
|
totalPages = _a.totalPages,
|
|
61166
61174
|
handleChange = _a.handleChange,
|
|
61167
61175
|
perPage = _a.perPage,
|
|
61176
|
+
themeColor = _a.themeColor,
|
|
61168
61177
|
handlePerPageChange = _a.handlePerPageChange;
|
|
61169
61178
|
return jsxRuntimeExports.jsxs(PaginationWrapper, {
|
|
61179
|
+
"$themeColor": themeColor,
|
|
61170
61180
|
children: [perPage && jsxRuntimeExports.jsxs(Select$1, {
|
|
61171
61181
|
variant: 'standard',
|
|
61172
61182
|
"native": true,
|
|
@@ -81409,7 +81419,7 @@ function requirePlayers () {
|
|
|
81409
81419
|
canPlay: import_patterns.canPlay.youtube,
|
|
81410
81420
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81411
81421
|
/* webpackChunkName: 'reactPlayerYouTube' */
|
|
81412
|
-
'./YouTube-
|
|
81422
|
+
'./YouTube-DpQU6ZH9.js'
|
|
81413
81423
|
); }).then(function (n) { return n.YouTube; }))
|
|
81414
81424
|
},
|
|
81415
81425
|
{
|
|
@@ -81418,7 +81428,7 @@ function requirePlayers () {
|
|
|
81418
81428
|
canPlay: import_patterns.canPlay.soundcloud,
|
|
81419
81429
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81420
81430
|
/* webpackChunkName: 'reactPlayerSoundCloud' */
|
|
81421
|
-
'./SoundCloud-
|
|
81431
|
+
'./SoundCloud-BsdovEa4.js'
|
|
81422
81432
|
); }).then(function (n) { return n.SoundCloud; }))
|
|
81423
81433
|
},
|
|
81424
81434
|
{
|
|
@@ -81427,7 +81437,7 @@ function requirePlayers () {
|
|
|
81427
81437
|
canPlay: import_patterns.canPlay.vimeo,
|
|
81428
81438
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81429
81439
|
/* webpackChunkName: 'reactPlayerVimeo' */
|
|
81430
|
-
'./Vimeo-
|
|
81440
|
+
'./Vimeo-B2sdU2eb.js'
|
|
81431
81441
|
); }).then(function (n) { return n.Vimeo; }))
|
|
81432
81442
|
},
|
|
81433
81443
|
{
|
|
@@ -81436,7 +81446,7 @@ function requirePlayers () {
|
|
|
81436
81446
|
canPlay: import_patterns.canPlay.mux,
|
|
81437
81447
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81438
81448
|
/* webpackChunkName: 'reactPlayerMux' */
|
|
81439
|
-
'./Mux-
|
|
81449
|
+
'./Mux-CFgk1TgE.js'
|
|
81440
81450
|
); }).then(function (n) { return n.Mux; }))
|
|
81441
81451
|
},
|
|
81442
81452
|
{
|
|
@@ -81445,7 +81455,7 @@ function requirePlayers () {
|
|
|
81445
81455
|
canPlay: import_patterns.canPlay.facebook,
|
|
81446
81456
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81447
81457
|
/* webpackChunkName: 'reactPlayerFacebook' */
|
|
81448
|
-
'./Facebook-
|
|
81458
|
+
'./Facebook-BYAo-2rH.js'
|
|
81449
81459
|
); }).then(function (n) { return n.Facebook; }))
|
|
81450
81460
|
},
|
|
81451
81461
|
{
|
|
@@ -81454,7 +81464,7 @@ function requirePlayers () {
|
|
|
81454
81464
|
canPlay: import_patterns.canPlay.streamable,
|
|
81455
81465
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81456
81466
|
/* webpackChunkName: 'reactPlayerStreamable' */
|
|
81457
|
-
'./Streamable-
|
|
81467
|
+
'./Streamable-C18bUmk1.js'
|
|
81458
81468
|
); }).then(function (n) { return n.Streamable; }))
|
|
81459
81469
|
},
|
|
81460
81470
|
{
|
|
@@ -81463,7 +81473,7 @@ function requirePlayers () {
|
|
|
81463
81473
|
canPlay: import_patterns.canPlay.wistia,
|
|
81464
81474
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81465
81475
|
/* webpackChunkName: 'reactPlayerWistia' */
|
|
81466
|
-
'./Wistia-
|
|
81476
|
+
'./Wistia-D8WmgJRA.js'
|
|
81467
81477
|
); }).then(function (n) { return n.Wistia; }))
|
|
81468
81478
|
},
|
|
81469
81479
|
{
|
|
@@ -81472,7 +81482,7 @@ function requirePlayers () {
|
|
|
81472
81482
|
canPlay: import_patterns.canPlay.twitch,
|
|
81473
81483
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81474
81484
|
/* webpackChunkName: 'reactPlayerTwitch' */
|
|
81475
|
-
'./Twitch-
|
|
81485
|
+
'./Twitch-BwMnK2K5.js'
|
|
81476
81486
|
); }).then(function (n) { return n.Twitch; }))
|
|
81477
81487
|
},
|
|
81478
81488
|
{
|
|
@@ -81481,7 +81491,7 @@ function requirePlayers () {
|
|
|
81481
81491
|
canPlay: import_patterns.canPlay.dailymotion,
|
|
81482
81492
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81483
81493
|
/* webpackChunkName: 'reactPlayerDailyMotion' */
|
|
81484
|
-
'./DailyMotion-
|
|
81494
|
+
'./DailyMotion-BRR94A6R.js'
|
|
81485
81495
|
); }).then(function (n) { return n.DailyMotion; }))
|
|
81486
81496
|
},
|
|
81487
81497
|
{
|
|
@@ -81490,7 +81500,7 @@ function requirePlayers () {
|
|
|
81490
81500
|
canPlay: import_patterns.canPlay.mixcloud,
|
|
81491
81501
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81492
81502
|
/* webpackChunkName: 'reactPlayerMixcloud' */
|
|
81493
|
-
'./Mixcloud-
|
|
81503
|
+
'./Mixcloud-FU7dfnB-.js'
|
|
81494
81504
|
); }).then(function (n) { return n.Mixcloud; }))
|
|
81495
81505
|
},
|
|
81496
81506
|
{
|
|
@@ -81499,7 +81509,7 @@ function requirePlayers () {
|
|
|
81499
81509
|
canPlay: import_patterns.canPlay.vidyard,
|
|
81500
81510
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81501
81511
|
/* webpackChunkName: 'reactPlayerVidyard' */
|
|
81502
|
-
'./Vidyard-
|
|
81512
|
+
'./Vidyard-DjdEjiba.js'
|
|
81503
81513
|
); }).then(function (n) { return n.Vidyard; }))
|
|
81504
81514
|
},
|
|
81505
81515
|
{
|
|
@@ -81508,7 +81518,7 @@ function requirePlayers () {
|
|
|
81508
81518
|
canPlay: import_patterns.canPlay.kaltura,
|
|
81509
81519
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81510
81520
|
/* webpackChunkName: 'reactPlayerKaltura' */
|
|
81511
|
-
'./Kaltura-
|
|
81521
|
+
'./Kaltura-Cw4p4d7w.js'
|
|
81512
81522
|
); }).then(function (n) { return n.Kaltura; }))
|
|
81513
81523
|
},
|
|
81514
81524
|
{
|
|
@@ -81520,7 +81530,7 @@ function requirePlayers () {
|
|
|
81520
81530
|
},
|
|
81521
81531
|
lazyPlayer: (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
81522
81532
|
/* webpackChunkName: 'reactPlayerFilePlayer' */
|
|
81523
|
-
'./FilePlayer-
|
|
81533
|
+
'./FilePlayer-CBlW9Z-Z.js'
|
|
81524
81534
|
); }).then(function (n) { return n.FilePlayer; }))
|
|
81525
81535
|
}
|
|
81526
81536
|
];
|
|
@@ -82341,7 +82351,7 @@ function requireReactPlayer () {
|
|
|
82341
82351
|
var import_Player = __toESM(/*@__PURE__*/ requirePlayer());
|
|
82342
82352
|
const Preview = (0, import_utils.lazy)(() => Promise.resolve().then(function () { return require(
|
|
82343
82353
|
/* webpackChunkName: 'reactPlayerPreview' */
|
|
82344
|
-
'./Preview-
|
|
82354
|
+
'./Preview-CFFnVBFk.js'
|
|
82345
82355
|
); }).then(function (n) { return n.Preview; }));
|
|
82346
82356
|
const IS_BROWSER = typeof window !== "undefined" && window.document && typeof document !== "undefined";
|
|
82347
82357
|
const IS_GLOBAL = typeof commonjsGlobal !== "undefined" && commonjsGlobal.window && commonjsGlobal.window.document;
|
|
@@ -82560,6 +82570,27 @@ var StyledSubtitles = dt.div(templateObject_7$1 || (templateObject_7$1 = __makeT
|
|
|
82560
82570
|
var $controls = _a.$controls;
|
|
82561
82571
|
return $controls ? '60px' : '10px';
|
|
82562
82572
|
});
|
|
82573
|
+
var HLS_SUBTITLE_STYLES = "\n /* Hide native HLS subtitles completely - comprehensive approach */\n video::cue {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n video::-webkit-media-text-track-display {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n video::cue-region {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n video::-webkit-media-text-track-container {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n /* Target ReactPlayer specifically */\n .react-player video::cue {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n .react-player video::-webkit-media-text-track-display {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n .react-player video::cue-region {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n .react-player video::-webkit-media-text-track-container {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n /* Additional selectors for different browsers */\n video::-moz-media-text-track-display {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n video::-ms-media-text-track-display {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n /* Hide any subtitle overlays */\n .react-player video + div[style*=\"position: absolute\"] {\n display: none !important;\n }\n \n /* Target HLS video player specifically */\n .hls-video-player::cue {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n .hls-video-player::-webkit-media-text-track-display {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n .hls-video-player::-webkit-media-text-track-container {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n \n .hls-video-player::cue-region {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n }\n";
|
|
82574
|
+
var injectHLSSubtitleStyles = function injectHLSSubtitleStyles() {
|
|
82575
|
+
var addSubtitleStyles = function addSubtitleStyles() {
|
|
82576
|
+
var existingStyle = document.getElementById('hls-subtitle-styles');
|
|
82577
|
+
if (existingStyle) {
|
|
82578
|
+
existingStyle.remove();
|
|
82579
|
+
}
|
|
82580
|
+
var style = document.createElement('style');
|
|
82581
|
+
style.id = 'hls-subtitle-styles';
|
|
82582
|
+
style.textContent = HLS_SUBTITLE_STYLES;
|
|
82583
|
+
document.head.appendChild(style);
|
|
82584
|
+
};
|
|
82585
|
+
addSubtitleStyles();
|
|
82586
|
+
// Return cleanup function
|
|
82587
|
+
return function () {
|
|
82588
|
+
var existingStyle = document.getElementById('hls-subtitle-styles');
|
|
82589
|
+
if (existingStyle) {
|
|
82590
|
+
existingStyle.remove();
|
|
82591
|
+
}
|
|
82592
|
+
};
|
|
82593
|
+
};
|
|
82563
82594
|
var templateObject_1$9, templateObject_2$7, templateObject_3$4, templateObject_4$2, templateObject_5$2, templateObject_6$2, templateObject_7$1;
|
|
82564
82595
|
|
|
82565
82596
|
var StyledControls = dt.div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n width: 100%;\n border-radius: 0px 0px 8px 8px;\n background: #565a62;\n padding: 12px 16px;\n position: relative;\n\n svg {\n cursor: pointer;\n\n @media screen and (max-width: 1500px) {\n width: 20px;\n height: 20px;\n }\n\n @media screen and (max-width: 1000px) {\n width: 16px;\n height: 16px;\n }\n }\n\n & > p {\n color: var(--neutral-colors-light);\n font-family: 'Poppins', sans-serif;\n ", "\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n width: 100%;\n border-radius: 0px 0px 8px 8px;\n background: #565a62;\n padding: 12px 16px;\n position: relative;\n\n svg {\n cursor: pointer;\n\n @media screen and (max-width: 1500px) {\n width: 20px;\n height: 20px;\n }\n\n @media screen and (max-width: 1000px) {\n width: 16px;\n height: 16px;\n }\n }\n\n & > p {\n color: var(--neutral-colors-light);\n font-family: 'Poppins', sans-serif;\n ", "\n }\n"])), {
|
|
@@ -82580,11 +82611,12 @@ var StyledTimeTrack = dt.div(templateObject_7 || (templateObject_7 = __makeTempl
|
|
|
82580
82611
|
fontStyle: 'descriptor'
|
|
82581
82612
|
});
|
|
82582
82613
|
var StyledHeartIconContainer = dt.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > svg > path {\n fill: var(--neutral-colors-light);\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n\n & > svg > path {\n fill: var(--neutral-colors-light);\n }\n"])));
|
|
82583
|
-
var
|
|
82584
|
-
var
|
|
82585
|
-
var
|
|
82586
|
-
var
|
|
82587
|
-
var
|
|
82614
|
+
var StyledDownloadIconContainer = dt.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n & > svg {\n width: 24px !important;\n height: 24px !important;\n \n @media screen and (max-width: 1500px) {\n width: 20px !important;\n height: 20px !important;\n }\n\n @media screen and (max-width: 1000px) {\n width: 16px !important;\n height: 16px !important;\n }\n }\n\n & > svg > path {\n fill: #FFFFFF !important;\n transition: fill 0.2s ease;\n }\n\n &:hover > svg > path {\n fill: #08C694 !important;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n & > svg {\n width: 24px !important;\n height: 24px !important;\n \n @media screen and (max-width: 1500px) {\n width: 20px !important;\n height: 20px !important;\n }\n\n @media screen and (max-width: 1000px) {\n width: 16px !important;\n height: 16px !important;\n }\n }\n\n & > svg > path {\n fill: #FFFFFF !important;\n transition: fill 0.2s ease;\n }\n\n &:hover > svg > path {\n fill: #08C694 !important;\n }\n"])));
|
|
82615
|
+
var StyledSubtitlesIconContainer = dt.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
82616
|
+
var StyledFullscreenIconContainer = dt.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n"])));
|
|
82617
|
+
var StyledVolumeIconContainer = dt.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n"])));
|
|
82618
|
+
var StyledPlayPauseIconContainer = dt.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n"])));
|
|
82619
|
+
var templateObject_1$8, templateObject_2$6, templateObject_3$3, templateObject_4$1, templateObject_5$1, templateObject_6$1, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
82588
82620
|
|
|
82589
82621
|
var PLAYBACK_SPEED_LIST = [{
|
|
82590
82622
|
label: 'playback_speed.2x',
|
|
@@ -82798,7 +82830,60 @@ var Controls = function Controls(_a) {
|
|
|
82798
82830
|
handleSkipForward = _a.handleSkipForward,
|
|
82799
82831
|
isNextVideo = _a.isNextVideo,
|
|
82800
82832
|
isPreviousVideo = _a.isPreviousVideo,
|
|
82801
|
-
showFavorite = _a.showFavorite
|
|
82833
|
+
showFavorite = _a.showFavorite,
|
|
82834
|
+
showDownload = _a.showDownload,
|
|
82835
|
+
downloadUrl = _a.downloadUrl,
|
|
82836
|
+
downloadFileName = _a.downloadFileName,
|
|
82837
|
+
onDownload = _a.onDownload;
|
|
82838
|
+
var handleDownloadClick = function handleDownloadClick() {
|
|
82839
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
82840
|
+
var response, blob, blobUrl, link, error_1, link;
|
|
82841
|
+
return __generator(this, function (_a) {
|
|
82842
|
+
switch (_a.label) {
|
|
82843
|
+
case 0:
|
|
82844
|
+
if (!onDownload) return [3 /*break*/, 1];
|
|
82845
|
+
onDownload();
|
|
82846
|
+
return [3 /*break*/, 6];
|
|
82847
|
+
case 1:
|
|
82848
|
+
if (!downloadUrl) return [3 /*break*/, 6];
|
|
82849
|
+
_a.label = 2;
|
|
82850
|
+
case 2:
|
|
82851
|
+
_a.trys.push([2, 5,, 6]);
|
|
82852
|
+
return [4 /*yield*/, fetch(downloadUrl)];
|
|
82853
|
+
case 3:
|
|
82854
|
+
response = _a.sent();
|
|
82855
|
+
if (!response.ok) throw new Error('Download failed');
|
|
82856
|
+
return [4 /*yield*/, response.blob()];
|
|
82857
|
+
case 4:
|
|
82858
|
+
blob = _a.sent();
|
|
82859
|
+
blobUrl = window.URL.createObjectURL(blob);
|
|
82860
|
+
link = document.createElement('a');
|
|
82861
|
+
link.href = blobUrl;
|
|
82862
|
+
link.download = downloadFileName || 'video-download';
|
|
82863
|
+
link.style.display = 'none';
|
|
82864
|
+
document.body.appendChild(link);
|
|
82865
|
+
link.click();
|
|
82866
|
+
document.body.removeChild(link);
|
|
82867
|
+
// Clean up blob URL
|
|
82868
|
+
window.URL.revokeObjectURL(blobUrl);
|
|
82869
|
+
return [3 /*break*/, 6];
|
|
82870
|
+
case 5:
|
|
82871
|
+
error_1 = _a.sent();
|
|
82872
|
+
console.error('Download failed:', error_1);
|
|
82873
|
+
link = document.createElement('a');
|
|
82874
|
+
link.href = downloadUrl;
|
|
82875
|
+
link.download = downloadFileName || 'video-download';
|
|
82876
|
+
link.style.display = 'none';
|
|
82877
|
+
document.body.appendChild(link);
|
|
82878
|
+
link.click();
|
|
82879
|
+
document.body.removeChild(link);
|
|
82880
|
+
return [3 /*break*/, 6];
|
|
82881
|
+
case 6:
|
|
82882
|
+
return [2 /*return*/];
|
|
82883
|
+
}
|
|
82884
|
+
});
|
|
82885
|
+
});
|
|
82886
|
+
};
|
|
82802
82887
|
return jsxRuntimeExports.jsxs(StyledControls, {
|
|
82803
82888
|
children: [jsxRuntimeExports.jsx(StyledSlider, {
|
|
82804
82889
|
type: 'range',
|
|
@@ -82848,6 +82933,10 @@ var Controls = function Controls(_a) {
|
|
|
82848
82933
|
active: isFavorite,
|
|
82849
82934
|
onClick: toggleIsFavorite
|
|
82850
82935
|
})
|
|
82936
|
+
}), showDownload && downloadUrl && jsxRuntimeExports.jsx(StyledDownloadIconContainer, {
|
|
82937
|
+
children: jsxRuntimeExports.jsx(DownloadIcon, {
|
|
82938
|
+
onClick: handleDownloadClick
|
|
82939
|
+
})
|
|
82851
82940
|
}), jsxRuntimeExports.jsx(PlaybackSpeedMenu, {
|
|
82852
82941
|
playbackSpeed: playbackRate,
|
|
82853
82942
|
onPlaybackSpeedChange: function onPlaybackSpeedChange(speed) {
|
|
@@ -88710,13 +88799,18 @@ function usePlayerControls(_a) {
|
|
|
88710
88799
|
var duration = videoPlayerRef.current ? videoPlayerRef.current.getDuration() : 0;
|
|
88711
88800
|
var formatCurrentTime = FormatSecondsToTimeString(currentTime);
|
|
88712
88801
|
var formatDuration = FormatSecondsToTimeString(duration);
|
|
88802
|
+
// Using previous method for old videos(we used to parse subtitles via link)
|
|
88713
88803
|
React.useEffect(function () {
|
|
88714
|
-
|
|
88715
|
-
|
|
88716
|
-
|
|
88717
|
-
|
|
88718
|
-
|
|
88719
|
-
|
|
88804
|
+
if (subtitleUrl) {
|
|
88805
|
+
fetch(subtitleUrl).then(function (response) {
|
|
88806
|
+
return response.text();
|
|
88807
|
+
}).then(function (content) {
|
|
88808
|
+
var parsedSubtitles = parseVTT(content);
|
|
88809
|
+
setSubtitles(parsedSubtitles);
|
|
88810
|
+
})["catch"](function (error) {
|
|
88811
|
+
console.error('Error fetching external subtitles:', error);
|
|
88812
|
+
});
|
|
88813
|
+
}
|
|
88720
88814
|
}, [subtitleUrl]);
|
|
88721
88815
|
React.useEffect(function () {
|
|
88722
88816
|
var handleFullscreenChange = function handleFullscreenChange() {
|
|
@@ -88747,8 +88841,9 @@ function usePlayerControls(_a) {
|
|
|
88747
88841
|
}, [videoPlayerRef]);
|
|
88748
88842
|
var progressHandler = React.useCallback(function (state) {
|
|
88749
88843
|
return __awaiter(_this, void 0, void 0, function () {
|
|
88750
|
-
var currentSubtitleEntry, i, sub, i, sub, currentTime_1, now;
|
|
88751
|
-
|
|
88844
|
+
var videoElement, hasHLSSubtitles, currentSubtitleEntry, i, sub, i, sub, currentTime_1, now;
|
|
88845
|
+
var _a, _b;
|
|
88846
|
+
return __generator(this, function (_c) {
|
|
88752
88847
|
if (count > 2) {
|
|
88753
88848
|
if (controlRef.current) {
|
|
88754
88849
|
controlRef.current.style.visibility = 'hidden';
|
|
@@ -88757,44 +88852,47 @@ function usePlayerControls(_a) {
|
|
|
88757
88852
|
} else if (controlRef.current && controlRef.current.style.visibility === 'visible' && isControlsActive) {
|
|
88758
88853
|
count += 1;
|
|
88759
88854
|
}
|
|
88760
|
-
|
|
88761
|
-
|
|
88762
|
-
|
|
88763
|
-
|
|
88764
|
-
|
|
88765
|
-
|
|
88766
|
-
|
|
88767
|
-
|
|
88768
|
-
|
|
88855
|
+
videoElement = (_a = videoPlayerRef.current) === null || _a === void 0 ? void 0 : _a.getInternalPlayer();
|
|
88856
|
+
hasHLSSubtitles = ((_b = videoElement === null || videoElement === void 0 ? void 0 : videoElement.textTracks) === null || _b === void 0 ? void 0 : _b.length) > 0;
|
|
88857
|
+
if (subtitles.length > 0 && !hasHLSSubtitles && isSubtitlesChecked) {
|
|
88858
|
+
currentSubtitleEntry = void 0;
|
|
88859
|
+
if (lastSubtitleIndexRef.current !== null) {
|
|
88860
|
+
if (state.playedSeconds > lastPlaybackTimeRef.current) {
|
|
88861
|
+
for (i = lastSubtitleIndexRef.current; i < subtitles.length; i++) {
|
|
88862
|
+
sub = subtitles[i];
|
|
88863
|
+
if (state.playedSeconds >= sub.start && state.playedSeconds <= sub.end) {
|
|
88864
|
+
currentSubtitleEntry = sub;
|
|
88865
|
+
lastSubtitleIndexRef.current = i;
|
|
88866
|
+
break;
|
|
88867
|
+
}
|
|
88769
88868
|
}
|
|
88770
|
-
}
|
|
88771
|
-
|
|
88772
|
-
|
|
88773
|
-
|
|
88774
|
-
|
|
88775
|
-
|
|
88776
|
-
|
|
88777
|
-
|
|
88778
|
-
break;
|
|
88869
|
+
} else {
|
|
88870
|
+
for (i = lastSubtitleIndexRef.current; i >= 0; i--) {
|
|
88871
|
+
sub = subtitles[i];
|
|
88872
|
+
if (state.playedSeconds >= sub.start && state.playedSeconds <= sub.end) {
|
|
88873
|
+
currentSubtitleEntry = sub;
|
|
88874
|
+
lastSubtitleIndexRef.current = i;
|
|
88875
|
+
break;
|
|
88876
|
+
}
|
|
88779
88877
|
}
|
|
88780
88878
|
}
|
|
88781
88879
|
}
|
|
88782
|
-
|
|
88783
|
-
|
|
88784
|
-
|
|
88785
|
-
|
|
88786
|
-
|
|
88880
|
+
if (!currentSubtitleEntry) {
|
|
88881
|
+
currentSubtitleEntry = subtitles.find(function (sub) {
|
|
88882
|
+
return state.playedSeconds >= sub.start && state.playedSeconds <= sub.end;
|
|
88883
|
+
});
|
|
88884
|
+
if (currentSubtitleEntry) {
|
|
88885
|
+
lastSubtitleIndexRef.current = subtitles.indexOf(currentSubtitleEntry);
|
|
88886
|
+
}
|
|
88887
|
+
}
|
|
88888
|
+
lastPlaybackTimeRef.current = state.playedSeconds;
|
|
88787
88889
|
if (currentSubtitleEntry) {
|
|
88788
|
-
|
|
88890
|
+
setCurrentSubtitle(currentSubtitleEntry.text);
|
|
88891
|
+
} else {
|
|
88892
|
+
setCurrentSubtitle(''); // Clear subtitle if none should be displayed
|
|
88893
|
+
lastSubtitleIndexRef.current = null;
|
|
88789
88894
|
}
|
|
88790
88895
|
}
|
|
88791
|
-
lastPlaybackTimeRef.current = state.playedSeconds;
|
|
88792
|
-
if (currentSubtitleEntry) {
|
|
88793
|
-
setCurrentSubtitle(currentSubtitleEntry.text);
|
|
88794
|
-
} else {
|
|
88795
|
-
setCurrentSubtitle(''); // Clear subtitle if none should be displayed
|
|
88796
|
-
lastSubtitleIndexRef.current = null;
|
|
88797
|
-
}
|
|
88798
88896
|
if (!seeking) {
|
|
88799
88897
|
setVideoState(function (prev) {
|
|
88800
88898
|
return __assign(__assign({}, prev), state);
|
|
@@ -88810,7 +88908,7 @@ function usePlayerControls(_a) {
|
|
|
88810
88908
|
return [2 /*return*/];
|
|
88811
88909
|
});
|
|
88812
88910
|
});
|
|
88813
|
-
}, [seeking, handleTrackProgress, isControlsActive, subtitles]);
|
|
88911
|
+
}, [seeking, handleTrackProgress, isControlsActive, subtitles, isSubtitlesChecked]);
|
|
88814
88912
|
var seekHandler = function seekHandler(e) {
|
|
88815
88913
|
var v = parseFloat(e.target.value) / 100;
|
|
88816
88914
|
setVideoState(function (prev) {
|
|
@@ -88822,7 +88920,7 @@ function usePlayerControls(_a) {
|
|
|
88822
88920
|
videoPlayerRef.current.seekTo(v);
|
|
88823
88921
|
}
|
|
88824
88922
|
};
|
|
88825
|
-
var seekMouseUpHandler = function seekMouseUpHandler(
|
|
88923
|
+
var seekMouseUpHandler = function seekMouseUpHandler() {
|
|
88826
88924
|
setVideoState(function (prev) {
|
|
88827
88925
|
return __assign(__assign({}, prev), {
|
|
88828
88926
|
seeking: false
|
|
@@ -88861,7 +88959,7 @@ function usePlayerControls(_a) {
|
|
|
88861
88959
|
});
|
|
88862
88960
|
}
|
|
88863
88961
|
};
|
|
88864
|
-
var onSeekMouseDownHandler = function onSeekMouseDownHandler(
|
|
88962
|
+
var onSeekMouseDownHandler = function onSeekMouseDownHandler() {
|
|
88865
88963
|
setVideoState(function (prev) {
|
|
88866
88964
|
return __assign(__assign({}, prev), {
|
|
88867
88965
|
seeking: true
|
|
@@ -89001,14 +89099,89 @@ function usePlayerControls(_a) {
|
|
|
89001
89099
|
isFullscreen: isFullscreen,
|
|
89002
89100
|
isControlsActive: isControlsActive,
|
|
89003
89101
|
currentSubtitle: currentSubtitle,
|
|
89102
|
+
setCurrentSubtitle: setCurrentSubtitle,
|
|
89004
89103
|
playing: isPlaying
|
|
89005
89104
|
};
|
|
89006
89105
|
}
|
|
89007
89106
|
|
|
89107
|
+
var useHLSSubtitles = function useHLSSubtitles(_a) {
|
|
89108
|
+
var videoPlayerRef = _a.videoPlayerRef,
|
|
89109
|
+
isSubtitlesChecked = _a.isSubtitlesChecked,
|
|
89110
|
+
setCurrentSubtitle = _a.setCurrentSubtitle;
|
|
89111
|
+
var hlsSubtitleTrackRef = React.useRef(null);
|
|
89112
|
+
var extractHLSSubtitleText = React.useCallback(function () {
|
|
89113
|
+
var _a;
|
|
89114
|
+
var videoElement = (_a = videoPlayerRef.current) === null || _a === void 0 ? void 0 : _a.getInternalPlayer();
|
|
89115
|
+
if (!videoElement || !videoElement.textTracks) return;
|
|
89116
|
+
var _loop_1 = function _loop_1(i) {
|
|
89117
|
+
var track = videoElement.textTracks[i];
|
|
89118
|
+
if (track.kind === 'subtitles' || track.kind === 'captions') {
|
|
89119
|
+
hlsSubtitleTrackRef.current = track;
|
|
89120
|
+
var handleCueChange = function handleCueChange() {
|
|
89121
|
+
if (isSubtitlesChecked && track.activeCues && track.activeCues.length > 0) {
|
|
89122
|
+
var currentCue = track.activeCues[0];
|
|
89123
|
+
if (currentCue && currentCue.text) {
|
|
89124
|
+
setCurrentSubtitle(currentCue.text);
|
|
89125
|
+
}
|
|
89126
|
+
} else if (isSubtitlesChecked) {
|
|
89127
|
+
setCurrentSubtitle('');
|
|
89128
|
+
}
|
|
89129
|
+
};
|
|
89130
|
+
track.removeEventListener('cuechange', handleCueChange);
|
|
89131
|
+
track.addEventListener('cuechange', handleCueChange);
|
|
89132
|
+
track.mode = isSubtitlesChecked ? 'showing' : 'hidden';
|
|
89133
|
+
return "break";
|
|
89134
|
+
}
|
|
89135
|
+
};
|
|
89136
|
+
for (var i = 0; i < videoElement.textTracks.length; i++) {
|
|
89137
|
+
var state_1 = _loop_1(i);
|
|
89138
|
+
if (state_1 === "break") break;
|
|
89139
|
+
}
|
|
89140
|
+
}, [isSubtitlesChecked, setCurrentSubtitle, videoPlayerRef]);
|
|
89141
|
+
var setupHLSSubtitleTracking = React.useCallback(function () {
|
|
89142
|
+
var _a;
|
|
89143
|
+
var videoElement = (_a = videoPlayerRef.current) === null || _a === void 0 ? void 0 : _a.getInternalPlayer();
|
|
89144
|
+
if (!videoElement) return;
|
|
89145
|
+
videoElement.classList.add('hls-video-player');
|
|
89146
|
+
var _checkTextTracks = function checkTextTracks(attempt) {
|
|
89147
|
+
if (attempt === void 0) {
|
|
89148
|
+
attempt = 0;
|
|
89149
|
+
}
|
|
89150
|
+
var textTracks = videoElement.textTracks;
|
|
89151
|
+
if (textTracks && textTracks.length > 0) {
|
|
89152
|
+
extractHLSSubtitleText();
|
|
89153
|
+
} else if (attempt < 5) {
|
|
89154
|
+
setTimeout(function () {
|
|
89155
|
+
return _checkTextTracks(attempt + 1);
|
|
89156
|
+
}, 300 * (attempt + 1));
|
|
89157
|
+
}
|
|
89158
|
+
};
|
|
89159
|
+
_checkTextTracks();
|
|
89160
|
+
videoElement.addEventListener('loadedmetadata', function () {
|
|
89161
|
+
_checkTextTracks();
|
|
89162
|
+
});
|
|
89163
|
+
}, [extractHLSSubtitleText, videoPlayerRef]);
|
|
89164
|
+
React.useEffect(function () {
|
|
89165
|
+
extractHLSSubtitleText();
|
|
89166
|
+
}, [isSubtitlesChecked, extractHLSSubtitleText]);
|
|
89167
|
+
React.useEffect(function () {
|
|
89168
|
+
var _a;
|
|
89169
|
+
var videoElement = (_a = videoPlayerRef.current) === null || _a === void 0 ? void 0 : _a.getInternalPlayer();
|
|
89170
|
+
if (videoElement && videoElement.textTracks && videoElement.textTracks.length > 0) {
|
|
89171
|
+
extractHLSSubtitleText();
|
|
89172
|
+
}
|
|
89173
|
+
}, [videoPlayerRef.current, extractHLSSubtitleText]);
|
|
89174
|
+
return {
|
|
89175
|
+
extractHLSSubtitleText: extractHLSSubtitleText,
|
|
89176
|
+
setupHLSSubtitleTracking: setupHLSSubtitleTracking
|
|
89177
|
+
};
|
|
89178
|
+
};
|
|
89179
|
+
|
|
89008
89180
|
var VideoPlayer = function VideoPlayer(_a) {
|
|
89181
|
+
var _b, _c, _d;
|
|
89009
89182
|
var customStyles = _a.customStyles,
|
|
89010
|
-
|
|
89011
|
-
startTime =
|
|
89183
|
+
_e = _a.startTime,
|
|
89184
|
+
startTime = _e === void 0 ? 0 : _e,
|
|
89012
89185
|
loading = _a.loading,
|
|
89013
89186
|
setLoading = _a.setLoading,
|
|
89014
89187
|
handleTrackProgress = _a.handleTrackProgress,
|
|
@@ -89020,20 +89193,25 @@ var VideoPlayer = function VideoPlayer(_a) {
|
|
|
89020
89193
|
isPreviousVideo = _a.isPreviousVideo,
|
|
89021
89194
|
isPlaying = _a.isPlaying,
|
|
89022
89195
|
setIsPlaying = _a.setIsPlaying,
|
|
89023
|
-
|
|
89024
|
-
shouldPlayerBeFocusedOnSpaceClick =
|
|
89196
|
+
_f = _a.shouldPlayerBeFocusedOnSpaceClick,
|
|
89197
|
+
shouldPlayerBeFocusedOnSpaceClick = _f === void 0 ? false : _f,
|
|
89025
89198
|
showFavorite = _a.showFavorite,
|
|
89026
|
-
|
|
89027
|
-
isFavorite =
|
|
89028
|
-
|
|
89029
|
-
toggleFavorite =
|
|
89199
|
+
_g = _a.isFavorite,
|
|
89200
|
+
isFavorite = _g === void 0 ? false : _g,
|
|
89201
|
+
_h = _a.toggleFavorite,
|
|
89202
|
+
toggleFavorite = _h === void 0 ? function () {
|
|
89030
89203
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
89031
89204
|
return __generator(this, function (_a) {
|
|
89032
89205
|
return [2 /*return*/];
|
|
89033
89206
|
});
|
|
89034
89207
|
});
|
|
89035
|
-
} :
|
|
89036
|
-
|
|
89208
|
+
} : _h,
|
|
89209
|
+
showDownload = _a.showDownload,
|
|
89210
|
+
downloadUrl = _a.downloadUrl,
|
|
89211
|
+
downloadFileName = _a.downloadFileName,
|
|
89212
|
+
onDownload = _a.onDownload;
|
|
89213
|
+
var videoRef = React.useRef(null);
|
|
89214
|
+
var _j = usePlayerControls({
|
|
89037
89215
|
startTime: startTime,
|
|
89038
89216
|
setLoading: setLoading,
|
|
89039
89217
|
handleTrackProgress: handleTrackProgress,
|
|
@@ -89043,38 +89221,55 @@ var VideoPlayer = function VideoPlayer(_a) {
|
|
|
89043
89221
|
setIsPlaying: setIsPlaying,
|
|
89044
89222
|
shouldPlayerBeFocusedOnSpaceClick: shouldPlayerBeFocusedOnSpaceClick
|
|
89045
89223
|
}),
|
|
89046
|
-
mouseMoveHandler =
|
|
89047
|
-
playerContainerRef =
|
|
89048
|
-
playPauseHandler =
|
|
89049
|
-
handleFullScreen =
|
|
89050
|
-
videoPlayerRef =
|
|
89051
|
-
playing =
|
|
89052
|
-
volume =
|
|
89053
|
-
muted =
|
|
89054
|
-
progressHandler =
|
|
89055
|
-
bufferStartHandler =
|
|
89056
|
-
bufferEndHandler =
|
|
89057
|
-
onPlayerStart =
|
|
89058
|
-
setVideoState =
|
|
89059
|
-
playbackRate =
|
|
89060
|
-
controlRef =
|
|
89061
|
-
rewindHandler =
|
|
89062
|
-
handleFastForward =
|
|
89063
|
-
formatCurrentTime =
|
|
89064
|
-
played =
|
|
89065
|
-
onSeekMouseDownHandler =
|
|
89066
|
-
seekHandler =
|
|
89067
|
-
seekMouseUpHandler =
|
|
89068
|
-
muteHandler =
|
|
89069
|
-
volumeChangeHandler =
|
|
89070
|
-
formatDuration =
|
|
89071
|
-
isSubtitlesChecked =
|
|
89072
|
-
toggleSubtitlesCheck =
|
|
89073
|
-
isFullscreen =
|
|
89074
|
-
isControlsActive =
|
|
89075
|
-
currentSubtitle =
|
|
89076
|
-
|
|
89077
|
-
var
|
|
89224
|
+
mouseMoveHandler = _j.mouseMoveHandler,
|
|
89225
|
+
playerContainerRef = _j.playerContainerRef,
|
|
89226
|
+
playPauseHandler = _j.playPauseHandler,
|
|
89227
|
+
handleFullScreen = _j.handleFullScreen,
|
|
89228
|
+
videoPlayerRef = _j.videoPlayerRef,
|
|
89229
|
+
playing = _j.playing,
|
|
89230
|
+
volume = _j.volume,
|
|
89231
|
+
muted = _j.muted,
|
|
89232
|
+
progressHandler = _j.progressHandler,
|
|
89233
|
+
bufferStartHandler = _j.bufferStartHandler,
|
|
89234
|
+
bufferEndHandler = _j.bufferEndHandler,
|
|
89235
|
+
onPlayerStart = _j.onPlayerStart,
|
|
89236
|
+
setVideoState = _j.setVideoState,
|
|
89237
|
+
playbackRate = _j.playbackRate,
|
|
89238
|
+
controlRef = _j.controlRef,
|
|
89239
|
+
rewindHandler = _j.rewindHandler,
|
|
89240
|
+
handleFastForward = _j.handleFastForward,
|
|
89241
|
+
formatCurrentTime = _j.formatCurrentTime,
|
|
89242
|
+
played = _j.played,
|
|
89243
|
+
onSeekMouseDownHandler = _j.onSeekMouseDownHandler,
|
|
89244
|
+
seekHandler = _j.seekHandler,
|
|
89245
|
+
seekMouseUpHandler = _j.seekMouseUpHandler,
|
|
89246
|
+
muteHandler = _j.muteHandler,
|
|
89247
|
+
volumeChangeHandler = _j.volumeChangeHandler,
|
|
89248
|
+
formatDuration = _j.formatDuration,
|
|
89249
|
+
isSubtitlesChecked = _j.isSubtitlesChecked,
|
|
89250
|
+
toggleSubtitlesCheck = _j.toggleSubtitlesCheck,
|
|
89251
|
+
isFullscreen = _j.isFullscreen,
|
|
89252
|
+
isControlsActive = _j.isControlsActive,
|
|
89253
|
+
currentSubtitle = _j.currentSubtitle,
|
|
89254
|
+
setCurrentSubtitle = _j.setCurrentSubtitle;
|
|
89255
|
+
var setupHLSSubtitleTracking = useHLSSubtitles({
|
|
89256
|
+
videoPlayerRef: videoPlayerRef,
|
|
89257
|
+
isSubtitlesChecked: isSubtitlesChecked,
|
|
89258
|
+
setCurrentSubtitle: setCurrentSubtitle
|
|
89259
|
+
}).setupHLSSubtitleTracking;
|
|
89260
|
+
React.useEffect(function () {
|
|
89261
|
+
var cleanup = injectHLSSubtitleStyles();
|
|
89262
|
+
return cleanup;
|
|
89263
|
+
}, []);
|
|
89264
|
+
var handlePlayerReady = function handlePlayerReady() {
|
|
89265
|
+
var _a;
|
|
89266
|
+
onPlayerStart();
|
|
89267
|
+
setupHLSSubtitleTracking();
|
|
89268
|
+
var videoElement = (_a = videoPlayerRef.current) === null || _a === void 0 ? void 0 : _a.getInternalPlayer();
|
|
89269
|
+
if (videoElement && videoElement instanceof HTMLVideoElement) {
|
|
89270
|
+
videoRef.current = videoElement;
|
|
89271
|
+
}
|
|
89272
|
+
};
|
|
89078
89273
|
return jsxRuntimeExports.jsxs(StyledWrapper, {
|
|
89079
89274
|
tabIndex: 0,
|
|
89080
89275
|
onMouseMove: mouseMoveHandler,
|
|
@@ -89083,12 +89278,11 @@ var VideoPlayer = function VideoPlayer(_a) {
|
|
|
89083
89278
|
onClick: function onClick(e) {
|
|
89084
89279
|
return e.stopPropagation();
|
|
89085
89280
|
},
|
|
89086
|
-
|
|
89087
|
-
children: [jsxRuntimeExports.jsx(StyledVideoPlayerWrapper, {
|
|
89281
|
+
children: [jsxRuntimeExports.jsxs(StyledVideoPlayerWrapper, {
|
|
89088
89282
|
onClick: playPauseHandler,
|
|
89089
89283
|
onDoubleClick: handleFullScreen,
|
|
89090
|
-
children: jsxRuntimeExports.jsx(ReactPlayer, {
|
|
89091
|
-
url:
|
|
89284
|
+
children: [jsxRuntimeExports.jsx(ReactPlayer, {
|
|
89285
|
+
url: url,
|
|
89092
89286
|
ref: videoPlayerRef,
|
|
89093
89287
|
className: 'react-player',
|
|
89094
89288
|
width: '100%',
|
|
@@ -89099,7 +89293,7 @@ var VideoPlayer = function VideoPlayer(_a) {
|
|
|
89099
89293
|
onProgress: progressHandler,
|
|
89100
89294
|
onBuffer: bufferStartHandler,
|
|
89101
89295
|
onBufferEnd: bufferEndHandler,
|
|
89102
|
-
onReady:
|
|
89296
|
+
onReady: handlePlayerReady,
|
|
89103
89297
|
onPlay: function onPlay() {
|
|
89104
89298
|
return setIsPlaying(true);
|
|
89105
89299
|
},
|
|
@@ -89127,13 +89321,16 @@ var VideoPlayer = function VideoPlayer(_a) {
|
|
|
89127
89321
|
file: {
|
|
89128
89322
|
hlsOptions: {
|
|
89129
89323
|
autoStartLoad: true,
|
|
89130
|
-
renderTextTracksNatively:
|
|
89324
|
+
renderTextTracksNatively: true
|
|
89131
89325
|
}
|
|
89132
89326
|
}
|
|
89133
89327
|
}
|
|
89134
|
-
},
|
|
89135
|
-
|
|
89136
|
-
|
|
89328
|
+
}, url), loading && jsxRuntimeExports.jsx(StyledPlayerLoader, {
|
|
89329
|
+
children: jsxRuntimeExports.jsx(StyledLoader, {})
|
|
89330
|
+
}), isSubtitlesChecked && currentSubtitle && jsxRuntimeExports.jsx(StyledSubtitles, {
|
|
89331
|
+
"$controls": isControlsActive,
|
|
89332
|
+
children: currentSubtitle
|
|
89333
|
+
})]
|
|
89137
89334
|
}), jsxRuntimeExports.jsx(StyledControlsContainer, {
|
|
89138
89335
|
ref: controlRef,
|
|
89139
89336
|
children: jsxRuntimeExports.jsx(Controls, {
|
|
@@ -89159,16 +89356,17 @@ var VideoPlayer = function VideoPlayer(_a) {
|
|
|
89159
89356
|
isFavorite: isFavorite,
|
|
89160
89357
|
toggleIsFavorite: toggleFavorite,
|
|
89161
89358
|
isFullscreen: isFullscreen,
|
|
89162
|
-
subtitle: !!subtitleUrl,
|
|
89359
|
+
subtitle: !!subtitleUrl || ((_d = (_c = (_b = videoPlayerRef.current) === null || _b === void 0 ? void 0 : _b.getInternalPlayer()) === null || _c === void 0 ? void 0 : _c.textTracks) === null || _d === void 0 ? void 0 : _d.length) > 0,
|
|
89163
89360
|
handleSkipBackward: handlePreviousVideo,
|
|
89164
89361
|
handleSkipForward: handleNextVideo,
|
|
89165
89362
|
isNextVideo: isNextVideo,
|
|
89166
89363
|
isPreviousVideo: isPreviousVideo,
|
|
89167
|
-
showFavorite: showFavorite
|
|
89364
|
+
showFavorite: showFavorite,
|
|
89365
|
+
showDownload: showDownload,
|
|
89366
|
+
downloadUrl: downloadUrl,
|
|
89367
|
+
downloadFileName: downloadFileName,
|
|
89368
|
+
onDownload: onDownload
|
|
89168
89369
|
})
|
|
89169
|
-
}), isSubtitlesChecked && currentSubtitle && jsxRuntimeExports.jsx(StyledSubtitles, {
|
|
89170
|
-
"$controls": isControlsActive,
|
|
89171
|
-
children: currentSubtitle
|
|
89172
89370
|
})]
|
|
89173
89371
|
});
|
|
89174
89372
|
};
|