suada-components 1.0.2504170948 → 1.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/dist/components/BreadCrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.interface.d.ts +1 -0
- package/dist/components/DailyMotion-B2EpqlJO.esm.js +178 -0
- package/dist/components/DailyMotion-BYA5rhY5.js +180 -0
- package/dist/components/Facebook-DBxSErS8.esm.js +179 -0
- package/dist/components/Facebook-DJMdBwGM.js +181 -0
- package/dist/components/FilePlayer-DLiC_Doh.esm.js +408 -0
- package/dist/components/FilePlayer-DRqq2T-L.js +410 -0
- package/dist/components/Kaltura-BAvKhQp8.esm.js +176 -0
- package/dist/components/Kaltura-DFK3UxTc.js +178 -0
- package/dist/components/Mixcloud-C0S4Txcb.esm.js +164 -0
- package/dist/components/Mixcloud-CnG6kbdi.js +166 -0
- package/dist/components/Mux-BCS9rYAf.esm.js +264 -0
- package/dist/components/Mux-ChXwYRDL.js +266 -0
- package/dist/components/Preview-CPdzmWpt.js +175 -0
- package/dist/components/Preview-MgDcO7wW.esm.js +173 -0
- package/dist/components/SoundCloud-BxxMgfs2.esm.js +181 -0
- package/dist/components/SoundCloud-CcFGRoSv.js +183 -0
- package/dist/components/Streamable-BIBOfZ0w.js +176 -0
- package/dist/components/Streamable-Drn6K8AN.esm.js +174 -0
- package/dist/components/Twitch-CGC2HQMj.esm.js +168 -0
- package/dist/components/Twitch-DoUQRPQR.js +170 -0
- package/dist/components/VideoPlayer/Controls/Controls.d.ts +4 -0
- package/dist/components/VideoPlayer/Controls/Controls.interface.d.ts +32 -0
- package/dist/components/VideoPlayer/Controls/Controls.interface.js +2 -0
- package/dist/components/VideoPlayer/Controls/Controls.interface.js.map +1 -0
- package/dist/components/VideoPlayer/Controls/Controls.js +36 -0
- package/dist/components/VideoPlayer/Controls/Controls.js.map +1 -0
- package/dist/components/VideoPlayer/Controls/Controls.styles.d.ts +16 -0
- package/dist/components/VideoPlayer/Controls/Controls.styles.js +25 -0
- package/dist/components/VideoPlayer/Controls/Controls.styles.js.map +1 -0
- package/dist/components/VideoPlayer/Controls/index.d.ts +1 -0
- package/dist/components/VideoPlayer/Controls/index.js +2 -0
- package/dist/components/VideoPlayer/Controls/index.js.map +1 -0
- package/dist/components/VideoPlayer/PlaybackSpeedMenu.d.ts +4 -0
- package/dist/components/VideoPlayer/PlaybackSpeedMenu.interface.d.ts +18 -0
- package/dist/components/VideoPlayer/PlaybackSpeedMenu.interface.js +2 -0
- package/dist/components/VideoPlayer/PlaybackSpeedMenu.interface.js.map +1 -0
- package/dist/components/VideoPlayer/PlaybackSpeedMenu.js +20 -0
- package/dist/components/VideoPlayer/PlaybackSpeedMenu.js.map +1 -0
- package/dist/components/VideoPlayer/PlaybackSpeedMenu.styles.d.ts +4 -0
- package/dist/components/VideoPlayer/PlaybackSpeedMenu.styles.js +18 -0
- package/dist/components/VideoPlayer/PlaybackSpeedMenu.styles.js.map +1 -0
- package/dist/components/VideoPlayer/Player.d.ts +3 -11
- package/dist/components/VideoPlayer/Player.interface.d.ts +63 -0
- package/dist/components/VideoPlayer/Player.interface.js +2 -0
- package/dist/components/VideoPlayer/Player.interface.js.map +1 -0
- package/dist/components/VideoPlayer/Player.js +82 -97
- package/dist/components/VideoPlayer/Player.js.map +1 -1
- package/dist/components/VideoPlayer/Player.styles.d.ts +8 -0
- package/dist/components/VideoPlayer/Player.styles.js +17 -0
- package/dist/components/VideoPlayer/Player.styles.js.map +1 -0
- package/dist/components/VideoPlayer/VideoPlayer.stories.d.ts +10 -26
- package/dist/components/VideoPlayer/VideoPlayer.stories.js +174 -19
- package/dist/components/VideoPlayer/VideoPlayer.stories.js.map +1 -1
- package/dist/components/VideoPlayer/constants/index.d.ts +2 -0
- package/dist/components/VideoPlayer/constants/index.js +31 -0
- package/dist/components/VideoPlayer/constants/index.js.map +1 -0
- package/dist/components/VideoPlayer/parseVtt.d.ts +6 -0
- package/dist/components/VideoPlayer/parseVtt.js +35 -0
- package/dist/components/VideoPlayer/parseVtt.js.map +1 -0
- package/dist/components/VideoPlayer/timeConversion.d.ts +5 -0
- package/dist/components/VideoPlayer/timeConversion.js +70 -0
- package/dist/components/VideoPlayer/timeConversion.js.map +1 -0
- package/dist/components/VideoPlayer/useDynamicPosition.d.ts +16 -0
- package/dist/components/VideoPlayer/useDynamicPosition.js +50 -0
- package/dist/components/VideoPlayer/useDynamicPosition.js.map +1 -0
- package/dist/components/VideoPlayer/useEventListener.d.ts +3 -0
- package/dist/components/VideoPlayer/useEventListener.js +27 -0
- package/dist/components/VideoPlayer/useEventListener.js.map +1 -0
- package/dist/components/VideoPlayer/useMenuToggle.d.ts +22 -0
- package/dist/components/VideoPlayer/useMenuToggle.js +25 -0
- package/dist/components/VideoPlayer/useMenuToggle.js.map +1 -0
- package/dist/components/VideoPlayer/useOnOutsideClick.d.ts +3 -0
- package/dist/components/VideoPlayer/useOnOutsideClick.js +16 -0
- package/dist/components/VideoPlayer/useOnOutsideClick.js.map +1 -0
- package/dist/components/VideoPlayer/usePlayerControls.d.ts +3 -0
- package/dist/components/VideoPlayer/usePlayerControls.js +330 -0
- package/dist/components/VideoPlayer/usePlayerControls.js.map +1 -0
- package/dist/components/Vidyard-B-jW75yA.esm.js +172 -0
- package/dist/components/Vidyard-If2H-ayj.js +174 -0
- package/dist/components/Vimeo-Cvg3rB5o.esm.js +213 -0
- package/dist/components/Vimeo-hI3cddOi.js +215 -0
- package/dist/components/Wistia-BtYIM6Uo.esm.js +188 -0
- package/dist/components/Wistia-CZwfIsgx.js +190 -0
- package/dist/components/YouTube-D1u9T9FZ.js +260 -0
- package/dist/components/YouTube-vwMwhQ13.esm.js +258 -0
- package/dist/components/components/Button/Button.interface.d.ts +1 -0
- package/dist/components/components/VideoPlayer/Controls/Controls.d.ts +4 -0
- package/dist/components/components/VideoPlayer/Controls/Controls.interface.d.ts +32 -0
- package/dist/components/components/VideoPlayer/Controls/Controls.styles.d.ts +16 -0
- package/dist/components/components/VideoPlayer/Controls/index.d.ts +1 -0
- package/dist/components/components/VideoPlayer/PlaybackSpeedMenu.d.ts +4 -0
- package/dist/components/components/VideoPlayer/PlaybackSpeedMenu.interface.d.ts +18 -0
- package/dist/components/components/VideoPlayer/PlaybackSpeedMenu.styles.d.ts +4 -0
- package/dist/components/components/VideoPlayer/Player.d.ts +3 -11
- package/dist/components/components/VideoPlayer/Player.interface.d.ts +63 -0
- package/dist/components/components/VideoPlayer/Player.styles.d.ts +8 -0
- package/dist/components/components/VideoPlayer/constants/index.d.ts +2 -0
- package/dist/components/components/VideoPlayer/parseVtt.d.ts +6 -0
- package/dist/components/components/VideoPlayer/timeConversion.d.ts +5 -0
- package/dist/components/components/VideoPlayer/useDynamicPosition.d.ts +16 -0
- package/dist/components/components/VideoPlayer/useEventListener.d.ts +3 -0
- package/dist/components/components/VideoPlayer/useMenuToggle.d.ts +22 -0
- package/dist/components/components/VideoPlayer/useOnOutsideClick.d.ts +3 -0
- package/dist/components/components/VideoPlayer/usePlayerControls.d.ts +3 -0
- package/dist/components/icons/Heart.d.ts +7 -0
- package/dist/components/icons/Maximize.d.ts +3 -0
- package/dist/components/icons/Meter.d.ts +3 -0
- package/dist/components/icons/Minimize.d.ts +3 -0
- package/dist/components/icons/Pause.d.ts +3 -0
- package/dist/components/icons/Play.d.ts +3 -0
- package/dist/components/icons/Rewind.d.ts +7 -0
- package/dist/components/icons/Skip.d.ts +8 -0
- package/dist/components/icons/Subtitles.d.ts +7 -0
- package/dist/components/icons/VideoCheckmark.d.ts +3 -0
- package/dist/components/icons/VolumeMute.d.ts +8 -0
- package/dist/components/icons/VolumeUp.d.ts +8 -0
- package/dist/components/icons/index.d.ts +11 -0
- package/dist/components/index-DLzCbCHu.esm.js +94482 -0
- package/dist/components/index-wLnkslO9.js +94536 -0
- package/dist/components/index.esm.js +3 -122501
- package/dist/icons/Heart.d.ts +7 -0
- package/dist/icons/Heart.js +28 -0
- package/dist/icons/Heart.js.map +1 -0
- package/dist/icons/Maximize.d.ts +3 -0
- package/dist/icons/Maximize.js +28 -0
- package/dist/icons/Maximize.js.map +1 -0
- package/dist/icons/Meter.d.ts +3 -0
- package/dist/icons/Meter.js +28 -0
- package/dist/icons/Meter.js.map +1 -0
- package/dist/icons/Minimize.d.ts +3 -0
- package/dist/icons/Minimize.js +28 -0
- package/dist/icons/Minimize.js.map +1 -0
- package/dist/icons/Pause.d.ts +3 -0
- package/dist/icons/Pause.js +28 -0
- package/dist/icons/Pause.js.map +1 -0
- package/dist/icons/Play.d.ts +3 -0
- package/dist/icons/Play.js +28 -0
- package/dist/icons/Play.js.map +1 -0
- package/dist/icons/Rewind.d.ts +7 -0
- package/dist/icons/Rewind.js +28 -0
- package/dist/icons/Rewind.js.map +1 -0
- package/dist/icons/Skip.d.ts +8 -0
- package/dist/icons/Skip.js +28 -0
- package/dist/icons/Skip.js.map +1 -0
- package/dist/icons/Subtitles.d.ts +7 -0
- package/dist/icons/Subtitles.js +28 -0
- package/dist/icons/Subtitles.js.map +1 -0
- package/dist/icons/VideoCheckmark.d.ts +3 -0
- package/dist/icons/VideoCheckmark.js +28 -0
- package/dist/icons/VideoCheckmark.js.map +1 -0
- package/dist/icons/VolumeMute.d.ts +8 -0
- package/dist/icons/VolumeMute.js +28 -0
- package/dist/icons/VolumeMute.js.map +1 -0
- package/dist/icons/VolumeUp.d.ts +8 -0
- package/dist/icons/VolumeUp.js +28 -0
- package/dist/icons/VolumeUp.js.map +1 -0
- package/dist/icons/components/Button/Button.interface.d.ts +1 -0
- package/dist/icons/components/VideoPlayer/Controls/Controls.d.ts +4 -0
- package/dist/icons/components/VideoPlayer/Controls/Controls.interface.d.ts +32 -0
- package/dist/icons/components/VideoPlayer/Controls/Controls.styles.d.ts +16 -0
- package/dist/icons/components/VideoPlayer/Controls/index.d.ts +1 -0
- package/dist/icons/components/VideoPlayer/PlaybackSpeedMenu.d.ts +4 -0
- package/dist/icons/components/VideoPlayer/PlaybackSpeedMenu.interface.d.ts +18 -0
- package/dist/icons/components/VideoPlayer/PlaybackSpeedMenu.styles.d.ts +4 -0
- package/dist/icons/components/VideoPlayer/Player.d.ts +3 -11
- package/dist/icons/components/VideoPlayer/Player.interface.d.ts +63 -0
- package/dist/icons/components/VideoPlayer/Player.styles.d.ts +8 -0
- package/dist/icons/components/VideoPlayer/constants/index.d.ts +2 -0
- package/dist/icons/components/VideoPlayer/parseVtt.d.ts +6 -0
- package/dist/icons/components/VideoPlayer/timeConversion.d.ts +5 -0
- package/dist/icons/components/VideoPlayer/useDynamicPosition.d.ts +16 -0
- package/dist/icons/components/VideoPlayer/useEventListener.d.ts +3 -0
- package/dist/icons/components/VideoPlayer/useMenuToggle.d.ts +22 -0
- package/dist/icons/components/VideoPlayer/useOnOutsideClick.d.ts +3 -0
- package/dist/icons/components/VideoPlayer/usePlayerControls.d.ts +3 -0
- package/dist/icons/icons/Heart.d.ts +7 -0
- package/dist/icons/icons/Maximize.d.ts +3 -0
- package/dist/icons/icons/Meter.d.ts +3 -0
- package/dist/icons/icons/Minimize.d.ts +3 -0
- package/dist/icons/icons/Pause.d.ts +3 -0
- package/dist/icons/icons/Play.d.ts +3 -0
- package/dist/icons/icons/Rewind.d.ts +7 -0
- package/dist/icons/icons/Skip.d.ts +8 -0
- package/dist/icons/icons/Subtitles.d.ts +7 -0
- package/dist/icons/icons/VideoCheckmark.d.ts +3 -0
- package/dist/icons/icons/VolumeMute.d.ts +8 -0
- package/dist/icons/icons/VolumeUp.d.ts +8 -0
- package/dist/icons/icons/index.d.ts +11 -0
- package/dist/icons/index.d.ts +11 -0
- package/dist/icons/index.esm.js +308 -1
- package/dist/icons/index.js +11 -0
- package/dist/icons/index.js.map +1 -1
- package/package.json +3 -1
- package/dist/components/VideoPlayer/styled-components.d.ts +0 -9
- package/dist/components/VideoPlayer/styled-components.js +0 -19
- package/dist/components/VideoPlayer/styled-components.js.map +0 -1
- package/dist/components/components/VideoPlayer/styled-components.d.ts +0 -9
- package/dist/icons/components/VideoPlayer/styled-components.d.ts +0 -9
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-wLnkslO9.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 Vidyard_1;
|
|
22
|
+
var hasRequiredVidyard;
|
|
23
|
+
|
|
24
|
+
function requireVidyard () {
|
|
25
|
+
if (hasRequiredVidyard) return Vidyard_1;
|
|
26
|
+
hasRequiredVidyard = 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 Vidyard_exports = {};
|
|
60
|
+
__export(Vidyard_exports, {
|
|
61
|
+
default: () => Vidyard
|
|
62
|
+
});
|
|
63
|
+
Vidyard_1 = __toCommonJS(Vidyard_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://play.vidyard.com/embed/v4.js";
|
|
68
|
+
const SDK_GLOBAL = "VidyardV4";
|
|
69
|
+
const SDK_GLOBAL_READY = "onVidyardAPI";
|
|
70
|
+
class Vidyard extends import_react.Component {
|
|
71
|
+
constructor() {
|
|
72
|
+
super(...arguments);
|
|
73
|
+
__publicField(this, "callPlayer", import_utils.callPlayer);
|
|
74
|
+
__publicField(this, "mute", () => {
|
|
75
|
+
this.setVolume(0);
|
|
76
|
+
});
|
|
77
|
+
__publicField(this, "unmute", () => {
|
|
78
|
+
if (this.props.volume !== null) {
|
|
79
|
+
this.setVolume(this.props.volume);
|
|
80
|
+
}
|
|
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 { playing, config, onError, onDuration } = this.props;
|
|
91
|
+
const id = url && url.match(import_patterns.MATCH_URL_VIDYARD)[1];
|
|
92
|
+
if (this.player) {
|
|
93
|
+
this.stop();
|
|
94
|
+
}
|
|
95
|
+
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((Vidyard2) => {
|
|
96
|
+
if (!this.container)
|
|
97
|
+
return;
|
|
98
|
+
Vidyard2.api.addReadyListener((data, player) => {
|
|
99
|
+
if (this.player) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
this.player = player;
|
|
103
|
+
this.player.on("ready", this.props.onReady);
|
|
104
|
+
this.player.on("play", this.props.onPlay);
|
|
105
|
+
this.player.on("pause", this.props.onPause);
|
|
106
|
+
this.player.on("seek", this.props.onSeek);
|
|
107
|
+
this.player.on("playerComplete", this.props.onEnded);
|
|
108
|
+
}, id);
|
|
109
|
+
Vidyard2.api.renderPlayer({
|
|
110
|
+
uuid: id,
|
|
111
|
+
container: this.container,
|
|
112
|
+
autoplay: playing ? 1 : 0,
|
|
113
|
+
...config.options
|
|
114
|
+
});
|
|
115
|
+
Vidyard2.api.getPlayerMetadata(id).then((meta) => {
|
|
116
|
+
this.duration = meta.length_in_seconds;
|
|
117
|
+
onDuration(meta.length_in_seconds);
|
|
118
|
+
});
|
|
119
|
+
}, onError);
|
|
120
|
+
}
|
|
121
|
+
play() {
|
|
122
|
+
this.callPlayer("play");
|
|
123
|
+
}
|
|
124
|
+
pause() {
|
|
125
|
+
this.callPlayer("pause");
|
|
126
|
+
}
|
|
127
|
+
stop() {
|
|
128
|
+
window.VidyardV4.api.destroyPlayer(this.player);
|
|
129
|
+
}
|
|
130
|
+
seekTo(amount, keepPlaying = true) {
|
|
131
|
+
this.callPlayer("seek", amount);
|
|
132
|
+
if (!keepPlaying) {
|
|
133
|
+
this.pause();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
setVolume(fraction) {
|
|
137
|
+
this.callPlayer("setVolume", fraction);
|
|
138
|
+
}
|
|
139
|
+
setPlaybackRate(rate) {
|
|
140
|
+
this.callPlayer("setPlaybackSpeed", rate);
|
|
141
|
+
}
|
|
142
|
+
getDuration() {
|
|
143
|
+
return this.duration;
|
|
144
|
+
}
|
|
145
|
+
getCurrentTime() {
|
|
146
|
+
return this.callPlayer("currentTime");
|
|
147
|
+
}
|
|
148
|
+
getSecondsLoaded() {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
render() {
|
|
152
|
+
const { display } = this.props;
|
|
153
|
+
const style = {
|
|
154
|
+
width: "100%",
|
|
155
|
+
height: "100%",
|
|
156
|
+
display
|
|
157
|
+
};
|
|
158
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style }, /* @__PURE__ */ import_react.default.createElement("div", { ref: this.ref }));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
__publicField(Vidyard, "displayName", "Vidyard");
|
|
162
|
+
__publicField(Vidyard, "canPlay", import_patterns.canPlay.vidyard);
|
|
163
|
+
return Vidyard_1;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
var VidyardExports = /*@__PURE__*/ requireVidyard();
|
|
167
|
+
var Vidyard = /*@__PURE__*/index.getDefaultExportFromCjs(VidyardExports);
|
|
168
|
+
|
|
169
|
+
var Vidyard$1 = /*#__PURE__*/_mergeNamespaces({
|
|
170
|
+
__proto__: null,
|
|
171
|
+
default: Vidyard
|
|
172
|
+
}, [VidyardExports]);
|
|
173
|
+
|
|
174
|
+
exports.Vidyard = Vidyard$1;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-DLzCbCHu.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 Vimeo_1;
|
|
20
|
+
var hasRequiredVimeo;
|
|
21
|
+
|
|
22
|
+
function requireVimeo () {
|
|
23
|
+
if (hasRequiredVimeo) return Vimeo_1;
|
|
24
|
+
hasRequiredVimeo = 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 Vimeo_exports = {};
|
|
58
|
+
__export(Vimeo_exports, {
|
|
59
|
+
default: () => Vimeo
|
|
60
|
+
});
|
|
61
|
+
Vimeo_1 = __toCommonJS(Vimeo_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://player.vimeo.com/api/player.js";
|
|
66
|
+
const SDK_GLOBAL = "Vimeo";
|
|
67
|
+
const cleanUrl = (url) => {
|
|
68
|
+
return url.replace("/manage/videos", "");
|
|
69
|
+
};
|
|
70
|
+
class Vimeo extends import_react.Component {
|
|
71
|
+
constructor() {
|
|
72
|
+
super(...arguments);
|
|
73
|
+
// Prevent checking isLoading when URL changes
|
|
74
|
+
__publicField(this, "callPlayer", import_utils.callPlayer);
|
|
75
|
+
__publicField(this, "duration", null);
|
|
76
|
+
__publicField(this, "currentTime", null);
|
|
77
|
+
__publicField(this, "secondsLoaded", null);
|
|
78
|
+
__publicField(this, "mute", () => {
|
|
79
|
+
this.setMuted(true);
|
|
80
|
+
});
|
|
81
|
+
__publicField(this, "unmute", () => {
|
|
82
|
+
this.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
|
+
this.duration = null;
|
|
93
|
+
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Vimeo2) => {
|
|
94
|
+
if (!this.container)
|
|
95
|
+
return;
|
|
96
|
+
const { playerOptions, title } = this.props.config;
|
|
97
|
+
this.player = new Vimeo2.Player(this.container, {
|
|
98
|
+
url: cleanUrl(url),
|
|
99
|
+
autoplay: this.props.playing,
|
|
100
|
+
muted: this.props.muted,
|
|
101
|
+
loop: this.props.loop,
|
|
102
|
+
playsinline: this.props.playsinline,
|
|
103
|
+
controls: this.props.controls,
|
|
104
|
+
...playerOptions
|
|
105
|
+
});
|
|
106
|
+
this.player.ready().then(() => {
|
|
107
|
+
const iframe = this.container.querySelector("iframe");
|
|
108
|
+
iframe.style.width = "100%";
|
|
109
|
+
iframe.style.height = "100%";
|
|
110
|
+
if (title) {
|
|
111
|
+
iframe.title = title;
|
|
112
|
+
}
|
|
113
|
+
}).catch(this.props.onError);
|
|
114
|
+
this.player.on("loaded", () => {
|
|
115
|
+
this.props.onReady();
|
|
116
|
+
this.refreshDuration();
|
|
117
|
+
});
|
|
118
|
+
this.player.on("play", () => {
|
|
119
|
+
this.props.onPlay();
|
|
120
|
+
this.refreshDuration();
|
|
121
|
+
});
|
|
122
|
+
this.player.on("pause", this.props.onPause);
|
|
123
|
+
this.player.on("seeked", (e) => this.props.onSeek(e.seconds));
|
|
124
|
+
this.player.on("ended", this.props.onEnded);
|
|
125
|
+
this.player.on("error", this.props.onError);
|
|
126
|
+
this.player.on("timeupdate", ({ seconds }) => {
|
|
127
|
+
this.currentTime = seconds;
|
|
128
|
+
});
|
|
129
|
+
this.player.on("progress", ({ seconds }) => {
|
|
130
|
+
this.secondsLoaded = seconds;
|
|
131
|
+
});
|
|
132
|
+
this.player.on("bufferstart", this.props.onBuffer);
|
|
133
|
+
this.player.on("bufferend", this.props.onBufferEnd);
|
|
134
|
+
this.player.on("playbackratechange", (e) => this.props.onPlaybackRateChange(e.playbackRate));
|
|
135
|
+
}, this.props.onError);
|
|
136
|
+
}
|
|
137
|
+
refreshDuration() {
|
|
138
|
+
this.player.getDuration().then((duration) => {
|
|
139
|
+
this.duration = duration;
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
play() {
|
|
143
|
+
const promise = this.callPlayer("play");
|
|
144
|
+
if (promise) {
|
|
145
|
+
promise.catch(this.props.onError);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
pause() {
|
|
149
|
+
this.callPlayer("pause");
|
|
150
|
+
}
|
|
151
|
+
stop() {
|
|
152
|
+
this.callPlayer("unload");
|
|
153
|
+
}
|
|
154
|
+
seekTo(seconds, keepPlaying = true) {
|
|
155
|
+
this.callPlayer("setCurrentTime", seconds);
|
|
156
|
+
if (!keepPlaying) {
|
|
157
|
+
this.pause();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
setVolume(fraction) {
|
|
161
|
+
this.callPlayer("setVolume", fraction);
|
|
162
|
+
}
|
|
163
|
+
setMuted(muted) {
|
|
164
|
+
this.callPlayer("setMuted", muted);
|
|
165
|
+
}
|
|
166
|
+
setLoop(loop) {
|
|
167
|
+
this.callPlayer("setLoop", loop);
|
|
168
|
+
}
|
|
169
|
+
setPlaybackRate(rate) {
|
|
170
|
+
this.callPlayer("setPlaybackRate", rate);
|
|
171
|
+
}
|
|
172
|
+
getDuration() {
|
|
173
|
+
return this.duration;
|
|
174
|
+
}
|
|
175
|
+
getCurrentTime() {
|
|
176
|
+
return this.currentTime;
|
|
177
|
+
}
|
|
178
|
+
getSecondsLoaded() {
|
|
179
|
+
return this.secondsLoaded;
|
|
180
|
+
}
|
|
181
|
+
render() {
|
|
182
|
+
const { display } = this.props;
|
|
183
|
+
const style = {
|
|
184
|
+
width: "100%",
|
|
185
|
+
height: "100%",
|
|
186
|
+
overflow: "hidden",
|
|
187
|
+
display
|
|
188
|
+
};
|
|
189
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
190
|
+
"div",
|
|
191
|
+
{
|
|
192
|
+
key: this.props.url,
|
|
193
|
+
ref: this.ref,
|
|
194
|
+
style
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
__publicField(Vimeo, "displayName", "Vimeo");
|
|
200
|
+
__publicField(Vimeo, "canPlay", import_patterns.canPlay.vimeo);
|
|
201
|
+
__publicField(Vimeo, "forceLoad", true);
|
|
202
|
+
return Vimeo_1;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
var VimeoExports = /*@__PURE__*/ requireVimeo();
|
|
206
|
+
var Vimeo = /*@__PURE__*/getDefaultExportFromCjs(VimeoExports);
|
|
207
|
+
|
|
208
|
+
var Vimeo$1 = /*#__PURE__*/_mergeNamespaces({
|
|
209
|
+
__proto__: null,
|
|
210
|
+
default: Vimeo
|
|
211
|
+
}, [VimeoExports]);
|
|
212
|
+
|
|
213
|
+
export { Vimeo$1 as V };
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-wLnkslO9.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 Vimeo_1;
|
|
22
|
+
var hasRequiredVimeo;
|
|
23
|
+
|
|
24
|
+
function requireVimeo () {
|
|
25
|
+
if (hasRequiredVimeo) return Vimeo_1;
|
|
26
|
+
hasRequiredVimeo = 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 Vimeo_exports = {};
|
|
60
|
+
__export(Vimeo_exports, {
|
|
61
|
+
default: () => Vimeo
|
|
62
|
+
});
|
|
63
|
+
Vimeo_1 = __toCommonJS(Vimeo_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://player.vimeo.com/api/player.js";
|
|
68
|
+
const SDK_GLOBAL = "Vimeo";
|
|
69
|
+
const cleanUrl = (url) => {
|
|
70
|
+
return url.replace("/manage/videos", "");
|
|
71
|
+
};
|
|
72
|
+
class Vimeo extends import_react.Component {
|
|
73
|
+
constructor() {
|
|
74
|
+
super(...arguments);
|
|
75
|
+
// Prevent checking isLoading when URL changes
|
|
76
|
+
__publicField(this, "callPlayer", import_utils.callPlayer);
|
|
77
|
+
__publicField(this, "duration", null);
|
|
78
|
+
__publicField(this, "currentTime", null);
|
|
79
|
+
__publicField(this, "secondsLoaded", null);
|
|
80
|
+
__publicField(this, "mute", () => {
|
|
81
|
+
this.setMuted(true);
|
|
82
|
+
});
|
|
83
|
+
__publicField(this, "unmute", () => {
|
|
84
|
+
this.setMuted(false);
|
|
85
|
+
});
|
|
86
|
+
__publicField(this, "ref", (container) => {
|
|
87
|
+
this.container = container;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
componentDidMount() {
|
|
91
|
+
this.props.onMount && this.props.onMount(this);
|
|
92
|
+
}
|
|
93
|
+
load(url) {
|
|
94
|
+
this.duration = null;
|
|
95
|
+
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL).then((Vimeo2) => {
|
|
96
|
+
if (!this.container)
|
|
97
|
+
return;
|
|
98
|
+
const { playerOptions, title } = this.props.config;
|
|
99
|
+
this.player = new Vimeo2.Player(this.container, {
|
|
100
|
+
url: cleanUrl(url),
|
|
101
|
+
autoplay: this.props.playing,
|
|
102
|
+
muted: this.props.muted,
|
|
103
|
+
loop: this.props.loop,
|
|
104
|
+
playsinline: this.props.playsinline,
|
|
105
|
+
controls: this.props.controls,
|
|
106
|
+
...playerOptions
|
|
107
|
+
});
|
|
108
|
+
this.player.ready().then(() => {
|
|
109
|
+
const iframe = this.container.querySelector("iframe");
|
|
110
|
+
iframe.style.width = "100%";
|
|
111
|
+
iframe.style.height = "100%";
|
|
112
|
+
if (title) {
|
|
113
|
+
iframe.title = title;
|
|
114
|
+
}
|
|
115
|
+
}).catch(this.props.onError);
|
|
116
|
+
this.player.on("loaded", () => {
|
|
117
|
+
this.props.onReady();
|
|
118
|
+
this.refreshDuration();
|
|
119
|
+
});
|
|
120
|
+
this.player.on("play", () => {
|
|
121
|
+
this.props.onPlay();
|
|
122
|
+
this.refreshDuration();
|
|
123
|
+
});
|
|
124
|
+
this.player.on("pause", this.props.onPause);
|
|
125
|
+
this.player.on("seeked", (e) => this.props.onSeek(e.seconds));
|
|
126
|
+
this.player.on("ended", this.props.onEnded);
|
|
127
|
+
this.player.on("error", this.props.onError);
|
|
128
|
+
this.player.on("timeupdate", ({ seconds }) => {
|
|
129
|
+
this.currentTime = seconds;
|
|
130
|
+
});
|
|
131
|
+
this.player.on("progress", ({ seconds }) => {
|
|
132
|
+
this.secondsLoaded = seconds;
|
|
133
|
+
});
|
|
134
|
+
this.player.on("bufferstart", this.props.onBuffer);
|
|
135
|
+
this.player.on("bufferend", this.props.onBufferEnd);
|
|
136
|
+
this.player.on("playbackratechange", (e) => this.props.onPlaybackRateChange(e.playbackRate));
|
|
137
|
+
}, this.props.onError);
|
|
138
|
+
}
|
|
139
|
+
refreshDuration() {
|
|
140
|
+
this.player.getDuration().then((duration) => {
|
|
141
|
+
this.duration = duration;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
play() {
|
|
145
|
+
const promise = this.callPlayer("play");
|
|
146
|
+
if (promise) {
|
|
147
|
+
promise.catch(this.props.onError);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
pause() {
|
|
151
|
+
this.callPlayer("pause");
|
|
152
|
+
}
|
|
153
|
+
stop() {
|
|
154
|
+
this.callPlayer("unload");
|
|
155
|
+
}
|
|
156
|
+
seekTo(seconds, keepPlaying = true) {
|
|
157
|
+
this.callPlayer("setCurrentTime", seconds);
|
|
158
|
+
if (!keepPlaying) {
|
|
159
|
+
this.pause();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
setVolume(fraction) {
|
|
163
|
+
this.callPlayer("setVolume", fraction);
|
|
164
|
+
}
|
|
165
|
+
setMuted(muted) {
|
|
166
|
+
this.callPlayer("setMuted", muted);
|
|
167
|
+
}
|
|
168
|
+
setLoop(loop) {
|
|
169
|
+
this.callPlayer("setLoop", loop);
|
|
170
|
+
}
|
|
171
|
+
setPlaybackRate(rate) {
|
|
172
|
+
this.callPlayer("setPlaybackRate", rate);
|
|
173
|
+
}
|
|
174
|
+
getDuration() {
|
|
175
|
+
return this.duration;
|
|
176
|
+
}
|
|
177
|
+
getCurrentTime() {
|
|
178
|
+
return this.currentTime;
|
|
179
|
+
}
|
|
180
|
+
getSecondsLoaded() {
|
|
181
|
+
return this.secondsLoaded;
|
|
182
|
+
}
|
|
183
|
+
render() {
|
|
184
|
+
const { display } = this.props;
|
|
185
|
+
const style = {
|
|
186
|
+
width: "100%",
|
|
187
|
+
height: "100%",
|
|
188
|
+
overflow: "hidden",
|
|
189
|
+
display
|
|
190
|
+
};
|
|
191
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
192
|
+
"div",
|
|
193
|
+
{
|
|
194
|
+
key: this.props.url,
|
|
195
|
+
ref: this.ref,
|
|
196
|
+
style
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
__publicField(Vimeo, "displayName", "Vimeo");
|
|
202
|
+
__publicField(Vimeo, "canPlay", import_patterns.canPlay.vimeo);
|
|
203
|
+
__publicField(Vimeo, "forceLoad", true);
|
|
204
|
+
return Vimeo_1;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
var VimeoExports = /*@__PURE__*/ requireVimeo();
|
|
208
|
+
var Vimeo = /*@__PURE__*/index.getDefaultExportFromCjs(VimeoExports);
|
|
209
|
+
|
|
210
|
+
var Vimeo$1 = /*#__PURE__*/_mergeNamespaces({
|
|
211
|
+
__proto__: null,
|
|
212
|
+
default: Vimeo
|
|
213
|
+
}, [VimeoExports]);
|
|
214
|
+
|
|
215
|
+
exports.Vimeo = Vimeo$1;
|