@platform-x/hcltechx-mfe-wrapper 1.0.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.
Files changed (54) hide show
  1. package/BrightcovePlayer-B2Rrij5a.mjs +177 -0
  2. package/ChallengeDetailComponent-QSflL_pe.mjs +89 -0
  3. package/CommonContentComponent-D8PuLEle.mjs +78 -0
  4. package/DailyMotion-Pq0OS_nv.mjs +136 -0
  5. package/EngagementHomeComponent-CO2rSsxl.mjs +91 -0
  6. package/EventDetailComponent-DMKfvnfx.mjs +84 -0
  7. package/EventList-BM7sWeX5.mjs +22503 -0
  8. package/EventListComponent-SpgarpPb.mjs +82 -0
  9. package/Facebook-DVoDyq2n.mjs +121 -0
  10. package/FilePlayer-TBmUK03G.mjs +202 -0
  11. package/Kaltura-CLaSL9Gw.mjs +121 -0
  12. package/Mixcloud-BIUEG_vf.mjs +113 -0
  13. package/Mux-D2H0Zcnl.mjs +165 -0
  14. package/Preview-CqNeXEJq.mjs +127 -0
  15. package/RecentCarousel-DsRr-cur.mjs +243 -0
  16. package/Share-BTinEfR4.mjs +2243 -0
  17. package/SoundCloud-CL3-ElQD.mjs +123 -0
  18. package/Streamable-B6PCkCf3.mjs +115 -0
  19. package/Twitch-T-goXjKL.mjs +117 -0
  20. package/Vidyard-D8-XmjAR.mjs +113 -0
  21. package/Vimeo-jej0FY4O.mjs +146 -0
  22. package/Wistia-CPzm8ZXT.mjs +124 -0
  23. package/YouTube-VNohNZKu.mjs +176 -0
  24. package/index-BTIxC-e5.mjs +20 -0
  25. package/index-Dluh6sv-.mjs +7333 -0
  26. package/index.d.ts +2 -0
  27. package/index.mjs +10 -0
  28. package/lib/Components/EventDetails/EventDetailComponent.d.ts +1 -0
  29. package/lib/Components/EventDetails/index.d.ts +2 -0
  30. package/lib/Components/EventList/EventListComponent.d.ts +2 -0
  31. package/lib/Components/EventList/index.d.ts +2 -0
  32. package/lib/Components/FallBackPage/FallBackPage.d.ts +2 -0
  33. package/lib/Components/Loader/Loader.d.ts +2 -0
  34. package/lib/contentType-wrapper.d.ts +12 -0
  35. package/lib/contentTypes/Components/ChallengeDetailComponent.d.ts +2 -0
  36. package/lib/contentTypes/Components/CommonContentComponent.d.ts +4 -0
  37. package/lib/contentTypes/Components/EventDetailComponent.d.ts +2 -0
  38. package/lib/contentTypes/index.d.ts +2 -0
  39. package/lib/prelems/Components/EngagementHomeComponent.d.ts +2 -0
  40. package/lib/prelems/Components/EventListComponent.d.ts +10 -0
  41. package/lib/prelems/index.d.ts +2 -0
  42. package/lib/prelems-wrapper.d.ts +9 -0
  43. package/lib/services/ApiConfig.d.ts +1 -0
  44. package/lib/services/fetchApi.d.ts +11 -0
  45. package/lib/services/fetchQueries.d.ts +7 -0
  46. package/lib/services/mutateApi.d.ts +7 -0
  47. package/lib/services/mutateQueries.d.ts +4 -0
  48. package/lib/utils/Mapping.d.ts +7 -0
  49. package/lib/utils/componentMapping.d.ts +11 -0
  50. package/lib/utils/constants.d.ts +10 -0
  51. package/lib/utils/types.d.ts +32 -0
  52. package/mutateApi-DOEWbC_3.mjs +37 -0
  53. package/package.json +25 -0
  54. package/style.css +1 -0
@@ -0,0 +1,123 @@
1
+ import { g as P } from "./index-Dluh6sv-.mjs";
2
+ import g from "react";
3
+ import { u as b, p as v } from "./EventList-BM7sWeX5.mjs";
4
+ function O(t, e) {
5
+ for (var r = 0; r < e.length; r++) {
6
+ const s = e[r];
7
+ if (typeof s != "string" && !Array.isArray(s)) {
8
+ for (const o in s)
9
+ if (o !== "default" && !(o in t)) {
10
+ const n = Object.getOwnPropertyDescriptor(s, o);
11
+ n && Object.defineProperty(t, o, n.get ? n : {
12
+ enumerable: !0,
13
+ get: () => s[o]
14
+ });
15
+ }
16
+ }
17
+ }
18
+ return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
19
+ }
20
+ var S = Object.create, l = Object.defineProperty, w = Object.getOwnPropertyDescriptor, j = Object.getOwnPropertyNames, C = Object.getPrototypeOf, D = Object.prototype.hasOwnProperty, E = (t, e, r) => e in t ? l(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, L = (t, e) => {
21
+ for (var r in e)
22
+ l(t, r, { get: e[r], enumerable: !0 });
23
+ }, c = (t, e, r, s) => {
24
+ if (e && typeof e == "object" || typeof e == "function")
25
+ for (let o of j(e))
26
+ !D.call(t, o) && o !== r && l(t, o, { get: () => e[o], enumerable: !(s = w(e, o)) || s.enumerable });
27
+ return t;
28
+ }, R = (t, e, r) => (r = t != null ? S(C(t)) : {}, c(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ !t || !t.__esModule ? l(r, "default", { value: t, enumerable: !0 }) : r,
34
+ t
35
+ )), M = (t) => c(l({}, "__esModule", { value: !0 }), t), i = (t, e, r) => (E(t, typeof e != "symbol" ? e + "" : e, r), r), h = {};
36
+ L(h, {
37
+ default: () => u
38
+ });
39
+ var f = M(h), p = R(g), d = b, T = v;
40
+ const N = "https://w.soundcloud.com/player/api.js", A = "SC";
41
+ class u extends p.Component {
42
+ constructor() {
43
+ super(...arguments), i(this, "callPlayer", d.callPlayer), i(this, "duration", null), i(this, "currentTime", null), i(this, "fractionLoaded", null), i(this, "mute", () => {
44
+ this.setVolume(0);
45
+ }), i(this, "unmute", () => {
46
+ this.props.volume !== null && this.setVolume(this.props.volume);
47
+ }), i(this, "ref", (e) => {
48
+ this.iframe = e;
49
+ });
50
+ }
51
+ componentDidMount() {
52
+ this.props.onMount && this.props.onMount(this);
53
+ }
54
+ load(e, r) {
55
+ (0, d.getSDK)(N, A).then((s) => {
56
+ if (!this.iframe)
57
+ return;
58
+ const { PLAY: o, PLAY_PROGRESS: n, PAUSE: _, FINISH: m, ERROR: y } = s.Widget.Events;
59
+ r || (this.player = s.Widget(this.iframe), this.player.bind(o, this.props.onPlay), this.player.bind(_, () => {
60
+ this.duration - this.currentTime < 0.05 || this.props.onPause();
61
+ }), this.player.bind(n, (a) => {
62
+ this.currentTime = a.currentPosition / 1e3, this.fractionLoaded = a.loadedProgress;
63
+ }), this.player.bind(m, () => this.props.onEnded()), this.player.bind(y, (a) => this.props.onError(a))), this.player.load(e, {
64
+ ...this.props.config.options,
65
+ callback: () => {
66
+ this.player.getDuration((a) => {
67
+ this.duration = a / 1e3, this.props.onReady();
68
+ });
69
+ }
70
+ });
71
+ });
72
+ }
73
+ play() {
74
+ this.callPlayer("play");
75
+ }
76
+ pause() {
77
+ this.callPlayer("pause");
78
+ }
79
+ stop() {
80
+ }
81
+ seekTo(e, r = !0) {
82
+ this.callPlayer("seekTo", e * 1e3), r || this.pause();
83
+ }
84
+ setVolume(e) {
85
+ this.callPlayer("setVolume", e * 100);
86
+ }
87
+ getDuration() {
88
+ return this.duration;
89
+ }
90
+ getCurrentTime() {
91
+ return this.currentTime;
92
+ }
93
+ getSecondsLoaded() {
94
+ return this.fractionLoaded * this.duration;
95
+ }
96
+ render() {
97
+ const { display: e } = this.props, r = {
98
+ width: "100%",
99
+ height: "100%",
100
+ display: e
101
+ };
102
+ return /* @__PURE__ */ p.default.createElement(
103
+ "iframe",
104
+ {
105
+ ref: this.ref,
106
+ src: `https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,
107
+ style: r,
108
+ frameBorder: 0,
109
+ allow: "autoplay"
110
+ }
111
+ );
112
+ }
113
+ }
114
+ i(u, "displayName", "SoundCloud");
115
+ i(u, "canPlay", T.canPlay.soundcloud);
116
+ i(u, "loopOnEnded", !0);
117
+ const x = /* @__PURE__ */ P(f), K = /* @__PURE__ */ O({
118
+ __proto__: null,
119
+ default: x
120
+ }, [f]);
121
+ export {
122
+ K as S
123
+ };
@@ -0,0 +1,115 @@
1
+ import { g as m } from "./index-Dluh6sv-.mjs";
2
+ import f from "react";
3
+ import { u as _, p as b } from "./EventList-BM7sWeX5.mjs";
4
+ function P(t, e) {
5
+ for (var r = 0; r < e.length; r++) {
6
+ const s = e[r];
7
+ if (typeof s != "string" && !Array.isArray(s)) {
8
+ for (const a in s)
9
+ if (a !== "default" && !(a in t)) {
10
+ const i = Object.getOwnPropertyDescriptor(s, a);
11
+ i && Object.defineProperty(t, a, i.get ? i : {
12
+ enumerable: !0,
13
+ get: () => s[a]
14
+ });
15
+ }
16
+ }
17
+ }
18
+ return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
19
+ }
20
+ var g = Object.create, l = Object.defineProperty, v = Object.getOwnPropertyDescriptor, O = Object.getOwnPropertyNames, S = Object.getPrototypeOf, j = Object.prototype.hasOwnProperty, L = (t, e, r) => e in t ? l(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, w = (t, e) => {
21
+ for (var r in e)
22
+ l(t, r, { get: e[r], enumerable: !0 });
23
+ }, c = (t, e, r, s) => {
24
+ if (e && typeof e == "object" || typeof e == "function")
25
+ for (let a of O(e))
26
+ !j.call(t, a) && a !== r && l(t, a, { get: () => e[a], enumerable: !(s = v(e, a)) || s.enumerable });
27
+ return t;
28
+ }, M = (t, e, r) => (r = t != null ? g(S(t)) : {}, c(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ !t || !t.__esModule ? l(r, "default", { value: t, enumerable: !0 }) : r,
34
+ t
35
+ )), D = (t) => c(l({}, "__esModule", { value: !0 }), t), o = (t, e, r) => (L(t, typeof e != "symbol" ? e + "" : e, r), r), h = {};
36
+ w(h, {
37
+ default: () => n
38
+ });
39
+ var d = D(h), p = M(f), u = _, y = b;
40
+ const T = "https://cdn.embed.ly/player-0.1.0.min.js", E = "playerjs";
41
+ class n extends p.Component {
42
+ constructor() {
43
+ super(...arguments), o(this, "callPlayer", u.callPlayer), o(this, "duration", null), o(this, "currentTime", null), o(this, "secondsLoaded", null), o(this, "mute", () => {
44
+ this.callPlayer("mute");
45
+ }), o(this, "unmute", () => {
46
+ this.callPlayer("unmute");
47
+ }), o(this, "ref", (e) => {
48
+ this.iframe = e;
49
+ });
50
+ }
51
+ componentDidMount() {
52
+ this.props.onMount && this.props.onMount(this);
53
+ }
54
+ load(e) {
55
+ (0, u.getSDK)(T, E).then((r) => {
56
+ this.iframe && (this.player = new r.Player(this.iframe), this.player.setLoop(this.props.loop), this.player.on("ready", this.props.onReady), this.player.on("play", this.props.onPlay), this.player.on("pause", this.props.onPause), this.player.on("seeked", this.props.onSeek), this.player.on("ended", this.props.onEnded), this.player.on("error", this.props.onError), this.player.on("timeupdate", ({ duration: s, seconds: a }) => {
57
+ this.duration = s, this.currentTime = a;
58
+ }), this.player.on("buffered", ({ percent: s }) => {
59
+ this.duration && (this.secondsLoaded = this.duration * s);
60
+ }), this.props.muted && this.player.mute());
61
+ }, this.props.onError);
62
+ }
63
+ play() {
64
+ this.callPlayer("play");
65
+ }
66
+ pause() {
67
+ this.callPlayer("pause");
68
+ }
69
+ stop() {
70
+ }
71
+ seekTo(e, r = !0) {
72
+ this.callPlayer("setCurrentTime", e), r || this.pause();
73
+ }
74
+ setVolume(e) {
75
+ this.callPlayer("setVolume", e * 100);
76
+ }
77
+ setLoop(e) {
78
+ this.callPlayer("setLoop", e);
79
+ }
80
+ getDuration() {
81
+ return this.duration;
82
+ }
83
+ getCurrentTime() {
84
+ return this.currentTime;
85
+ }
86
+ getSecondsLoaded() {
87
+ return this.secondsLoaded;
88
+ }
89
+ render() {
90
+ const e = this.props.url.match(y.MATCH_URL_STREAMABLE)[1], r = {
91
+ width: "100%",
92
+ height: "100%"
93
+ };
94
+ return /* @__PURE__ */ p.default.createElement(
95
+ "iframe",
96
+ {
97
+ ref: this.ref,
98
+ src: `https://streamable.com/o/${e}`,
99
+ frameBorder: "0",
100
+ scrolling: "no",
101
+ style: r,
102
+ allow: "encrypted-media; autoplay; fullscreen;"
103
+ }
104
+ );
105
+ }
106
+ }
107
+ o(n, "displayName", "Streamable");
108
+ o(n, "canPlay", y.canPlay.streamable);
109
+ const A = /* @__PURE__ */ m(d), R = /* @__PURE__ */ P({
110
+ __proto__: null,
111
+ default: A
112
+ }, [d]);
113
+ export {
114
+ R as S
115
+ };
@@ -0,0 +1,117 @@
1
+ import { g as w } from "./index-Dluh6sv-.mjs";
2
+ import D from "react";
3
+ import { u as C, p as N } from "./EventList-BM7sWeX5.mjs";
4
+ function I(t, e) {
5
+ for (var r = 0; r < e.length; r++) {
6
+ const s = e[r];
7
+ if (typeof s != "string" && !Array.isArray(s)) {
8
+ for (const a in s)
9
+ if (a !== "default" && !(a in t)) {
10
+ const n = Object.getOwnPropertyDescriptor(s, a);
11
+ n && Object.defineProperty(t, a, n.get ? n : {
12
+ enumerable: !0,
13
+ get: () => s[a]
14
+ });
15
+ }
16
+ }
17
+ }
18
+ return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
19
+ }
20
+ var M = Object.create, l = Object.defineProperty, S = Object.getOwnPropertyDescriptor, j = Object.getOwnPropertyNames, A = Object.getPrototypeOf, R = Object.prototype.hasOwnProperty, H = (t, e, r) => e in t ? l(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, x = (t, e) => {
21
+ for (var r in e)
22
+ l(t, r, { get: e[r], enumerable: !0 });
23
+ }, _ = (t, e, r, s) => {
24
+ if (e && typeof e == "object" || typeof e == "function")
25
+ for (let a of j(e))
26
+ !R.call(t, a) && a !== r && l(t, a, { get: () => e[a], enumerable: !(s = S(e, a)) || s.enumerable });
27
+ return t;
28
+ }, F = (t, e, r) => (r = t != null ? M(A(t)) : {}, _(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ !t || !t.__esModule ? l(r, "default", { value: t, enumerable: !0 }) : r,
34
+ t
35
+ )), U = (t) => _(l({}, "__esModule", { value: !0 }), t), o = (t, e, r) => (H(t, typeof e != "symbol" ? e + "" : e, r), r), f = {};
36
+ x(f, {
37
+ default: () => h
38
+ });
39
+ var P = U(f), y = F(D), c = C, u = N;
40
+ const K = "https://player.twitch.tv/js/embed/v1.js", V = "Twitch", $ = "twitch-player-";
41
+ class h extends y.Component {
42
+ constructor() {
43
+ super(...arguments), o(this, "callPlayer", c.callPlayer), o(this, "playerID", this.props.config.playerId || `${$}${(0, c.randomString)()}`), o(this, "mute", () => {
44
+ this.callPlayer("setMuted", !0);
45
+ }), o(this, "unmute", () => {
46
+ this.callPlayer("setMuted", !1);
47
+ });
48
+ }
49
+ componentDidMount() {
50
+ this.props.onMount && this.props.onMount(this);
51
+ }
52
+ load(e, r) {
53
+ const { playsinline: s, onError: a, config: n, controls: m } = this.props, i = u.MATCH_URL_TWITCH_CHANNEL.test(e), p = i ? e.match(u.MATCH_URL_TWITCH_CHANNEL)[1] : e.match(u.MATCH_URL_TWITCH_VIDEO)[1];
54
+ if (r) {
55
+ i ? this.player.setChannel(p) : this.player.setVideo("v" + p);
56
+ return;
57
+ }
58
+ (0, c.getSDK)(K, V).then((d) => {
59
+ this.player = new d.Player(this.playerID, {
60
+ video: i ? "" : p,
61
+ channel: i ? p : "",
62
+ height: "100%",
63
+ width: "100%",
64
+ playsinline: s,
65
+ autoplay: this.props.playing,
66
+ muted: this.props.muted,
67
+ // https://github.com/CookPete/react-player/issues/733#issuecomment-549085859
68
+ controls: i ? !0 : m,
69
+ time: (0, c.parseStartTime)(e),
70
+ ...n.options
71
+ });
72
+ const { READY: v, PLAYING: g, PAUSE: E, ENDED: O, ONLINE: L, OFFLINE: b, SEEK: T } = d.Player;
73
+ this.player.addEventListener(v, this.props.onReady), this.player.addEventListener(g, this.props.onPlay), this.player.addEventListener(E, this.props.onPause), this.player.addEventListener(O, this.props.onEnded), this.player.addEventListener(T, this.props.onSeek), this.player.addEventListener(L, this.props.onLoaded), this.player.addEventListener(b, this.props.onLoaded);
74
+ }, a);
75
+ }
76
+ play() {
77
+ this.callPlayer("play");
78
+ }
79
+ pause() {
80
+ this.callPlayer("pause");
81
+ }
82
+ stop() {
83
+ this.callPlayer("pause");
84
+ }
85
+ seekTo(e, r = !0) {
86
+ this.callPlayer("seek", e), r || this.pause();
87
+ }
88
+ setVolume(e) {
89
+ this.callPlayer("setVolume", e);
90
+ }
91
+ getDuration() {
92
+ return this.callPlayer("getDuration");
93
+ }
94
+ getCurrentTime() {
95
+ return this.callPlayer("getCurrentTime");
96
+ }
97
+ getSecondsLoaded() {
98
+ return null;
99
+ }
100
+ render() {
101
+ const e = {
102
+ width: "100%",
103
+ height: "100%"
104
+ };
105
+ return /* @__PURE__ */ y.default.createElement("div", { style: e, id: this.playerID });
106
+ }
107
+ }
108
+ o(h, "displayName", "Twitch");
109
+ o(h, "canPlay", u.canPlay.twitch);
110
+ o(h, "loopOnEnded", !0);
111
+ const W = /* @__PURE__ */ w(P), z = /* @__PURE__ */ I({
112
+ __proto__: null,
113
+ default: W
114
+ }, [P]);
115
+ export {
116
+ z as T
117
+ };
@@ -0,0 +1,113 @@
1
+ import { g } from "./index-Dluh6sv-.mjs";
2
+ import v from "react";
3
+ import { u as b, p as O } from "./EventList-BM7sWeX5.mjs";
4
+ function V(t, e) {
5
+ for (var r = 0; r < e.length; r++) {
6
+ const o = e[r];
7
+ if (typeof o != "string" && !Array.isArray(o)) {
8
+ for (const a in o)
9
+ if (a !== "default" && !(a in t)) {
10
+ const i = Object.getOwnPropertyDescriptor(o, a);
11
+ i && Object.defineProperty(t, a, i.get ? i : {
12
+ enumerable: !0,
13
+ get: () => o[a]
14
+ });
15
+ }
16
+ }
17
+ }
18
+ return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
19
+ }
20
+ var D = Object.create, n = Object.defineProperty, j = Object.getOwnPropertyDescriptor, w = Object.getOwnPropertyNames, S = Object.getPrototypeOf, M = Object.prototype.hasOwnProperty, A = (t, e, r) => e in t ? n(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, L = (t, e) => {
21
+ for (var r in e)
22
+ n(t, r, { get: e[r], enumerable: !0 });
23
+ }, h = (t, e, r, o) => {
24
+ if (e && typeof e == "object" || typeof e == "function")
25
+ for (let a of w(e))
26
+ !M.call(t, a) && a !== r && n(t, a, { get: () => e[a], enumerable: !(o = j(e, a)) || o.enumerable });
27
+ return t;
28
+ }, R = (t, e, r) => (r = t != null ? D(S(t)) : {}, h(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ !t || !t.__esModule ? n(r, "default", { value: t, enumerable: !0 }) : r,
34
+ t
35
+ )), E = (t) => h(n({}, "__esModule", { value: !0 }), t), s = (t, e, r) => (A(t, typeof e != "symbol" ? e + "" : e, r), r), _ = {};
36
+ L(_, {
37
+ default: () => d
38
+ });
39
+ var f = E(_), c = R(v), y = b, P = O;
40
+ const C = "https://play.vidyard.com/embed/v4.js", N = "VidyardV4", x = "onVidyardAPI";
41
+ class d extends c.Component {
42
+ constructor() {
43
+ super(...arguments), s(this, "callPlayer", y.callPlayer), s(this, "mute", () => {
44
+ this.setVolume(0);
45
+ }), s(this, "unmute", () => {
46
+ this.props.volume !== null && this.setVolume(this.props.volume);
47
+ }), s(this, "ref", (e) => {
48
+ this.container = e;
49
+ });
50
+ }
51
+ componentDidMount() {
52
+ this.props.onMount && this.props.onMount(this);
53
+ }
54
+ load(e) {
55
+ const { playing: r, config: o, onError: a, onDuration: i } = this.props, l = e && e.match(P.MATCH_URL_VIDYARD)[1];
56
+ this.player && this.stop(), (0, y.getSDK)(C, N, x).then((p) => {
57
+ this.container && (p.api.addReadyListener((u, m) => {
58
+ this.player || (this.player = m, this.player.on("ready", this.props.onReady), this.player.on("play", this.props.onPlay), this.player.on("pause", this.props.onPause), this.player.on("seek", this.props.onSeek), this.player.on("playerComplete", this.props.onEnded));
59
+ }, l), p.api.renderPlayer({
60
+ uuid: l,
61
+ container: this.container,
62
+ autoplay: r ? 1 : 0,
63
+ ...o.options
64
+ }), p.api.getPlayerMetadata(l).then((u) => {
65
+ this.duration = u.length_in_seconds, i(u.length_in_seconds);
66
+ }));
67
+ }, a);
68
+ }
69
+ play() {
70
+ this.callPlayer("play");
71
+ }
72
+ pause() {
73
+ this.callPlayer("pause");
74
+ }
75
+ stop() {
76
+ window.VidyardV4.api.destroyPlayer(this.player);
77
+ }
78
+ seekTo(e, r = !0) {
79
+ this.callPlayer("seek", e), r || this.pause();
80
+ }
81
+ setVolume(e) {
82
+ this.callPlayer("setVolume", e);
83
+ }
84
+ setPlaybackRate(e) {
85
+ this.callPlayer("setPlaybackSpeed", e);
86
+ }
87
+ getDuration() {
88
+ return this.duration;
89
+ }
90
+ getCurrentTime() {
91
+ return this.callPlayer("currentTime");
92
+ }
93
+ getSecondsLoaded() {
94
+ return null;
95
+ }
96
+ render() {
97
+ const { display: e } = this.props, r = {
98
+ width: "100%",
99
+ height: "100%",
100
+ display: e
101
+ };
102
+ return /* @__PURE__ */ c.default.createElement("div", { style: r }, /* @__PURE__ */ c.default.createElement("div", { ref: this.ref }));
103
+ }
104
+ }
105
+ s(d, "displayName", "Vidyard");
106
+ s(d, "canPlay", P.canPlay.vidyard);
107
+ const T = /* @__PURE__ */ g(f), F = /* @__PURE__ */ V({
108
+ __proto__: null,
109
+ default: T
110
+ }, [f]);
111
+ export {
112
+ F as V
113
+ };
@@ -0,0 +1,146 @@
1
+ import { g as d } from "./index-Dluh6sv-.mjs";
2
+ import f from "react";
3
+ import { u as m, p as _ } from "./EventList-BM7sWeX5.mjs";
4
+ function P(t, e) {
5
+ for (var r = 0; r < e.length; r++) {
6
+ const a = e[r];
7
+ if (typeof a != "string" && !Array.isArray(a)) {
8
+ for (const s in a)
9
+ if (s !== "default" && !(s in t)) {
10
+ const o = Object.getOwnPropertyDescriptor(a, s);
11
+ o && Object.defineProperty(t, s, o.get ? o : {
12
+ enumerable: !0,
13
+ get: () => a[s]
14
+ });
15
+ }
16
+ }
17
+ }
18
+ return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
19
+ }
20
+ var g = Object.create, n = Object.defineProperty, b = Object.getOwnPropertyDescriptor, v = Object.getOwnPropertyNames, O = Object.getPrototypeOf, D = Object.prototype.hasOwnProperty, w = (t, e, r) => e in t ? n(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, M = (t, e) => {
21
+ for (var r in e)
22
+ n(t, r, { get: e[r], enumerable: !0 });
23
+ }, h = (t, e, r, a) => {
24
+ if (e && typeof e == "object" || typeof e == "function")
25
+ for (let s of v(e))
26
+ !D.call(t, s) && s !== r && n(t, s, { get: () => e[s], enumerable: !(a = b(e, s)) || a.enumerable });
27
+ return t;
28
+ }, j = (t, e, r) => (r = t != null ? g(O(t)) : {}, h(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ !t || !t.__esModule ? n(r, "default", { value: t, enumerable: !0 }) : r,
34
+ t
35
+ )), L = (t) => h(n({}, "__esModule", { value: !0 }), t), i = (t, e, r) => (w(t, typeof e != "symbol" ? e + "" : e, r), r), c = {};
36
+ M(c, {
37
+ default: () => l
38
+ });
39
+ var y = L(c), p = j(f), u = m, S = _;
40
+ const V = "https://player.vimeo.com/api/player.js", E = "Vimeo", k = (t) => t.replace("/manage/videos", "");
41
+ class l extends p.Component {
42
+ constructor() {
43
+ super(...arguments), i(this, "callPlayer", u.callPlayer), i(this, "duration", null), i(this, "currentTime", null), i(this, "secondsLoaded", null), i(this, "mute", () => {
44
+ this.setMuted(!0);
45
+ }), i(this, "unmute", () => {
46
+ this.setMuted(!1);
47
+ }), i(this, "ref", (e) => {
48
+ this.container = e;
49
+ });
50
+ }
51
+ componentDidMount() {
52
+ this.props.onMount && this.props.onMount(this);
53
+ }
54
+ load(e) {
55
+ this.duration = null, (0, u.getSDK)(V, E).then((r) => {
56
+ if (!this.container)
57
+ return;
58
+ const { playerOptions: a, title: s } = this.props.config;
59
+ this.player = new r.Player(this.container, {
60
+ url: k(e),
61
+ autoplay: this.props.playing,
62
+ muted: this.props.muted,
63
+ loop: this.props.loop,
64
+ playsinline: this.props.playsinline,
65
+ controls: this.props.controls,
66
+ ...a
67
+ }), this.player.ready().then(() => {
68
+ const o = this.container.querySelector("iframe");
69
+ o.style.width = "100%", o.style.height = "100%", s && (o.title = s);
70
+ }).catch(this.props.onError), this.player.on("loaded", () => {
71
+ this.props.onReady(), this.refreshDuration();
72
+ }), this.player.on("play", () => {
73
+ this.props.onPlay(), this.refreshDuration();
74
+ }), this.player.on("pause", this.props.onPause), this.player.on("seeked", (o) => this.props.onSeek(o.seconds)), this.player.on("ended", this.props.onEnded), this.player.on("error", this.props.onError), this.player.on("timeupdate", ({ seconds: o }) => {
75
+ this.currentTime = o;
76
+ }), this.player.on("progress", ({ seconds: o }) => {
77
+ this.secondsLoaded = o;
78
+ }), this.player.on("bufferstart", this.props.onBuffer), this.player.on("bufferend", this.props.onBufferEnd), this.player.on("playbackratechange", (o) => this.props.onPlaybackRateChange(o.playbackRate));
79
+ }, this.props.onError);
80
+ }
81
+ refreshDuration() {
82
+ this.player.getDuration().then((e) => {
83
+ this.duration = e;
84
+ });
85
+ }
86
+ play() {
87
+ const e = this.callPlayer("play");
88
+ e && e.catch(this.props.onError);
89
+ }
90
+ pause() {
91
+ this.callPlayer("pause");
92
+ }
93
+ stop() {
94
+ this.callPlayer("unload");
95
+ }
96
+ seekTo(e, r = !0) {
97
+ this.callPlayer("setCurrentTime", e), r || this.pause();
98
+ }
99
+ setVolume(e) {
100
+ this.callPlayer("setVolume", e);
101
+ }
102
+ setMuted(e) {
103
+ this.callPlayer("setMuted", e);
104
+ }
105
+ setLoop(e) {
106
+ this.callPlayer("setLoop", e);
107
+ }
108
+ setPlaybackRate(e) {
109
+ this.callPlayer("setPlaybackRate", e);
110
+ }
111
+ getDuration() {
112
+ return this.duration;
113
+ }
114
+ getCurrentTime() {
115
+ return this.currentTime;
116
+ }
117
+ getSecondsLoaded() {
118
+ return this.secondsLoaded;
119
+ }
120
+ render() {
121
+ const { display: e } = this.props, r = {
122
+ width: "100%",
123
+ height: "100%",
124
+ overflow: "hidden",
125
+ display: e
126
+ };
127
+ return /* @__PURE__ */ p.default.createElement(
128
+ "div",
129
+ {
130
+ key: this.props.url,
131
+ ref: this.ref,
132
+ style: r
133
+ }
134
+ );
135
+ }
136
+ }
137
+ i(l, "displayName", "Vimeo");
138
+ i(l, "canPlay", S.canPlay.vimeo);
139
+ i(l, "forceLoad", !0);
140
+ const R = /* @__PURE__ */ d(y), x = /* @__PURE__ */ P({
141
+ __proto__: null,
142
+ default: R
143
+ }, [y]);
144
+ export {
145
+ x as V
146
+ };