tavi-video-tutor 0.1.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/README.md +16 -0
- package/dist/DailyMotion-CMzxQweS.js +113 -0
- package/dist/Facebook-C23fvfaA.js +96 -0
- package/dist/FilePlayer-CMqw_QL4.js +182 -0
- package/dist/Kaltura-DX6mTYyf.js +96 -0
- package/dist/Mixcloud-Dd0goOiG.js +85 -0
- package/dist/Mux-CKZpCL-G.js +137 -0
- package/dist/Preview-CJn6Bg2U.js +107 -0
- package/dist/SoundCloud-DGxS5bS7.js +97 -0
- package/dist/Streamable-CmxnxVKG.js +91 -0
- package/dist/Twitch-CKAIH_w4.js +97 -0
- package/dist/Vidyard-CzPQtoyq.js +93 -0
- package/dist/Vimeo-C4sqB4Bz.js +121 -0
- package/dist/Wistia-DyPXYFTO.js +108 -0
- package/dist/YouTube-rU9Ojhsi.js +155 -0
- package/dist/ai-tutor.js +2445 -0
- package/dist/ai-tutor.umd.cjs +8 -0
- package/dist/chunk-jwUa06l-.js +23 -0
- package/dist/favicon.svg +1 -0
- package/dist/icons.svg +24 -0
- package/dist/tavi-video-tutor.css +2 -0
- package/package.json +38 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { i as e, t } from "./chunk-jwUa06l-.js";
|
|
2
|
+
import { t as n } from "./ai-tutor.js";
|
|
3
|
+
//#region node_modules/react-player/lib/players/Mux.js
|
|
4
|
+
var r = /* @__PURE__ */ t(((t, r) => {
|
|
5
|
+
var i = Object.create, a = Object.defineProperty, o = Object.getOwnPropertyDescriptor, s = Object.getOwnPropertyNames, c = Object.getPrototypeOf, l = Object.prototype.hasOwnProperty, u = (e, t, n) => t in e ? a(e, t, {
|
|
6
|
+
enumerable: !0,
|
|
7
|
+
configurable: !0,
|
|
8
|
+
writable: !0,
|
|
9
|
+
value: n
|
|
10
|
+
}) : e[t] = n, d = (e, t) => {
|
|
11
|
+
for (var n in t) a(e, n, {
|
|
12
|
+
get: t[n],
|
|
13
|
+
enumerable: !0
|
|
14
|
+
});
|
|
15
|
+
}, f = (e, t, n, r) => {
|
|
16
|
+
if (t && typeof t == "object" || typeof t == "function") for (let i of s(t)) !l.call(e, i) && i !== n && a(e, i, {
|
|
17
|
+
get: () => t[i],
|
|
18
|
+
enumerable: !(r = o(t, i)) || r.enumerable
|
|
19
|
+
});
|
|
20
|
+
return e;
|
|
21
|
+
}, p = (e, t, n) => (n = e == null ? {} : i(c(e)), f(t || !e || !e.__esModule ? a(n, "default", {
|
|
22
|
+
value: e,
|
|
23
|
+
enumerable: !0
|
|
24
|
+
}) : n, e)), m = (e) => f(a({}, "__esModule", { value: !0 }), e), h = (e, t, n) => (u(e, typeof t == "symbol" ? t : t + "", n), n), g = {};
|
|
25
|
+
d(g, { default: () => b }), r.exports = m(g);
|
|
26
|
+
var _ = p(e("react")), v = n(), y = "https://cdn.jsdelivr.net/npm/@mux/mux-player@VERSION/dist/mux-player.mjs", b = class extends _.Component {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments), h(this, "onReady", (...e) => this.props.onReady(...e)), h(this, "onPlay", (...e) => this.props.onPlay(...e)), h(this, "onBuffer", (...e) => this.props.onBuffer(...e)), h(this, "onBufferEnd", (...e) => this.props.onBufferEnd(...e)), h(this, "onPause", (...e) => this.props.onPause(...e)), h(this, "onEnded", (...e) => this.props.onEnded(...e)), h(this, "onError", (...e) => this.props.onError(...e)), h(this, "onPlayBackRateChange", (e) => this.props.onPlaybackRateChange(e.target.playbackRate)), h(this, "onEnablePIP", (...e) => this.props.onEnablePIP(...e)), h(this, "onSeek", (e) => {
|
|
29
|
+
this.props.onSeek(e.target.currentTime);
|
|
30
|
+
}), h(this, "onDurationChange", () => {
|
|
31
|
+
let e = this.getDuration();
|
|
32
|
+
this.props.onDuration(e);
|
|
33
|
+
}), h(this, "mute", () => {
|
|
34
|
+
this.player.muted = !0;
|
|
35
|
+
}), h(this, "unmute", () => {
|
|
36
|
+
this.player.muted = !1;
|
|
37
|
+
}), h(this, "ref", (e) => {
|
|
38
|
+
this.player = e;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
componentDidMount() {
|
|
42
|
+
this.props.onMount && this.props.onMount(this), this.addListeners(this.player);
|
|
43
|
+
let e = this.getPlaybackId(this.props.url);
|
|
44
|
+
e && (this.player.playbackId = e);
|
|
45
|
+
}
|
|
46
|
+
componentWillUnmount() {
|
|
47
|
+
this.player.playbackId = null, this.removeListeners(this.player);
|
|
48
|
+
}
|
|
49
|
+
addListeners(e) {
|
|
50
|
+
let { playsinline: t } = this.props;
|
|
51
|
+
e.addEventListener("play", this.onPlay), e.addEventListener("waiting", this.onBuffer), e.addEventListener("playing", this.onBufferEnd), e.addEventListener("pause", this.onPause), e.addEventListener("seeked", this.onSeek), e.addEventListener("ended", this.onEnded), e.addEventListener("error", this.onError), e.addEventListener("ratechange", this.onPlayBackRateChange), e.addEventListener("enterpictureinpicture", this.onEnablePIP), e.addEventListener("leavepictureinpicture", this.onDisablePIP), e.addEventListener("webkitpresentationmodechanged", this.onPresentationModeChange), e.addEventListener("canplay", this.onReady), t && e.setAttribute("playsinline", "");
|
|
52
|
+
}
|
|
53
|
+
removeListeners(e) {
|
|
54
|
+
e.removeEventListener("canplay", this.onReady), e.removeEventListener("play", this.onPlay), e.removeEventListener("waiting", this.onBuffer), e.removeEventListener("playing", this.onBufferEnd), e.removeEventListener("pause", this.onPause), e.removeEventListener("seeked", this.onSeek), e.removeEventListener("ended", this.onEnded), e.removeEventListener("error", this.onError), e.removeEventListener("ratechange", this.onPlayBackRateChange), e.removeEventListener("enterpictureinpicture", this.onEnablePIP), e.removeEventListener("leavepictureinpicture", this.onDisablePIP), e.removeEventListener("canplay", this.onReady);
|
|
55
|
+
}
|
|
56
|
+
async load(e) {
|
|
57
|
+
let { onError: t, config: n } = this.props;
|
|
58
|
+
if (!globalThis.customElements?.get("mux-player")) try {
|
|
59
|
+
await import(
|
|
60
|
+
/* webpackIgnore: true */
|
|
61
|
+
`${y.replace("VERSION", n.version)}`
|
|
62
|
+
), this.props.onLoaded();
|
|
63
|
+
} catch (e) {
|
|
64
|
+
t(e);
|
|
65
|
+
}
|
|
66
|
+
let [, r] = e.match(v.MATCH_URL_MUX);
|
|
67
|
+
this.player.playbackId = r;
|
|
68
|
+
}
|
|
69
|
+
play() {
|
|
70
|
+
let e = this.player.play();
|
|
71
|
+
e && e.catch(this.props.onError);
|
|
72
|
+
}
|
|
73
|
+
pause() {
|
|
74
|
+
this.player.pause();
|
|
75
|
+
}
|
|
76
|
+
stop() {
|
|
77
|
+
this.player.playbackId = null;
|
|
78
|
+
}
|
|
79
|
+
seekTo(e, t = !0) {
|
|
80
|
+
this.player.currentTime = e, t || this.pause();
|
|
81
|
+
}
|
|
82
|
+
setVolume(e) {
|
|
83
|
+
this.player.volume = e;
|
|
84
|
+
}
|
|
85
|
+
enablePIP() {
|
|
86
|
+
this.player.requestPictureInPicture && document.pictureInPictureElement !== this.player && this.player.requestPictureInPicture();
|
|
87
|
+
}
|
|
88
|
+
disablePIP() {
|
|
89
|
+
document.exitPictureInPicture && document.pictureInPictureElement === this.player && document.exitPictureInPicture();
|
|
90
|
+
}
|
|
91
|
+
setPlaybackRate(e) {
|
|
92
|
+
try {
|
|
93
|
+
this.player.playbackRate = e;
|
|
94
|
+
} catch (e) {
|
|
95
|
+
this.props.onError(e);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
getDuration() {
|
|
99
|
+
if (!this.player) return null;
|
|
100
|
+
let { duration: e, seekable: t } = this.player;
|
|
101
|
+
return e === Infinity && t.length > 0 ? t.end(t.length - 1) : e;
|
|
102
|
+
}
|
|
103
|
+
getCurrentTime() {
|
|
104
|
+
return this.player ? this.player.currentTime : null;
|
|
105
|
+
}
|
|
106
|
+
getSecondsLoaded() {
|
|
107
|
+
if (!this.player) return null;
|
|
108
|
+
let { buffered: e } = this.player;
|
|
109
|
+
if (e.length === 0) return 0;
|
|
110
|
+
let t = e.end(e.length - 1), n = this.getDuration();
|
|
111
|
+
return t > n ? n : t;
|
|
112
|
+
}
|
|
113
|
+
getPlaybackId(e) {
|
|
114
|
+
let [, t] = e.match(v.MATCH_URL_MUX);
|
|
115
|
+
return t;
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
let { url: e, playing: t, loop: n, controls: r, muted: i, config: a, width: o, height: s } = this.props, c = {
|
|
119
|
+
width: o === "auto" ? o : "100%",
|
|
120
|
+
height: s === "auto" ? s : "100%"
|
|
121
|
+
};
|
|
122
|
+
return r === !1 && (c["--controls"] = "none"), /* @__PURE__ */ _.default.createElement("mux-player", {
|
|
123
|
+
ref: this.ref,
|
|
124
|
+
"playback-id": this.getPlaybackId(e),
|
|
125
|
+
style: c,
|
|
126
|
+
preload: "auto",
|
|
127
|
+
autoPlay: t || void 0,
|
|
128
|
+
muted: i ? "" : void 0,
|
|
129
|
+
loop: n ? "" : void 0,
|
|
130
|
+
...a.attributes
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
h(b, "displayName", "Mux"), h(b, "canPlay", v.canPlay.mux);
|
|
135
|
+
}));
|
|
136
|
+
//#endregion
|
|
137
|
+
export default r();
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { i as e, t } from "./chunk-jwUa06l-.js";
|
|
2
|
+
//#region node_modules/react-player/lib/Preview.js
|
|
3
|
+
var n = /* @__PURE__ */ t(((t, n) => {
|
|
4
|
+
var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t, n) => t in e ? i(e, t, {
|
|
5
|
+
enumerable: !0,
|
|
6
|
+
configurable: !0,
|
|
7
|
+
writable: !0,
|
|
8
|
+
value: n
|
|
9
|
+
}) : e[t] = n, u = (e, t) => {
|
|
10
|
+
for (var n in t) i(e, n, {
|
|
11
|
+
get: t[n],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
}, d = (e, t, n, r) => {
|
|
15
|
+
if (t && typeof t == "object" || typeof t == "function") for (let s of o(t)) !c.call(e, s) && s !== n && i(e, s, {
|
|
16
|
+
get: () => t[s],
|
|
17
|
+
enumerable: !(r = a(t, s)) || r.enumerable
|
|
18
|
+
});
|
|
19
|
+
return e;
|
|
20
|
+
}, f = (e, t, n) => (n = e == null ? {} : r(s(e)), d(t || !e || !e.__esModule ? i(n, "default", {
|
|
21
|
+
value: e,
|
|
22
|
+
enumerable: !0
|
|
23
|
+
}) : n, e)), p = (e) => d(i({}, "__esModule", { value: !0 }), e), m = (e, t, n) => (l(e, typeof t == "symbol" ? t : t + "", n), n), h = {};
|
|
24
|
+
u(h, { default: () => y }), n.exports = p(h);
|
|
25
|
+
var g = f(e("react")), _ = "64px", v = {}, y = class extends g.Component {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments), m(this, "mounted", !1), m(this, "state", { image: null }), m(this, "handleKeyPress", (e) => {
|
|
28
|
+
(e.key === "Enter" || e.key === " ") && this.props.onClick();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
componentDidMount() {
|
|
32
|
+
this.mounted = !0, this.fetchImage(this.props);
|
|
33
|
+
}
|
|
34
|
+
componentDidUpdate(e) {
|
|
35
|
+
let { url: t, light: n } = this.props;
|
|
36
|
+
(e.url !== t || e.light !== n) && this.fetchImage(this.props);
|
|
37
|
+
}
|
|
38
|
+
componentWillUnmount() {
|
|
39
|
+
this.mounted = !1;
|
|
40
|
+
}
|
|
41
|
+
fetchImage({ url: e, light: t, oEmbedUrl: n }) {
|
|
42
|
+
if (!g.default.isValidElement(t)) {
|
|
43
|
+
if (typeof t == "string") {
|
|
44
|
+
this.setState({ image: t });
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (v[e]) {
|
|
48
|
+
this.setState({ image: v[e] });
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
return this.setState({ image: null }), window.fetch(n.replace("{url}", e)).then((e) => e.json()).then((t) => {
|
|
52
|
+
if (t.thumbnail_url && this.mounted) {
|
|
53
|
+
let n = t.thumbnail_url.replace("height=100", "height=480").replace("-d_295x166", "-d_640");
|
|
54
|
+
this.setState({ image: n }), v[e] = n;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
let { light: e, onClick: t, playIcon: n, previewTabIndex: r, previewAriaLabel: i } = this.props, { image: a } = this.state, o = g.default.isValidElement(e), s = {
|
|
61
|
+
display: "flex",
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
justifyContent: "center"
|
|
64
|
+
}, c = {
|
|
65
|
+
preview: {
|
|
66
|
+
width: "100%",
|
|
67
|
+
height: "100%",
|
|
68
|
+
backgroundImage: a && !o ? `url(${a})` : void 0,
|
|
69
|
+
backgroundSize: "cover",
|
|
70
|
+
backgroundPosition: "center",
|
|
71
|
+
cursor: "pointer",
|
|
72
|
+
...s
|
|
73
|
+
},
|
|
74
|
+
shadow: {
|
|
75
|
+
background: "radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",
|
|
76
|
+
borderRadius: _,
|
|
77
|
+
width: _,
|
|
78
|
+
height: _,
|
|
79
|
+
position: o ? "absolute" : void 0,
|
|
80
|
+
...s
|
|
81
|
+
},
|
|
82
|
+
playIcon: {
|
|
83
|
+
borderStyle: "solid",
|
|
84
|
+
borderWidth: "16px 0 16px 26px",
|
|
85
|
+
borderColor: "transparent transparent transparent white",
|
|
86
|
+
marginLeft: "7px"
|
|
87
|
+
}
|
|
88
|
+
}, l = /* @__PURE__ */ g.default.createElement("div", {
|
|
89
|
+
style: c.shadow,
|
|
90
|
+
className: "react-player__shadow"
|
|
91
|
+
}, /* @__PURE__ */ g.default.createElement("div", {
|
|
92
|
+
style: c.playIcon,
|
|
93
|
+
className: "react-player__play-icon"
|
|
94
|
+
}));
|
|
95
|
+
return /* @__PURE__ */ g.default.createElement("div", {
|
|
96
|
+
style: c.preview,
|
|
97
|
+
className: "react-player__preview",
|
|
98
|
+
onClick: t,
|
|
99
|
+
tabIndex: r,
|
|
100
|
+
onKeyPress: this.handleKeyPress,
|
|
101
|
+
...i ? { "aria-label": i } : {}
|
|
102
|
+
}, o ? e : null, n || l);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}));
|
|
106
|
+
//#endregion
|
|
107
|
+
export default n();
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { i as e, t } from "./chunk-jwUa06l-.js";
|
|
2
|
+
import { n, t as r } from "./ai-tutor.js";
|
|
3
|
+
//#region node_modules/react-player/lib/players/SoundCloud.js
|
|
4
|
+
var i = /* @__PURE__ */ t(((t, i) => {
|
|
5
|
+
var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, c = Object.getOwnPropertyNames, l = Object.getPrototypeOf, u = Object.prototype.hasOwnProperty, d = (e, t, n) => t in e ? o(e, t, {
|
|
6
|
+
enumerable: !0,
|
|
7
|
+
configurable: !0,
|
|
8
|
+
writable: !0,
|
|
9
|
+
value: n
|
|
10
|
+
}) : e[t] = n, f = (e, t) => {
|
|
11
|
+
for (var n in t) o(e, n, {
|
|
12
|
+
get: t[n],
|
|
13
|
+
enumerable: !0
|
|
14
|
+
});
|
|
15
|
+
}, p = (e, t, n, r) => {
|
|
16
|
+
if (t && typeof t == "object" || typeof t == "function") for (let i of c(t)) !u.call(e, i) && i !== n && o(e, i, {
|
|
17
|
+
get: () => t[i],
|
|
18
|
+
enumerable: !(r = s(t, i)) || r.enumerable
|
|
19
|
+
});
|
|
20
|
+
return e;
|
|
21
|
+
}, m = (e, t, n) => (n = e == null ? {} : a(l(e)), p(t || !e || !e.__esModule ? o(n, "default", {
|
|
22
|
+
value: e,
|
|
23
|
+
enumerable: !0
|
|
24
|
+
}) : n, e)), h = (e) => p(o({}, "__esModule", { value: !0 }), e), g = (e, t, n) => (d(e, typeof t == "symbol" ? t : t + "", n), n), _ = {};
|
|
25
|
+
f(_, { default: () => C }), i.exports = h(_);
|
|
26
|
+
var v = m(e("react")), y = n(), b = r(), x = "https://w.soundcloud.com/player/api.js", S = "SC", C = class extends v.Component {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments), g(this, "callPlayer", y.callPlayer), g(this, "duration", null), g(this, "currentTime", null), g(this, "fractionLoaded", null), g(this, "mute", () => {
|
|
29
|
+
this.setVolume(0);
|
|
30
|
+
}), g(this, "unmute", () => {
|
|
31
|
+
this.props.volume !== null && this.setVolume(this.props.volume);
|
|
32
|
+
}), g(this, "ref", (e) => {
|
|
33
|
+
this.iframe = e;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
componentDidMount() {
|
|
37
|
+
this.props.onMount && this.props.onMount(this);
|
|
38
|
+
}
|
|
39
|
+
load(e, t) {
|
|
40
|
+
(0, y.getSDK)(x, S).then((n) => {
|
|
41
|
+
if (!this.iframe) return;
|
|
42
|
+
let { PLAY: r, PLAY_PROGRESS: i, PAUSE: a, FINISH: o, ERROR: s } = n.Widget.Events;
|
|
43
|
+
t || (this.player = n.Widget(this.iframe), this.player.bind(r, this.props.onPlay), this.player.bind(a, () => {
|
|
44
|
+
this.duration - this.currentTime < .05 || this.props.onPause();
|
|
45
|
+
}), this.player.bind(i, (e) => {
|
|
46
|
+
this.currentTime = e.currentPosition / 1e3, this.fractionLoaded = e.loadedProgress;
|
|
47
|
+
}), this.player.bind(o, () => this.props.onEnded()), this.player.bind(s, (e) => this.props.onError(e))), this.player.load(e, {
|
|
48
|
+
...this.props.config.options,
|
|
49
|
+
callback: () => {
|
|
50
|
+
this.player.getDuration((e) => {
|
|
51
|
+
this.duration = e / 1e3, this.props.onReady();
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
play() {
|
|
58
|
+
this.callPlayer("play");
|
|
59
|
+
}
|
|
60
|
+
pause() {
|
|
61
|
+
this.callPlayer("pause");
|
|
62
|
+
}
|
|
63
|
+
stop() {}
|
|
64
|
+
seekTo(e, t = !0) {
|
|
65
|
+
this.callPlayer("seekTo", e * 1e3), t || this.pause();
|
|
66
|
+
}
|
|
67
|
+
setVolume(e) {
|
|
68
|
+
this.callPlayer("setVolume", e * 100);
|
|
69
|
+
}
|
|
70
|
+
getDuration() {
|
|
71
|
+
return this.duration;
|
|
72
|
+
}
|
|
73
|
+
getCurrentTime() {
|
|
74
|
+
return this.currentTime;
|
|
75
|
+
}
|
|
76
|
+
getSecondsLoaded() {
|
|
77
|
+
return this.fractionLoaded * this.duration;
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
let { display: e } = this.props, t = {
|
|
81
|
+
width: "100%",
|
|
82
|
+
height: "100%",
|
|
83
|
+
display: e
|
|
84
|
+
};
|
|
85
|
+
return /* @__PURE__ */ v.default.createElement("iframe", {
|
|
86
|
+
ref: this.ref,
|
|
87
|
+
src: `https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,
|
|
88
|
+
style: t,
|
|
89
|
+
frameBorder: 0,
|
|
90
|
+
allow: "autoplay"
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
g(C, "displayName", "SoundCloud"), g(C, "canPlay", b.canPlay.soundcloud), g(C, "loopOnEnded", !0);
|
|
95
|
+
}));
|
|
96
|
+
//#endregion
|
|
97
|
+
export default i();
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { i as e, t } from "./chunk-jwUa06l-.js";
|
|
2
|
+
import { n, t as r } from "./ai-tutor.js";
|
|
3
|
+
//#region node_modules/react-player/lib/players/Streamable.js
|
|
4
|
+
var i = /* @__PURE__ */ t(((t, i) => {
|
|
5
|
+
var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, c = Object.getOwnPropertyNames, l = Object.getPrototypeOf, u = Object.prototype.hasOwnProperty, d = (e, t, n) => t in e ? o(e, t, {
|
|
6
|
+
enumerable: !0,
|
|
7
|
+
configurable: !0,
|
|
8
|
+
writable: !0,
|
|
9
|
+
value: n
|
|
10
|
+
}) : e[t] = n, f = (e, t) => {
|
|
11
|
+
for (var n in t) o(e, n, {
|
|
12
|
+
get: t[n],
|
|
13
|
+
enumerable: !0
|
|
14
|
+
});
|
|
15
|
+
}, p = (e, t, n, r) => {
|
|
16
|
+
if (t && typeof t == "object" || typeof t == "function") for (let i of c(t)) !u.call(e, i) && i !== n && o(e, i, {
|
|
17
|
+
get: () => t[i],
|
|
18
|
+
enumerable: !(r = s(t, i)) || r.enumerable
|
|
19
|
+
});
|
|
20
|
+
return e;
|
|
21
|
+
}, m = (e, t, n) => (n = e == null ? {} : a(l(e)), p(t || !e || !e.__esModule ? o(n, "default", {
|
|
22
|
+
value: e,
|
|
23
|
+
enumerable: !0
|
|
24
|
+
}) : n, e)), h = (e) => p(o({}, "__esModule", { value: !0 }), e), g = (e, t, n) => (d(e, typeof t == "symbol" ? t : t + "", n), n), _ = {};
|
|
25
|
+
f(_, { default: () => C }), i.exports = h(_);
|
|
26
|
+
var v = m(e("react")), y = n(), b = r(), x = "https://cdn.embed.ly/player-0.1.0.min.js", S = "playerjs", C = class extends v.Component {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments), g(this, "callPlayer", y.callPlayer), g(this, "duration", null), g(this, "currentTime", null), g(this, "secondsLoaded", null), g(this, "mute", () => {
|
|
29
|
+
this.callPlayer("mute");
|
|
30
|
+
}), g(this, "unmute", () => {
|
|
31
|
+
this.callPlayer("unmute");
|
|
32
|
+
}), g(this, "ref", (e) => {
|
|
33
|
+
this.iframe = e;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
componentDidMount() {
|
|
37
|
+
this.props.onMount && this.props.onMount(this);
|
|
38
|
+
}
|
|
39
|
+
load(e) {
|
|
40
|
+
(0, y.getSDK)(x, S).then((e) => {
|
|
41
|
+
this.iframe && (this.player = new e.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: e, seconds: t }) => {
|
|
42
|
+
this.duration = e, this.currentTime = t;
|
|
43
|
+
}), this.player.on("buffered", ({ percent: e }) => {
|
|
44
|
+
this.duration && (this.secondsLoaded = this.duration * e);
|
|
45
|
+
}), this.props.muted && this.player.mute());
|
|
46
|
+
}, this.props.onError);
|
|
47
|
+
}
|
|
48
|
+
play() {
|
|
49
|
+
this.callPlayer("play");
|
|
50
|
+
}
|
|
51
|
+
pause() {
|
|
52
|
+
this.callPlayer("pause");
|
|
53
|
+
}
|
|
54
|
+
stop() {}
|
|
55
|
+
seekTo(e, t = !0) {
|
|
56
|
+
this.callPlayer("setCurrentTime", e), t || this.pause();
|
|
57
|
+
}
|
|
58
|
+
setVolume(e) {
|
|
59
|
+
this.callPlayer("setVolume", e * 100);
|
|
60
|
+
}
|
|
61
|
+
setLoop(e) {
|
|
62
|
+
this.callPlayer("setLoop", e);
|
|
63
|
+
}
|
|
64
|
+
getDuration() {
|
|
65
|
+
return this.duration;
|
|
66
|
+
}
|
|
67
|
+
getCurrentTime() {
|
|
68
|
+
return this.currentTime;
|
|
69
|
+
}
|
|
70
|
+
getSecondsLoaded() {
|
|
71
|
+
return this.secondsLoaded;
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
let e = this.props.url.match(b.MATCH_URL_STREAMABLE)[1];
|
|
75
|
+
return /* @__PURE__ */ v.default.createElement("iframe", {
|
|
76
|
+
ref: this.ref,
|
|
77
|
+
src: `https://streamable.com/o/${e}`,
|
|
78
|
+
frameBorder: "0",
|
|
79
|
+
scrolling: "no",
|
|
80
|
+
style: {
|
|
81
|
+
width: "100%",
|
|
82
|
+
height: "100%"
|
|
83
|
+
},
|
|
84
|
+
allow: "encrypted-media; autoplay; fullscreen;"
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
g(C, "displayName", "Streamable"), g(C, "canPlay", b.canPlay.streamable);
|
|
89
|
+
}));
|
|
90
|
+
//#endregion
|
|
91
|
+
export default i();
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { i as e, t } from "./chunk-jwUa06l-.js";
|
|
2
|
+
import { n, t as r } from "./ai-tutor.js";
|
|
3
|
+
//#region node_modules/react-player/lib/players/Twitch.js
|
|
4
|
+
var i = /* @__PURE__ */ t(((t, i) => {
|
|
5
|
+
var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, c = Object.getOwnPropertyNames, l = Object.getPrototypeOf, u = Object.prototype.hasOwnProperty, d = (e, t, n) => t in e ? o(e, t, {
|
|
6
|
+
enumerable: !0,
|
|
7
|
+
configurable: !0,
|
|
8
|
+
writable: !0,
|
|
9
|
+
value: n
|
|
10
|
+
}) : e[t] = n, f = (e, t) => {
|
|
11
|
+
for (var n in t) o(e, n, {
|
|
12
|
+
get: t[n],
|
|
13
|
+
enumerable: !0
|
|
14
|
+
});
|
|
15
|
+
}, p = (e, t, n, r) => {
|
|
16
|
+
if (t && typeof t == "object" || typeof t == "function") for (let i of c(t)) !u.call(e, i) && i !== n && o(e, i, {
|
|
17
|
+
get: () => t[i],
|
|
18
|
+
enumerable: !(r = s(t, i)) || r.enumerable
|
|
19
|
+
});
|
|
20
|
+
return e;
|
|
21
|
+
}, m = (e, t, n) => (n = e == null ? {} : a(l(e)), p(t || !e || !e.__esModule ? o(n, "default", {
|
|
22
|
+
value: e,
|
|
23
|
+
enumerable: !0
|
|
24
|
+
}) : n, e)), h = (e) => p(o({}, "__esModule", { value: !0 }), e), g = (e, t, n) => (d(e, typeof t == "symbol" ? t : t + "", n), n), _ = {};
|
|
25
|
+
f(_, { default: () => w }), i.exports = h(_);
|
|
26
|
+
var v = m(e("react")), y = n(), b = r(), x = "https://player.twitch.tv/js/embed/v1.js", S = "Twitch", C = "twitch-player-", w = class extends v.Component {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments), g(this, "callPlayer", y.callPlayer), g(this, "playerID", this.props.config.playerId || `${C}${(0, y.randomString)()}`), g(this, "mute", () => {
|
|
29
|
+
this.callPlayer("setMuted", !0);
|
|
30
|
+
}), g(this, "unmute", () => {
|
|
31
|
+
this.callPlayer("setMuted", !1);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
componentDidMount() {
|
|
35
|
+
this.props.onMount && this.props.onMount(this);
|
|
36
|
+
}
|
|
37
|
+
load(e, t) {
|
|
38
|
+
let { playsinline: n, onError: r, config: i, controls: a } = this.props, o = b.MATCH_URL_TWITCH_CHANNEL.test(e), s = o ? e.match(b.MATCH_URL_TWITCH_CHANNEL)[1] : e.match(b.MATCH_URL_TWITCH_VIDEO)[1];
|
|
39
|
+
if (t) {
|
|
40
|
+
o ? this.player.setChannel(s) : this.player.setVideo("v" + s);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
(0, y.getSDK)(x, S).then((t) => {
|
|
44
|
+
this.player = new t.Player(this.playerID, {
|
|
45
|
+
video: o ? "" : s,
|
|
46
|
+
channel: o ? s : "",
|
|
47
|
+
height: "100%",
|
|
48
|
+
width: "100%",
|
|
49
|
+
playsinline: n,
|
|
50
|
+
autoplay: this.props.playing,
|
|
51
|
+
muted: this.props.muted,
|
|
52
|
+
controls: o ? !0 : a,
|
|
53
|
+
time: (0, y.parseStartTime)(e),
|
|
54
|
+
...i.options
|
|
55
|
+
});
|
|
56
|
+
let { READY: r, PLAYING: c, PAUSE: l, ENDED: u, ONLINE: d, OFFLINE: f, SEEK: p } = t.Player;
|
|
57
|
+
this.player.addEventListener(r, this.props.onReady), this.player.addEventListener(c, this.props.onPlay), this.player.addEventListener(l, this.props.onPause), this.player.addEventListener(u, this.props.onEnded), this.player.addEventListener(p, this.props.onSeek), this.player.addEventListener(d, this.props.onLoaded), this.player.addEventListener(f, this.props.onLoaded);
|
|
58
|
+
}, r);
|
|
59
|
+
}
|
|
60
|
+
play() {
|
|
61
|
+
this.callPlayer("play");
|
|
62
|
+
}
|
|
63
|
+
pause() {
|
|
64
|
+
this.callPlayer("pause");
|
|
65
|
+
}
|
|
66
|
+
stop() {
|
|
67
|
+
this.callPlayer("pause");
|
|
68
|
+
}
|
|
69
|
+
seekTo(e, t = !0) {
|
|
70
|
+
this.callPlayer("seek", e), t || this.pause();
|
|
71
|
+
}
|
|
72
|
+
setVolume(e) {
|
|
73
|
+
this.callPlayer("setVolume", e);
|
|
74
|
+
}
|
|
75
|
+
getDuration() {
|
|
76
|
+
return this.callPlayer("getDuration");
|
|
77
|
+
}
|
|
78
|
+
getCurrentTime() {
|
|
79
|
+
return this.callPlayer("getCurrentTime");
|
|
80
|
+
}
|
|
81
|
+
getSecondsLoaded() {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
return /* @__PURE__ */ v.default.createElement("div", {
|
|
86
|
+
style: {
|
|
87
|
+
width: "100%",
|
|
88
|
+
height: "100%"
|
|
89
|
+
},
|
|
90
|
+
id: this.playerID
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
g(w, "displayName", "Twitch"), g(w, "canPlay", b.canPlay.twitch), g(w, "loopOnEnded", !0);
|
|
95
|
+
}));
|
|
96
|
+
//#endregion
|
|
97
|
+
export default i();
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { i as e, t } from "./chunk-jwUa06l-.js";
|
|
2
|
+
import { n, t as r } from "./ai-tutor.js";
|
|
3
|
+
//#region node_modules/react-player/lib/players/Vidyard.js
|
|
4
|
+
var i = /* @__PURE__ */ t(((t, i) => {
|
|
5
|
+
var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, c = Object.getOwnPropertyNames, l = Object.getPrototypeOf, u = Object.prototype.hasOwnProperty, d = (e, t, n) => t in e ? o(e, t, {
|
|
6
|
+
enumerable: !0,
|
|
7
|
+
configurable: !0,
|
|
8
|
+
writable: !0,
|
|
9
|
+
value: n
|
|
10
|
+
}) : e[t] = n, f = (e, t) => {
|
|
11
|
+
for (var n in t) o(e, n, {
|
|
12
|
+
get: t[n],
|
|
13
|
+
enumerable: !0
|
|
14
|
+
});
|
|
15
|
+
}, p = (e, t, n, r) => {
|
|
16
|
+
if (t && typeof t == "object" || typeof t == "function") for (let i of c(t)) !u.call(e, i) && i !== n && o(e, i, {
|
|
17
|
+
get: () => t[i],
|
|
18
|
+
enumerable: !(r = s(t, i)) || r.enumerable
|
|
19
|
+
});
|
|
20
|
+
return e;
|
|
21
|
+
}, m = (e, t, n) => (n = e == null ? {} : a(l(e)), p(t || !e || !e.__esModule ? o(n, "default", {
|
|
22
|
+
value: e,
|
|
23
|
+
enumerable: !0
|
|
24
|
+
}) : n, e)), h = (e) => p(o({}, "__esModule", { value: !0 }), e), g = (e, t, n) => (d(e, typeof t == "symbol" ? t : t + "", n), n), _ = {};
|
|
25
|
+
f(_, { default: () => w }), i.exports = h(_);
|
|
26
|
+
var v = m(e("react")), y = n(), b = r(), x = "https://play.vidyard.com/embed/v4.js", S = "VidyardV4", C = "onVidyardAPI", w = class extends v.Component {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments), g(this, "callPlayer", y.callPlayer), g(this, "mute", () => {
|
|
29
|
+
this.setVolume(0);
|
|
30
|
+
}), g(this, "unmute", () => {
|
|
31
|
+
this.props.volume !== null && this.setVolume(this.props.volume);
|
|
32
|
+
}), g(this, "ref", (e) => {
|
|
33
|
+
this.container = e;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
componentDidMount() {
|
|
37
|
+
this.props.onMount && this.props.onMount(this);
|
|
38
|
+
}
|
|
39
|
+
load(e) {
|
|
40
|
+
let { playing: t, config: n, onError: r, onDuration: i } = this.props, a = e && e.match(b.MATCH_URL_VIDYARD)[1];
|
|
41
|
+
this.player && this.stop(), (0, y.getSDK)(x, S, C).then((e) => {
|
|
42
|
+
this.container && (e.api.addReadyListener((e, t) => {
|
|
43
|
+
this.player || (this.player = t, 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));
|
|
44
|
+
}, a), e.api.renderPlayer({
|
|
45
|
+
uuid: a,
|
|
46
|
+
container: this.container,
|
|
47
|
+
autoplay: +!!t,
|
|
48
|
+
...n.options
|
|
49
|
+
}), e.api.getPlayerMetadata(a).then((e) => {
|
|
50
|
+
this.duration = e.length_in_seconds, i(e.length_in_seconds);
|
|
51
|
+
}));
|
|
52
|
+
}, r);
|
|
53
|
+
}
|
|
54
|
+
play() {
|
|
55
|
+
this.callPlayer("play");
|
|
56
|
+
}
|
|
57
|
+
pause() {
|
|
58
|
+
this.callPlayer("pause");
|
|
59
|
+
}
|
|
60
|
+
stop() {
|
|
61
|
+
window.VidyardV4.api.destroyPlayer(this.player);
|
|
62
|
+
}
|
|
63
|
+
seekTo(e, t = !0) {
|
|
64
|
+
this.callPlayer("seek", e), t || this.pause();
|
|
65
|
+
}
|
|
66
|
+
setVolume(e) {
|
|
67
|
+
this.callPlayer("setVolume", e);
|
|
68
|
+
}
|
|
69
|
+
setPlaybackRate(e) {
|
|
70
|
+
this.callPlayer("setPlaybackSpeed", e);
|
|
71
|
+
}
|
|
72
|
+
getDuration() {
|
|
73
|
+
return this.duration;
|
|
74
|
+
}
|
|
75
|
+
getCurrentTime() {
|
|
76
|
+
return this.callPlayer("currentTime");
|
|
77
|
+
}
|
|
78
|
+
getSecondsLoaded() {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
let { display: e } = this.props, t = {
|
|
83
|
+
width: "100%",
|
|
84
|
+
height: "100%",
|
|
85
|
+
display: e
|
|
86
|
+
};
|
|
87
|
+
return /* @__PURE__ */ v.default.createElement("div", { style: t }, /* @__PURE__ */ v.default.createElement("div", { ref: this.ref }));
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
g(w, "displayName", "Vidyard"), g(w, "canPlay", b.canPlay.vidyard);
|
|
91
|
+
}));
|
|
92
|
+
//#endregion
|
|
93
|
+
export default i();
|