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
package/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# React + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
|
9
|
+
|
|
10
|
+
## React Compiler
|
|
11
|
+
|
|
12
|
+
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
|
13
|
+
|
|
14
|
+
## Expanding the ESLint configuration
|
|
15
|
+
|
|
16
|
+
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.
|
|
@@ -0,0 +1,113 @@
|
|
|
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/DailyMotion.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://api.dmcdn.net/all.js", S = "DM", C = "dmAsyncInit", w = class extends v.Component {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments), g(this, "callPlayer", y.callPlayer), g(this, "onDurationChange", () => {
|
|
29
|
+
let e = this.getDuration();
|
|
30
|
+
this.props.onDuration(e);
|
|
31
|
+
}), g(this, "mute", () => {
|
|
32
|
+
this.callPlayer("setMuted", !0);
|
|
33
|
+
}), g(this, "unmute", () => {
|
|
34
|
+
this.callPlayer("setMuted", !1);
|
|
35
|
+
}), g(this, "ref", (e) => {
|
|
36
|
+
this.container = e;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
componentDidMount() {
|
|
40
|
+
this.props.onMount && this.props.onMount(this);
|
|
41
|
+
}
|
|
42
|
+
load(e) {
|
|
43
|
+
let { controls: t, config: n, onError: r, playing: i } = this.props, [, a] = e.match(b.MATCH_URL_DAILYMOTION);
|
|
44
|
+
if (this.player) {
|
|
45
|
+
this.player.load(a, {
|
|
46
|
+
start: (0, y.parseStartTime)(e),
|
|
47
|
+
autoplay: i
|
|
48
|
+
});
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
(0, y.getSDK)(x, S, C, (e) => e.player).then((i) => {
|
|
52
|
+
if (!this.container) return;
|
|
53
|
+
let o = i.player;
|
|
54
|
+
this.player = new o(this.container, {
|
|
55
|
+
width: "100%",
|
|
56
|
+
height: "100%",
|
|
57
|
+
video: a,
|
|
58
|
+
params: {
|
|
59
|
+
controls: t,
|
|
60
|
+
autoplay: this.props.playing,
|
|
61
|
+
mute: this.props.muted,
|
|
62
|
+
start: (0, y.parseStartTime)(e),
|
|
63
|
+
origin: window.location.origin,
|
|
64
|
+
...n.params
|
|
65
|
+
},
|
|
66
|
+
events: {
|
|
67
|
+
apiready: this.props.onReady,
|
|
68
|
+
seeked: () => this.props.onSeek(this.player.currentTime),
|
|
69
|
+
video_end: this.props.onEnded,
|
|
70
|
+
durationchange: this.onDurationChange,
|
|
71
|
+
pause: this.props.onPause,
|
|
72
|
+
playing: this.props.onPlay,
|
|
73
|
+
waiting: this.props.onBuffer,
|
|
74
|
+
error: (e) => r(e)
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}, r);
|
|
78
|
+
}
|
|
79
|
+
play() {
|
|
80
|
+
this.callPlayer("play");
|
|
81
|
+
}
|
|
82
|
+
pause() {
|
|
83
|
+
this.callPlayer("pause");
|
|
84
|
+
}
|
|
85
|
+
stop() {}
|
|
86
|
+
seekTo(e, t = !0) {
|
|
87
|
+
this.callPlayer("seek", e), t || this.pause();
|
|
88
|
+
}
|
|
89
|
+
setVolume(e) {
|
|
90
|
+
this.callPlayer("setVolume", e);
|
|
91
|
+
}
|
|
92
|
+
getDuration() {
|
|
93
|
+
return this.player.duration || null;
|
|
94
|
+
}
|
|
95
|
+
getCurrentTime() {
|
|
96
|
+
return this.player.currentTime;
|
|
97
|
+
}
|
|
98
|
+
getSecondsLoaded() {
|
|
99
|
+
return this.player.bufferedTime;
|
|
100
|
+
}
|
|
101
|
+
render() {
|
|
102
|
+
let { display: e } = this.props, t = {
|
|
103
|
+
width: "100%",
|
|
104
|
+
height: "100%",
|
|
105
|
+
display: e
|
|
106
|
+
};
|
|
107
|
+
return /* @__PURE__ */ v.default.createElement("div", { style: t }, /* @__PURE__ */ v.default.createElement("div", { ref: this.ref }));
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
g(w, "displayName", "DailyMotion"), g(w, "canPlay", b.canPlay.dailymotion), g(w, "loopOnEnded", !0);
|
|
111
|
+
}));
|
|
112
|
+
//#endregion
|
|
113
|
+
export default i();
|
|
@@ -0,0 +1,96 @@
|
|
|
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/Facebook.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: () => T }), i.exports = h(_);
|
|
26
|
+
var v = m(e("react")), y = n(), b = r(), x = "https://connect.facebook.net/en_US/sdk.js", S = "FB", C = "fbAsyncInit", w = "facebook-player-", T = class extends v.Component {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments), g(this, "callPlayer", y.callPlayer), g(this, "playerID", this.props.config.playerId || `${w}${(0, y.randomString)()}`), g(this, "mute", () => {
|
|
29
|
+
this.callPlayer("mute");
|
|
30
|
+
}), g(this, "unmute", () => {
|
|
31
|
+
this.callPlayer("unmute");
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
componentDidMount() {
|
|
35
|
+
this.props.onMount && this.props.onMount(this);
|
|
36
|
+
}
|
|
37
|
+
load(e, t) {
|
|
38
|
+
if (t) {
|
|
39
|
+
(0, y.getSDK)(x, S, C).then((e) => e.XFBML.parse());
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
(0, y.getSDK)(x, S, C).then((e) => {
|
|
43
|
+
e.init({
|
|
44
|
+
appId: this.props.config.appId,
|
|
45
|
+
xfbml: !0,
|
|
46
|
+
version: this.props.config.version
|
|
47
|
+
}), e.Event.subscribe("xfbml.render", (e) => {
|
|
48
|
+
this.props.onLoaded();
|
|
49
|
+
}), e.Event.subscribe("xfbml.ready", (e) => {
|
|
50
|
+
e.type === "video" && e.id === this.playerID && (this.player = e.instance, this.player.subscribe("startedPlaying", this.props.onPlay), this.player.subscribe("paused", this.props.onPause), this.player.subscribe("finishedPlaying", this.props.onEnded), this.player.subscribe("startedBuffering", this.props.onBuffer), this.player.subscribe("finishedBuffering", this.props.onBufferEnd), this.player.subscribe("error", this.props.onError), this.props.muted ? this.callPlayer("mute") : this.callPlayer("unmute"), this.props.onReady(), document.getElementById(this.playerID).querySelector("iframe").style.visibility = "visible");
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
play() {
|
|
55
|
+
this.callPlayer("play");
|
|
56
|
+
}
|
|
57
|
+
pause() {
|
|
58
|
+
this.callPlayer("pause");
|
|
59
|
+
}
|
|
60
|
+
stop() {}
|
|
61
|
+
seekTo(e, t = !0) {
|
|
62
|
+
this.callPlayer("seek", e), t || this.pause();
|
|
63
|
+
}
|
|
64
|
+
setVolume(e) {
|
|
65
|
+
this.callPlayer("setVolume", e);
|
|
66
|
+
}
|
|
67
|
+
getDuration() {
|
|
68
|
+
return this.callPlayer("getDuration");
|
|
69
|
+
}
|
|
70
|
+
getCurrentTime() {
|
|
71
|
+
return this.callPlayer("getCurrentPosition");
|
|
72
|
+
}
|
|
73
|
+
getSecondsLoaded() {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
let { attributes: e } = this.props.config;
|
|
78
|
+
return /* @__PURE__ */ v.default.createElement("div", {
|
|
79
|
+
style: {
|
|
80
|
+
width: "100%",
|
|
81
|
+
height: "100%"
|
|
82
|
+
},
|
|
83
|
+
id: this.playerID,
|
|
84
|
+
className: "fb-video",
|
|
85
|
+
"data-href": this.props.url,
|
|
86
|
+
"data-autoplay": this.props.playing ? "true" : "false",
|
|
87
|
+
"data-allowfullscreen": "true",
|
|
88
|
+
"data-controls": this.props.controls ? "true" : "false",
|
|
89
|
+
...e
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
g(T, "displayName", "Facebook"), g(T, "canPlay", b.canPlay.facebook), g(T, "loopOnEnded", !0);
|
|
94
|
+
}));
|
|
95
|
+
//#endregion
|
|
96
|
+
export default i();
|
|
@@ -0,0 +1,182 @@
|
|
|
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/FilePlayer.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: () => P }), i.exports = h(_);
|
|
26
|
+
var v = m(e("react")), y = n(), b = r(), x = typeof navigator < "u", S = x && navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1, C = x && (/iPad|iPhone|iPod/.test(navigator.userAgent) || S) && !window.MSStream, w = x && /^((?!chrome|android).)*safari/i.test(navigator.userAgent) && !window.MSStream, T = "https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js", E = "Hls", D = "https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js", O = "dashjs", k = "https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js", A = "flvjs", j = /www\.dropbox\.com\/.+/, M = /https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/, N = "https://videodelivery.net/{id}/manifest/video.m3u8", P = class extends v.Component {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments), g(this, "onReady", (...e) => this.props.onReady(...e)), g(this, "onPlay", (...e) => this.props.onPlay(...e)), g(this, "onBuffer", (...e) => this.props.onBuffer(...e)), g(this, "onBufferEnd", (...e) => this.props.onBufferEnd(...e)), g(this, "onPause", (...e) => this.props.onPause(...e)), g(this, "onEnded", (...e) => this.props.onEnded(...e)), g(this, "onError", (...e) => this.props.onError(...e)), g(this, "onPlayBackRateChange", (e) => this.props.onPlaybackRateChange(e.target.playbackRate)), g(this, "onEnablePIP", (...e) => this.props.onEnablePIP(...e)), g(this, "onDisablePIP", (e) => {
|
|
29
|
+
let { onDisablePIP: t, playing: n } = this.props;
|
|
30
|
+
t(e), n && this.play();
|
|
31
|
+
}), g(this, "onPresentationModeChange", (e) => {
|
|
32
|
+
if (this.player && (0, y.supportsWebKitPresentationMode)(this.player)) {
|
|
33
|
+
let { webkitPresentationMode: t } = this.player;
|
|
34
|
+
t === "picture-in-picture" ? this.onEnablePIP(e) : t === "inline" && this.onDisablePIP(e);
|
|
35
|
+
}
|
|
36
|
+
}), g(this, "onSeek", (e) => {
|
|
37
|
+
this.props.onSeek(e.target.currentTime);
|
|
38
|
+
}), g(this, "mute", () => {
|
|
39
|
+
this.player.muted = !0;
|
|
40
|
+
}), g(this, "unmute", () => {
|
|
41
|
+
this.player.muted = !1;
|
|
42
|
+
}), g(this, "renderSourceElement", (e, t) => typeof e == "string" ? /* @__PURE__ */ v.default.createElement("source", {
|
|
43
|
+
key: t,
|
|
44
|
+
src: e
|
|
45
|
+
}) : /* @__PURE__ */ v.default.createElement("source", {
|
|
46
|
+
key: t,
|
|
47
|
+
...e
|
|
48
|
+
})), g(this, "renderTrack", (e, t) => /* @__PURE__ */ v.default.createElement("track", {
|
|
49
|
+
key: t,
|
|
50
|
+
...e
|
|
51
|
+
})), g(this, "ref", (e) => {
|
|
52
|
+
this.player && (this.prevPlayer = this.player), this.player = e;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
componentDidMount() {
|
|
56
|
+
this.props.onMount && this.props.onMount(this), this.addListeners(this.player);
|
|
57
|
+
let e = this.getSource(this.props.url);
|
|
58
|
+
e && (this.player.src = e), (C || this.props.config.forceDisableHls) && this.player.load();
|
|
59
|
+
}
|
|
60
|
+
componentDidUpdate(e) {
|
|
61
|
+
this.shouldUseAudio(this.props) !== this.shouldUseAudio(e) && (this.removeListeners(this.prevPlayer, e.url), this.addListeners(this.player)), this.props.url !== e.url && !(0, y.isMediaStream)(this.props.url) && !(this.props.url instanceof Array) && (this.player.srcObject = null);
|
|
62
|
+
}
|
|
63
|
+
componentWillUnmount() {
|
|
64
|
+
this.player.removeAttribute("src"), this.removeListeners(this.player), this.hls && this.hls.destroy();
|
|
65
|
+
}
|
|
66
|
+
addListeners(e) {
|
|
67
|
+
let { url: t, playsinline: n } = this.props;
|
|
68
|
+
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), this.shouldUseHLS(t) || e.addEventListener("canplay", this.onReady), n && (e.setAttribute("playsinline", ""), e.setAttribute("webkit-playsinline", ""), e.setAttribute("x5-playsinline", ""));
|
|
69
|
+
}
|
|
70
|
+
removeListeners(e, t) {
|
|
71
|
+
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("webkitpresentationmodechanged", this.onPresentationModeChange), this.shouldUseHLS(t) || e.removeEventListener("canplay", this.onReady);
|
|
72
|
+
}
|
|
73
|
+
shouldUseAudio(e) {
|
|
74
|
+
return e.config.forceVideo || e.config.attributes.poster ? !1 : b.AUDIO_EXTENSIONS.test(e.url) || e.config.forceAudio;
|
|
75
|
+
}
|
|
76
|
+
shouldUseHLS(e) {
|
|
77
|
+
return w && this.props.config.forceSafariHLS || this.props.config.forceHLS ? !0 : C || this.props.config.forceDisableHls ? !1 : b.HLS_EXTENSIONS.test(e) || M.test(e);
|
|
78
|
+
}
|
|
79
|
+
shouldUseDASH(e) {
|
|
80
|
+
return b.DASH_EXTENSIONS.test(e) || this.props.config.forceDASH;
|
|
81
|
+
}
|
|
82
|
+
shouldUseFLV(e) {
|
|
83
|
+
return b.FLV_EXTENSIONS.test(e) || this.props.config.forceFLV;
|
|
84
|
+
}
|
|
85
|
+
load(e) {
|
|
86
|
+
let { hlsVersion: t, hlsOptions: n, dashVersion: r, flvVersion: i } = this.props.config;
|
|
87
|
+
if (this.hls && this.hls.destroy(), this.dash && this.dash.reset(), this.shouldUseHLS(e) && (0, y.getSDK)(T.replace("VERSION", t), E).then((t) => {
|
|
88
|
+
if (this.hls = new t(n), this.hls.on(t.Events.MANIFEST_PARSED, () => {
|
|
89
|
+
this.props.onReady();
|
|
90
|
+
}), this.hls.on(t.Events.ERROR, (e, n) => {
|
|
91
|
+
this.props.onError(e, n, this.hls, t);
|
|
92
|
+
}), M.test(e)) {
|
|
93
|
+
let t = e.match(M)[1];
|
|
94
|
+
this.hls.loadSource(N.replace("{id}", t));
|
|
95
|
+
} else this.hls.loadSource(e);
|
|
96
|
+
this.hls.attachMedia(this.player), this.props.onLoaded();
|
|
97
|
+
}), this.shouldUseDASH(e) && (0, y.getSDK)(D.replace("VERSION", r), O).then((t) => {
|
|
98
|
+
this.dash = t.MediaPlayer().create(), this.dash.initialize(this.player, e, this.props.playing), this.dash.on("error", this.props.onError), parseInt(r) < 3 ? this.dash.getDebug().setLogToBrowserConsole(!1) : this.dash.updateSettings({ debug: { logLevel: t.Debug.LOG_LEVEL_NONE } }), this.props.onLoaded();
|
|
99
|
+
}), this.shouldUseFLV(e) && (0, y.getSDK)(k.replace("VERSION", i), A).then((t) => {
|
|
100
|
+
this.flv = t.createPlayer({
|
|
101
|
+
type: "flv",
|
|
102
|
+
url: e
|
|
103
|
+
}), this.flv.attachMediaElement(this.player), this.flv.on(t.Events.ERROR, (e, n) => {
|
|
104
|
+
this.props.onError(e, n, this.flv, t);
|
|
105
|
+
}), this.flv.load(), this.props.onLoaded();
|
|
106
|
+
}), e instanceof Array) this.player.load();
|
|
107
|
+
else if ((0, y.isMediaStream)(e)) try {
|
|
108
|
+
this.player.srcObject = e;
|
|
109
|
+
} catch {
|
|
110
|
+
this.player.src = window.URL.createObjectURL(e);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
play() {
|
|
114
|
+
let e = this.player.play();
|
|
115
|
+
e && e.catch(this.props.onError);
|
|
116
|
+
}
|
|
117
|
+
pause() {
|
|
118
|
+
this.player.pause();
|
|
119
|
+
}
|
|
120
|
+
stop() {
|
|
121
|
+
this.player.removeAttribute("src"), this.dash && this.dash.reset();
|
|
122
|
+
}
|
|
123
|
+
seekTo(e, t = !0) {
|
|
124
|
+
this.player.currentTime = e, t || this.pause();
|
|
125
|
+
}
|
|
126
|
+
setVolume(e) {
|
|
127
|
+
this.player.volume = e;
|
|
128
|
+
}
|
|
129
|
+
enablePIP() {
|
|
130
|
+
this.player.requestPictureInPicture && document.pictureInPictureElement !== this.player ? this.player.requestPictureInPicture() : (0, y.supportsWebKitPresentationMode)(this.player) && this.player.webkitPresentationMode !== "picture-in-picture" && this.player.webkitSetPresentationMode("picture-in-picture");
|
|
131
|
+
}
|
|
132
|
+
disablePIP() {
|
|
133
|
+
document.exitPictureInPicture && document.pictureInPictureElement === this.player ? document.exitPictureInPicture() : (0, y.supportsWebKitPresentationMode)(this.player) && this.player.webkitPresentationMode !== "inline" && this.player.webkitSetPresentationMode("inline");
|
|
134
|
+
}
|
|
135
|
+
setPlaybackRate(e) {
|
|
136
|
+
try {
|
|
137
|
+
this.player.playbackRate = e;
|
|
138
|
+
} catch (e) {
|
|
139
|
+
this.props.onError(e);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
getDuration() {
|
|
143
|
+
if (!this.player) return null;
|
|
144
|
+
let { duration: e, seekable: t } = this.player;
|
|
145
|
+
return e === Infinity && t.length > 0 ? t.end(t.length - 1) : e;
|
|
146
|
+
}
|
|
147
|
+
getCurrentTime() {
|
|
148
|
+
return this.player ? this.player.currentTime : null;
|
|
149
|
+
}
|
|
150
|
+
getSecondsLoaded() {
|
|
151
|
+
if (!this.player) return null;
|
|
152
|
+
let { buffered: e } = this.player;
|
|
153
|
+
if (e.length === 0) return 0;
|
|
154
|
+
let t = e.end(e.length - 1), n = this.getDuration();
|
|
155
|
+
return t > n ? n : t;
|
|
156
|
+
}
|
|
157
|
+
getSource(e) {
|
|
158
|
+
let t = this.shouldUseHLS(e), n = this.shouldUseDASH(e), r = this.shouldUseFLV(e);
|
|
159
|
+
if (!(e instanceof Array || (0, y.isMediaStream)(e) || t || n || r)) return j.test(e) ? e.replace("www.dropbox.com", "dl.dropboxusercontent.com") : e;
|
|
160
|
+
}
|
|
161
|
+
render() {
|
|
162
|
+
let { url: e, playing: t, loop: n, controls: r, muted: i, config: a, width: o, height: s } = this.props, c = this.shouldUseAudio(this.props) ? "audio" : "video", l = {
|
|
163
|
+
width: o === "auto" ? o : "100%",
|
|
164
|
+
height: s === "auto" ? s : "100%"
|
|
165
|
+
};
|
|
166
|
+
return /* @__PURE__ */ v.default.createElement(c, {
|
|
167
|
+
ref: this.ref,
|
|
168
|
+
src: this.getSource(e),
|
|
169
|
+
style: l,
|
|
170
|
+
preload: "auto",
|
|
171
|
+
autoPlay: t || void 0,
|
|
172
|
+
controls: r,
|
|
173
|
+
muted: i,
|
|
174
|
+
loop: n,
|
|
175
|
+
...a.attributes
|
|
176
|
+
}, e instanceof Array && e.map(this.renderSourceElement), a.tracks.map(this.renderTrack));
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
g(P, "displayName", "FilePlayer"), g(P, "canPlay", b.canPlay.file);
|
|
180
|
+
}));
|
|
181
|
+
//#endregion
|
|
182
|
+
export default i();
|
|
@@ -0,0 +1,96 @@
|
|
|
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/Kaltura.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.on("ready", () => {
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
this.player.isReady = !0, this.player.setLoop(this.props.loop), this.props.muted && this.player.mute(), this.addListeners(this.player, this.props), this.props.onReady();
|
|
44
|
+
}, 500);
|
|
45
|
+
}));
|
|
46
|
+
}, this.props.onError);
|
|
47
|
+
}
|
|
48
|
+
addListeners(e, t) {
|
|
49
|
+
e.on("play", t.onPlay), e.on("pause", t.onPause), e.on("ended", t.onEnded), e.on("error", t.onError), e.on("timeupdate", ({ duration: e, seconds: t }) => {
|
|
50
|
+
this.duration = e, this.currentTime = t;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
play() {
|
|
54
|
+
this.callPlayer("play");
|
|
55
|
+
}
|
|
56
|
+
pause() {
|
|
57
|
+
this.callPlayer("pause");
|
|
58
|
+
}
|
|
59
|
+
stop() {}
|
|
60
|
+
seekTo(e, t = !0) {
|
|
61
|
+
this.callPlayer("setCurrentTime", e), t || this.pause();
|
|
62
|
+
}
|
|
63
|
+
setVolume(e) {
|
|
64
|
+
this.callPlayer("setVolume", e);
|
|
65
|
+
}
|
|
66
|
+
setLoop(e) {
|
|
67
|
+
this.callPlayer("setLoop", e);
|
|
68
|
+
}
|
|
69
|
+
getDuration() {
|
|
70
|
+
return this.duration;
|
|
71
|
+
}
|
|
72
|
+
getCurrentTime() {
|
|
73
|
+
return this.currentTime;
|
|
74
|
+
}
|
|
75
|
+
getSecondsLoaded() {
|
|
76
|
+
return this.secondsLoaded;
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
return /* @__PURE__ */ v.default.createElement("iframe", {
|
|
80
|
+
ref: this.ref,
|
|
81
|
+
src: this.props.url,
|
|
82
|
+
frameBorder: "0",
|
|
83
|
+
scrolling: "no",
|
|
84
|
+
style: {
|
|
85
|
+
width: "100%",
|
|
86
|
+
height: "100%"
|
|
87
|
+
},
|
|
88
|
+
allow: "encrypted-media; autoplay; fullscreen;",
|
|
89
|
+
referrerPolicy: "no-referrer-when-downgrade"
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
g(C, "displayName", "Kaltura"), g(C, "canPlay", b.canPlay.kaltura);
|
|
94
|
+
}));
|
|
95
|
+
//#endregion
|
|
96
|
+
export default i();
|
|
@@ -0,0 +1,85 @@
|
|
|
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/Mixcloud.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://widget.mixcloud.com/media/js/widgetApi.js", S = "Mixcloud", 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", () => {}), g(this, "unmute", () => {}), g(this, "ref", (e) => {
|
|
29
|
+
this.iframe = e;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
componentDidMount() {
|
|
33
|
+
this.props.onMount && this.props.onMount(this);
|
|
34
|
+
}
|
|
35
|
+
load(e) {
|
|
36
|
+
(0, y.getSDK)(x, S).then((e) => {
|
|
37
|
+
this.player = e.PlayerWidget(this.iframe), this.player.ready.then(() => {
|
|
38
|
+
this.player.events.play.on(this.props.onPlay), this.player.events.pause.on(this.props.onPause), this.player.events.ended.on(this.props.onEnded), this.player.events.error.on(this.props.error), this.player.events.progress.on((e, t) => {
|
|
39
|
+
this.currentTime = e, this.duration = t;
|
|
40
|
+
}), this.props.onReady();
|
|
41
|
+
});
|
|
42
|
+
}, this.props.onError);
|
|
43
|
+
}
|
|
44
|
+
play() {
|
|
45
|
+
this.callPlayer("play");
|
|
46
|
+
}
|
|
47
|
+
pause() {
|
|
48
|
+
this.callPlayer("pause");
|
|
49
|
+
}
|
|
50
|
+
stop() {}
|
|
51
|
+
seekTo(e, t = !0) {
|
|
52
|
+
this.callPlayer("seek", e), t || this.pause();
|
|
53
|
+
}
|
|
54
|
+
setVolume(e) {}
|
|
55
|
+
getDuration() {
|
|
56
|
+
return this.duration;
|
|
57
|
+
}
|
|
58
|
+
getCurrentTime() {
|
|
59
|
+
return this.currentTime;
|
|
60
|
+
}
|
|
61
|
+
getSecondsLoaded() {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
let { url: e, config: t } = this.props, n = e.match(b.MATCH_URL_MIXCLOUD)[1], r = {
|
|
66
|
+
width: "100%",
|
|
67
|
+
height: "100%"
|
|
68
|
+
}, i = (0, y.queryString)({
|
|
69
|
+
...t.options,
|
|
70
|
+
feed: `/${n}/`
|
|
71
|
+
});
|
|
72
|
+
return /* @__PURE__ */ v.default.createElement("iframe", {
|
|
73
|
+
key: n,
|
|
74
|
+
ref: this.ref,
|
|
75
|
+
style: r,
|
|
76
|
+
src: `https://player-widget.mixcloud.com/widget/iframe/?${i}`,
|
|
77
|
+
frameBorder: "0",
|
|
78
|
+
allow: "autoplay"
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
g(C, "displayName", "Mixcloud"), g(C, "canPlay", b.canPlay.mixcloud), g(C, "loopOnEnded", !0);
|
|
83
|
+
}));
|
|
84
|
+
//#endregion
|
|
85
|
+
export default i();
|