suada-components 1.9.0 → 1.9.1
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/DailyMotion-B7yDPBbg.js → DailyMotion-B-Q4fBEb.js} +1 -1
- package/dist/{components/DailyMotion-BmnymjR1.esm.js → DailyMotion-BAvo3Toe.esm.js} +1 -1
- package/dist/{components/Facebook-D9Ak6ZJU.esm.js → Facebook-C8GOujDt.esm.js} +1 -1
- package/dist/{components/Facebook-42iqQU2G.js → Facebook-CASik-P5.js} +1 -1
- package/dist/{components/FilePlayer-wg9lyafD.esm.js → FilePlayer-BOZIvaDy.esm.js} +1 -1
- package/dist/{components/FilePlayer-CAnHK0Cd.js → FilePlayer-CQ80KWY2.js} +1 -1
- package/dist/{components/Kaltura-DPaEN-dq.esm.js → Kaltura-B12Xdl6X.esm.js} +1 -1
- package/dist/{components/Kaltura-Ct6kwbgP.js → Kaltura-nYc5k7UB.js} +1 -1
- package/dist/{components/Mixcloud-sBbcL5rG.js → Mixcloud-DGQnlDAK.js} +1 -1
- package/dist/{components/Mixcloud-BobSN3YI.esm.js → Mixcloud-JfeQIOki.esm.js} +1 -1
- package/dist/{components/Mux-B9YP-rFr.esm.js → Mux-BHWzpAR-.esm.js} +1 -1
- package/dist/{components/Mux-Cosy8sFO.js → Mux-CiKZc8gj.js} +1 -1
- package/dist/{components/Preview-XcTlhHT1.esm.js → Preview-DSovY9gr.esm.js} +1 -1
- package/dist/{components/Preview-DiVfo6aa.js → Preview-DvZKrgm5.js} +1 -1
- package/dist/{components/SoundCloud-CIWqB-QW.js → SoundCloud-Di7z3nmP.js} +1 -1
- package/dist/{components/SoundCloud-BTHoyFWT.esm.js → SoundCloud-j_R0lK8D.esm.js} +1 -1
- package/dist/{components/Streamable-DsfQCy3p.esm.js → Streamable-CRhXZIKP.esm.js} +1 -1
- package/dist/{components/Streamable-9anYiQtU.js → Streamable-CV1mgzRv.js} +1 -1
- package/dist/{components/Twitch-D1BOr8hj.esm.js → Twitch-6icfp-ZE.esm.js} +1 -1
- package/dist/{components/Twitch-Dud6e1Rv.js → Twitch-Dj66vkCD.js} +1 -1
- package/dist/{components/Vidyard-C1csjpQH.esm.js → Vidyard--KX47pZ0.esm.js} +1 -1
- package/dist/{components/Vidyard-BuOu85uS.js → Vidyard-B-qmApe9.js} +1 -1
- package/dist/{components/Vimeo-CHlHIswX.esm.js → Vimeo-Ba9C6utC.esm.js} +1 -1
- package/dist/{components/Vimeo-DrDJ5O9H.js → Vimeo-DePzl7Sn.js} +1 -1
- package/dist/{components/Wistia-fh9U2CA2.js → Wistia-CXYB3Yus.js} +1 -1
- package/dist/{components/Wistia-D-eYyONb.esm.js → Wistia-DWJcdcY2.esm.js} +1 -1
- package/dist/{components/YouTube-CmnnzZvk.esm.js → YouTube-DdBVPxzz.esm.js} +1 -1
- package/dist/{components/YouTube-DC2uZ14c.js → YouTube-vwMoW93C.js} +1 -1
- package/dist/components/CourseCard/CourseCard.styles.d.ts +1 -1
- package/dist/components/DailyMotion-Cr_8IZRR.js +180 -0
- package/dist/components/DailyMotion-D2n1NDDi.esm.js +178 -0
- package/dist/components/Facebook-CDrTA2_L.esm.js +179 -0
- package/dist/components/Facebook-YxZce26V.js +181 -0
- package/dist/components/FilePlayer-BzkVMbQ8.esm.js +408 -0
- package/dist/components/FilePlayer-DqqTufgX.js +410 -0
- package/dist/components/Kaltura-B0UZLr6g.esm.js +176 -0
- package/dist/components/Kaltura-krSxvIBr.js +178 -0
- package/dist/components/Mixcloud-BCT5e47d.js +166 -0
- package/dist/components/Mixcloud-D9qk3D6i.esm.js +164 -0
- package/dist/components/Mux-BZleoaJh.esm.js +264 -0
- package/dist/components/Mux-D_si09u2.js +266 -0
- package/dist/components/Preview-CmduMeEZ.js +175 -0
- package/dist/components/Preview-DQLbQ8_C.esm.js +173 -0
- package/dist/components/SoundCloud-BHgTfaW7.js +183 -0
- package/dist/components/SoundCloud-BgnX8kOF.esm.js +181 -0
- package/dist/components/Streamable-DTAzjVwd.js +176 -0
- package/dist/components/Streamable-DbRbUflP.esm.js +174 -0
- package/dist/components/Twitch-CXOhay4a.esm.js +168 -0
- package/dist/components/Twitch-CnEk-l9R.js +170 -0
- package/dist/components/VideoPlayer/PiPContext.d.ts +8 -0
- package/dist/components/VideoPlayer/PiPContext.js +149 -0
- package/dist/components/VideoPlayer/PiPContext.js.map +1 -0
- package/dist/components/VideoPlayer/PiPContext.types.d.ts +16 -0
- package/dist/components/VideoPlayer/PiPContext.types.js +2 -0
- package/dist/components/VideoPlayer/PiPContext.types.js.map +1 -0
- package/dist/components/VideoPlayer/usePiP.d.ts +2 -0
- package/dist/components/VideoPlayer/usePiP.js +10 -0
- package/dist/components/VideoPlayer/usePiP.js.map +1 -0
- package/dist/components/VideoPlayer/usePlayerControls.js +12 -40
- package/dist/components/VideoPlayer/usePlayerControls.js.map +1 -1
- package/dist/components/Vidyard-Cn_LcGwi.js +174 -0
- package/dist/components/Vidyard-YcZH6kkW.esm.js +172 -0
- package/dist/components/Vimeo-BUVxWt7t.js +215 -0
- package/dist/components/Vimeo-Cv0qx3aR.esm.js +213 -0
- package/dist/components/Wistia-COWrV8QC.js +190 -0
- package/dist/components/Wistia-PneZ48dn.esm.js +188 -0
- package/dist/components/YouTube-BUyvzJQw.esm.js +258 -0
- package/dist/components/YouTube-DeQdfkWm.js +260 -0
- package/dist/components/components/CourseCard/CourseCard.styles.d.ts +1 -1
- package/dist/components/components/VideoPlayer/PiPContext.d.ts +8 -0
- package/dist/components/components/VideoPlayer/PiPContext.types.d.ts +16 -0
- package/dist/components/components/VideoPlayer/usePiP.d.ts +2 -0
- package/dist/components/components/index.d.ts +2 -0
- package/dist/components/{index-DetZ05pw.js → index-Bs-XxxV4.js} +153 -304
- package/dist/components/{index-DKAGRUEW.esm.js → index-C4Mk2H3N.esm.js} +152 -305
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/icons/components/CourseCard/CourseCard.styles.d.ts +1 -1
- package/dist/icons/components/VideoPlayer/PiPContext.d.ts +8 -0
- package/dist/icons/components/VideoPlayer/PiPContext.types.d.ts +16 -0
- package/dist/icons/components/VideoPlayer/usePiP.d.ts +2 -0
- package/dist/icons/components/index.d.ts +2 -0
- package/dist/index-Bp-idbg5.esm.js +94907 -0
- package/dist/index-CSj9NYxJ.js +95129 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +3 -3
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/VideoPlayer/pipManager.d.ts +0 -60
- package/dist/components/VideoPlayer/pipManager.js +0 -272
- package/dist/components/VideoPlayer/pipManager.js.map +0 -1
- package/dist/components/components/VideoPlayer/pipManager.d.ts +0 -60
- package/dist/icons/components/VideoPlayer/pipManager.d.ts +0 -60
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-Bp-idbg5.esm.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
function _mergeNamespaces(n, m) {
|
|
@@ -4,7 +4,7 @@ export declare const GridItemTitle: import("styled-components/dist/types").IStyl
|
|
|
4
4
|
export declare const DeleteSpan: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
5
5
|
export declare const DisabledTypography: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
6
6
|
ref?: ((instance: HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
7
|
-
}, "children" | "className" | "p" | "
|
|
7
|
+
}, "children" | "className" | "p" | "style" | "color" | "height" | "width" | "display" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "align" | "bgcolor" | "border" | "classes" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "displayPrint" | "textOverflow" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "maxWidth" | "minWidth" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "lineHeight" | "textAlign" | "textTransform" | "gutterBottom" | "noWrap" | "paragraph" | "sx" | "variant" | "variantMapping">, never>> & string & Omit<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TypographyTypeMap<{}, "span">>, keyof import("react").Component<any, {}, any>>;
|
|
8
8
|
export declare const ActionConfig: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
$hoverColor?: string;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bs-XxxV4.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
|
|
6
|
+
function _mergeNamespaces(n, m) {
|
|
7
|
+
m.forEach(function (e) {
|
|
8
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
9
|
+
if (k !== 'default' && !(k in n)) {
|
|
10
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return e[k]; }
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
return Object.freeze(n);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var DailyMotion_1;
|
|
22
|
+
var hasRequiredDailyMotion;
|
|
23
|
+
|
|
24
|
+
function requireDailyMotion () {
|
|
25
|
+
if (hasRequiredDailyMotion) return DailyMotion_1;
|
|
26
|
+
hasRequiredDailyMotion = 1;
|
|
27
|
+
var __create = Object.create;
|
|
28
|
+
var __defProp = Object.defineProperty;
|
|
29
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
30
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
31
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
32
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
33
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34
|
+
var __export = (target, all) => {
|
|
35
|
+
for (var name in all)
|
|
36
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
37
|
+
};
|
|
38
|
+
var __copyProps = (to, from, except, desc) => {
|
|
39
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
40
|
+
for (let key of __getOwnPropNames(from))
|
|
41
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
42
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
43
|
+
}
|
|
44
|
+
return to;
|
|
45
|
+
};
|
|
46
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
47
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
48
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
49
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
50
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
51
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
52
|
+
mod
|
|
53
|
+
));
|
|
54
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
55
|
+
var __publicField = (obj, key, value) => {
|
|
56
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
57
|
+
return value;
|
|
58
|
+
};
|
|
59
|
+
var DailyMotion_exports = {};
|
|
60
|
+
__export(DailyMotion_exports, {
|
|
61
|
+
default: () => DailyMotion
|
|
62
|
+
});
|
|
63
|
+
DailyMotion_1 = __toCommonJS(DailyMotion_exports);
|
|
64
|
+
var import_react = __toESM(React);
|
|
65
|
+
var import_utils = /*@__PURE__*/ index.requireUtils();
|
|
66
|
+
var import_patterns = /*@__PURE__*/ index.requirePatterns();
|
|
67
|
+
const SDK_URL = "https://api.dmcdn.net/all.js";
|
|
68
|
+
const SDK_GLOBAL = "DM";
|
|
69
|
+
const SDK_GLOBAL_READY = "dmAsyncInit";
|
|
70
|
+
class DailyMotion extends import_react.Component {
|
|
71
|
+
constructor() {
|
|
72
|
+
super(...arguments);
|
|
73
|
+
__publicField(this, "callPlayer", import_utils.callPlayer);
|
|
74
|
+
__publicField(this, "onDurationChange", () => {
|
|
75
|
+
const duration = this.getDuration();
|
|
76
|
+
this.props.onDuration(duration);
|
|
77
|
+
});
|
|
78
|
+
__publicField(this, "mute", () => {
|
|
79
|
+
this.callPlayer("setMuted", true);
|
|
80
|
+
});
|
|
81
|
+
__publicField(this, "unmute", () => {
|
|
82
|
+
this.callPlayer("setMuted", false);
|
|
83
|
+
});
|
|
84
|
+
__publicField(this, "ref", (container) => {
|
|
85
|
+
this.container = container;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
componentDidMount() {
|
|
89
|
+
this.props.onMount && this.props.onMount(this);
|
|
90
|
+
}
|
|
91
|
+
load(url) {
|
|
92
|
+
const { controls, config, onError, playing } = this.props;
|
|
93
|
+
const [, id] = url.match(import_patterns.MATCH_URL_DAILYMOTION);
|
|
94
|
+
if (this.player) {
|
|
95
|
+
this.player.load(id, {
|
|
96
|
+
start: (0, import_utils.parseStartTime)(url),
|
|
97
|
+
autoplay: playing
|
|
98
|
+
});
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, (DM) => DM.player).then((DM) => {
|
|
102
|
+
if (!this.container)
|
|
103
|
+
return;
|
|
104
|
+
const Player = DM.player;
|
|
105
|
+
this.player = new Player(this.container, {
|
|
106
|
+
width: "100%",
|
|
107
|
+
height: "100%",
|
|
108
|
+
video: id,
|
|
109
|
+
params: {
|
|
110
|
+
controls,
|
|
111
|
+
autoplay: this.props.playing,
|
|
112
|
+
mute: this.props.muted,
|
|
113
|
+
start: (0, import_utils.parseStartTime)(url),
|
|
114
|
+
origin: window.location.origin,
|
|
115
|
+
...config.params
|
|
116
|
+
},
|
|
117
|
+
events: {
|
|
118
|
+
apiready: this.props.onReady,
|
|
119
|
+
seeked: () => this.props.onSeek(this.player.currentTime),
|
|
120
|
+
video_end: this.props.onEnded,
|
|
121
|
+
durationchange: this.onDurationChange,
|
|
122
|
+
pause: this.props.onPause,
|
|
123
|
+
playing: this.props.onPlay,
|
|
124
|
+
waiting: this.props.onBuffer,
|
|
125
|
+
error: (event) => onError(event)
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}, onError);
|
|
129
|
+
}
|
|
130
|
+
play() {
|
|
131
|
+
this.callPlayer("play");
|
|
132
|
+
}
|
|
133
|
+
pause() {
|
|
134
|
+
this.callPlayer("pause");
|
|
135
|
+
}
|
|
136
|
+
stop() {
|
|
137
|
+
}
|
|
138
|
+
seekTo(seconds, keepPlaying = true) {
|
|
139
|
+
this.callPlayer("seek", seconds);
|
|
140
|
+
if (!keepPlaying) {
|
|
141
|
+
this.pause();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
setVolume(fraction) {
|
|
145
|
+
this.callPlayer("setVolume", fraction);
|
|
146
|
+
}
|
|
147
|
+
getDuration() {
|
|
148
|
+
return this.player.duration || null;
|
|
149
|
+
}
|
|
150
|
+
getCurrentTime() {
|
|
151
|
+
return this.player.currentTime;
|
|
152
|
+
}
|
|
153
|
+
getSecondsLoaded() {
|
|
154
|
+
return this.player.bufferedTime;
|
|
155
|
+
}
|
|
156
|
+
render() {
|
|
157
|
+
const { display } = this.props;
|
|
158
|
+
const style = {
|
|
159
|
+
width: "100%",
|
|
160
|
+
height: "100%",
|
|
161
|
+
display
|
|
162
|
+
};
|
|
163
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style }, /* @__PURE__ */ import_react.default.createElement("div", { ref: this.ref }));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
__publicField(DailyMotion, "displayName", "DailyMotion");
|
|
167
|
+
__publicField(DailyMotion, "canPlay", import_patterns.canPlay.dailymotion);
|
|
168
|
+
__publicField(DailyMotion, "loopOnEnded", true);
|
|
169
|
+
return DailyMotion_1;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
var DailyMotionExports = /*@__PURE__*/ requireDailyMotion();
|
|
173
|
+
var DailyMotion = /*@__PURE__*/index.getDefaultExportFromCjs(DailyMotionExports);
|
|
174
|
+
|
|
175
|
+
var DailyMotion$1 = /*#__PURE__*/_mergeNamespaces({
|
|
176
|
+
__proto__: null,
|
|
177
|
+
default: DailyMotion
|
|
178
|
+
}, [DailyMotionExports]);
|
|
179
|
+
|
|
180
|
+
exports.DailyMotion = DailyMotion$1;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-C4Mk2H3N.esm.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
function _mergeNamespaces(n, m) {
|
|
5
|
+
m.forEach(function (e) {
|
|
6
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
7
|
+
if (k !== 'default' && !(k in n)) {
|
|
8
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return e[k]; }
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
return Object.freeze(n);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var DailyMotion_1;
|
|
20
|
+
var hasRequiredDailyMotion;
|
|
21
|
+
|
|
22
|
+
function requireDailyMotion () {
|
|
23
|
+
if (hasRequiredDailyMotion) return DailyMotion_1;
|
|
24
|
+
hasRequiredDailyMotion = 1;
|
|
25
|
+
var __create = Object.create;
|
|
26
|
+
var __defProp = Object.defineProperty;
|
|
27
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
28
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
29
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
30
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
31
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
32
|
+
var __export = (target, all) => {
|
|
33
|
+
for (var name in all)
|
|
34
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
35
|
+
};
|
|
36
|
+
var __copyProps = (to, from, except, desc) => {
|
|
37
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
|
+
for (let key of __getOwnPropNames(from))
|
|
39
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
40
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
41
|
+
}
|
|
42
|
+
return to;
|
|
43
|
+
};
|
|
44
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
45
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
46
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
47
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
48
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
49
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
50
|
+
mod
|
|
51
|
+
));
|
|
52
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
53
|
+
var __publicField = (obj, key, value) => {
|
|
54
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
55
|
+
return value;
|
|
56
|
+
};
|
|
57
|
+
var DailyMotion_exports = {};
|
|
58
|
+
__export(DailyMotion_exports, {
|
|
59
|
+
default: () => DailyMotion
|
|
60
|
+
});
|
|
61
|
+
DailyMotion_1 = __toCommonJS(DailyMotion_exports);
|
|
62
|
+
var import_react = __toESM(React__default);
|
|
63
|
+
var import_utils = /*@__PURE__*/ requireUtils();
|
|
64
|
+
var import_patterns = /*@__PURE__*/ requirePatterns();
|
|
65
|
+
const SDK_URL = "https://api.dmcdn.net/all.js";
|
|
66
|
+
const SDK_GLOBAL = "DM";
|
|
67
|
+
const SDK_GLOBAL_READY = "dmAsyncInit";
|
|
68
|
+
class DailyMotion extends import_react.Component {
|
|
69
|
+
constructor() {
|
|
70
|
+
super(...arguments);
|
|
71
|
+
__publicField(this, "callPlayer", import_utils.callPlayer);
|
|
72
|
+
__publicField(this, "onDurationChange", () => {
|
|
73
|
+
const duration = this.getDuration();
|
|
74
|
+
this.props.onDuration(duration);
|
|
75
|
+
});
|
|
76
|
+
__publicField(this, "mute", () => {
|
|
77
|
+
this.callPlayer("setMuted", true);
|
|
78
|
+
});
|
|
79
|
+
__publicField(this, "unmute", () => {
|
|
80
|
+
this.callPlayer("setMuted", false);
|
|
81
|
+
});
|
|
82
|
+
__publicField(this, "ref", (container) => {
|
|
83
|
+
this.container = container;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
componentDidMount() {
|
|
87
|
+
this.props.onMount && this.props.onMount(this);
|
|
88
|
+
}
|
|
89
|
+
load(url) {
|
|
90
|
+
const { controls, config, onError, playing } = this.props;
|
|
91
|
+
const [, id] = url.match(import_patterns.MATCH_URL_DAILYMOTION);
|
|
92
|
+
if (this.player) {
|
|
93
|
+
this.player.load(id, {
|
|
94
|
+
start: (0, import_utils.parseStartTime)(url),
|
|
95
|
+
autoplay: playing
|
|
96
|
+
});
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, (DM) => DM.player).then((DM) => {
|
|
100
|
+
if (!this.container)
|
|
101
|
+
return;
|
|
102
|
+
const Player = DM.player;
|
|
103
|
+
this.player = new Player(this.container, {
|
|
104
|
+
width: "100%",
|
|
105
|
+
height: "100%",
|
|
106
|
+
video: id,
|
|
107
|
+
params: {
|
|
108
|
+
controls,
|
|
109
|
+
autoplay: this.props.playing,
|
|
110
|
+
mute: this.props.muted,
|
|
111
|
+
start: (0, import_utils.parseStartTime)(url),
|
|
112
|
+
origin: window.location.origin,
|
|
113
|
+
...config.params
|
|
114
|
+
},
|
|
115
|
+
events: {
|
|
116
|
+
apiready: this.props.onReady,
|
|
117
|
+
seeked: () => this.props.onSeek(this.player.currentTime),
|
|
118
|
+
video_end: this.props.onEnded,
|
|
119
|
+
durationchange: this.onDurationChange,
|
|
120
|
+
pause: this.props.onPause,
|
|
121
|
+
playing: this.props.onPlay,
|
|
122
|
+
waiting: this.props.onBuffer,
|
|
123
|
+
error: (event) => onError(event)
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}, onError);
|
|
127
|
+
}
|
|
128
|
+
play() {
|
|
129
|
+
this.callPlayer("play");
|
|
130
|
+
}
|
|
131
|
+
pause() {
|
|
132
|
+
this.callPlayer("pause");
|
|
133
|
+
}
|
|
134
|
+
stop() {
|
|
135
|
+
}
|
|
136
|
+
seekTo(seconds, keepPlaying = true) {
|
|
137
|
+
this.callPlayer("seek", seconds);
|
|
138
|
+
if (!keepPlaying) {
|
|
139
|
+
this.pause();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
setVolume(fraction) {
|
|
143
|
+
this.callPlayer("setVolume", fraction);
|
|
144
|
+
}
|
|
145
|
+
getDuration() {
|
|
146
|
+
return this.player.duration || null;
|
|
147
|
+
}
|
|
148
|
+
getCurrentTime() {
|
|
149
|
+
return this.player.currentTime;
|
|
150
|
+
}
|
|
151
|
+
getSecondsLoaded() {
|
|
152
|
+
return this.player.bufferedTime;
|
|
153
|
+
}
|
|
154
|
+
render() {
|
|
155
|
+
const { display } = this.props;
|
|
156
|
+
const style = {
|
|
157
|
+
width: "100%",
|
|
158
|
+
height: "100%",
|
|
159
|
+
display
|
|
160
|
+
};
|
|
161
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style }, /* @__PURE__ */ import_react.default.createElement("div", { ref: this.ref }));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
__publicField(DailyMotion, "displayName", "DailyMotion");
|
|
165
|
+
__publicField(DailyMotion, "canPlay", import_patterns.canPlay.dailymotion);
|
|
166
|
+
__publicField(DailyMotion, "loopOnEnded", true);
|
|
167
|
+
return DailyMotion_1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
var DailyMotionExports = /*@__PURE__*/ requireDailyMotion();
|
|
171
|
+
var DailyMotion = /*@__PURE__*/getDefaultExportFromCjs(DailyMotionExports);
|
|
172
|
+
|
|
173
|
+
var DailyMotion$1 = /*#__PURE__*/_mergeNamespaces({
|
|
174
|
+
__proto__: null,
|
|
175
|
+
default: DailyMotion
|
|
176
|
+
}, [DailyMotionExports]);
|
|
177
|
+
|
|
178
|
+
export { DailyMotion$1 as D };
|