suada-components 1.9.0 → 1.10.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/DailyMotion-B7yDPBbg.js → DailyMotion-DacNkqsi.js} +1 -1
- package/dist/{components/DailyMotion-BmnymjR1.esm.js → DailyMotion-gaY-1HqX.esm.js} +1 -1
- package/dist/{components/Facebook-D9Ak6ZJU.esm.js → Facebook-C_tH1Bi_.esm.js} +1 -1
- package/dist/{components/Facebook-42iqQU2G.js → Facebook-D4wLMJkY.js} +1 -1
- package/dist/{components/FilePlayer-CAnHK0Cd.js → FilePlayer-B4s5OcYq.js} +1 -1
- package/dist/{components/FilePlayer-wg9lyafD.esm.js → FilePlayer-DqR2mvGK.esm.js} +1 -1
- package/dist/{components/Kaltura-DPaEN-dq.esm.js → Kaltura-C9QbmEfO.esm.js} +1 -1
- package/dist/{components/Kaltura-Ct6kwbgP.js → Kaltura-kCqUZWuf.js} +1 -1
- package/dist/{components/Mixcloud-sBbcL5rG.js → Mixcloud-2c71b3Nf.js} +1 -1
- package/dist/{components/Mixcloud-BobSN3YI.esm.js → Mixcloud-ib_DIXF1.esm.js} +1 -1
- package/dist/{components/Mux-Cosy8sFO.js → Mux-BsXgGo6C.js} +1 -1
- package/dist/{components/Mux-B9YP-rFr.esm.js → Mux-CJ6kEh1R.esm.js} +1 -1
- package/dist/{components/Preview-DiVfo6aa.js → Preview-gEkhA4mX.js} +1 -1
- package/dist/{components/Preview-XcTlhHT1.esm.js → Preview-kqr7fWet.esm.js} +1 -1
- package/dist/{components/SoundCloud-CIWqB-QW.js → SoundCloud-BWup2g--.js} +1 -1
- package/dist/{components/SoundCloud-BTHoyFWT.esm.js → SoundCloud-DJM0bsQG.esm.js} +1 -1
- package/dist/{components/Streamable-DsfQCy3p.esm.js → Streamable-CJltauTy.esm.js} +1 -1
- package/dist/{components/Streamable-9anYiQtU.js → Streamable-UeTHV2nZ.js} +1 -1
- package/dist/{components/Twitch-D1BOr8hj.esm.js → Twitch-C9qq_89Q.esm.js} +1 -1
- package/dist/{components/Twitch-Dud6e1Rv.js → Twitch-_N8mEsiS.js} +1 -1
- package/dist/{components/Vidyard-BuOu85uS.js → Vidyard-CQuxB99Z.js} +1 -1
- package/dist/{components/Vidyard-C1csjpQH.esm.js → Vidyard-gtcLQdYd.esm.js} +1 -1
- package/dist/{components/Vimeo-CHlHIswX.esm.js → Vimeo-Dzp5eoLi.esm.js} +1 -1
- package/dist/{components/Vimeo-DrDJ5O9H.js → Vimeo-nhXVoFTb.js} +1 -1
- package/dist/{components/Wistia-fh9U2CA2.js → Wistia-C1DqA9IW.js} +1 -1
- package/dist/{components/Wistia-D-eYyONb.esm.js → Wistia-DV3BO3z9.esm.js} +1 -1
- package/dist/{components/YouTube-CmnnzZvk.esm.js → YouTube-BKwvJCnt.esm.js} +1 -1
- package/dist/{components/YouTube-DC2uZ14c.js → YouTube-DDou5phH.js} +1 -1
- package/dist/components/CourseCard/CourseCard.styles.d.ts +1 -1
- package/dist/components/DailyMotion-B8IJNjSc.js +180 -0
- package/dist/components/DailyMotion-COg3zgIZ.esm.js +178 -0
- package/dist/components/Facebook-DJ7a3Bj8.js +181 -0
- package/dist/components/Facebook-NS80Vk6j.esm.js +179 -0
- package/dist/components/FilePlayer-D-fc3B0E.esm.js +408 -0
- package/dist/components/FilePlayer-SyLt5qGX.js +410 -0
- package/dist/components/Kaltura-BTFxSMxP.js +178 -0
- package/dist/components/Kaltura-CmFIWSef.esm.js +176 -0
- package/dist/components/Mixcloud-CO5MsWUJ.esm.js +164 -0
- package/dist/components/Mixcloud-DHAfVpcc.js +166 -0
- package/dist/components/Mux-C8-HithD.esm.js +264 -0
- package/dist/components/Mux-bycDxP8G.js +266 -0
- package/dist/components/Preview-Clg3y6sj.esm.js +173 -0
- package/dist/components/Preview-CzpcknZI.js +175 -0
- package/dist/components/SoundCloud-Dz9DeIIM.js +183 -0
- package/dist/components/SoundCloud-LfWEBVy1.esm.js +181 -0
- package/dist/components/Streamable-BpcVhi4M.esm.js +174 -0
- package/dist/components/Streamable-Cs_c-7jS.js +176 -0
- package/dist/components/Twitch-BJ9aSIM2.esm.js +168 -0
- package/dist/components/Twitch-C9bksXF6.js +170 -0
- package/dist/components/VideoPlayer/PiPContext.d.ts +8 -0
- package/dist/components/VideoPlayer/PiPContext.js +149 -0
- package/dist/components/VideoPlayer/PiPContext.js.map +1 -0
- package/dist/components/VideoPlayer/PiPContext.types.d.ts +16 -0
- package/dist/components/VideoPlayer/PiPContext.types.js +2 -0
- package/dist/components/VideoPlayer/PiPContext.types.js.map +1 -0
- package/dist/components/VideoPlayer/usePiP.d.ts +2 -0
- package/dist/components/VideoPlayer/usePiP.js +10 -0
- package/dist/components/VideoPlayer/usePiP.js.map +1 -0
- package/dist/components/VideoPlayer/usePlayerControls.js +46 -64
- package/dist/components/VideoPlayer/usePlayerControls.js.map +1 -1
- package/dist/components/Vidyard-CsUFSBXh.js +174 -0
- package/dist/components/Vidyard-Dc8NHJ7p.esm.js +172 -0
- package/dist/components/Vimeo-CwlScNtK.esm.js +213 -0
- package/dist/components/Vimeo-D6C93592.js +215 -0
- package/dist/components/Wistia-Bxvdn3oO.js +190 -0
- package/dist/components/Wistia-Cwl4fNWW.esm.js +188 -0
- package/dist/components/YouTube-BF85SRPF.js +260 -0
- package/dist/components/YouTube-DKkYzN7-.esm.js +258 -0
- package/dist/components/components/CourseCard/CourseCard.styles.d.ts +1 -1
- package/dist/components/components/VideoPlayer/PiPContext.d.ts +8 -0
- package/dist/components/components/VideoPlayer/PiPContext.types.d.ts +16 -0
- package/dist/components/components/VideoPlayer/usePiP.d.ts +2 -0
- package/dist/components/components/index.d.ts +2 -0
- package/dist/components/{index-DetZ05pw.js → index-C08W0lXg.js} +157 -295
- package/dist/components/{index-DKAGRUEW.esm.js → index-F6zEoSWf.esm.js} +156 -296
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/icons/components/CourseCard/CourseCard.styles.d.ts +1 -1
- package/dist/icons/components/VideoPlayer/PiPContext.d.ts +8 -0
- package/dist/icons/components/VideoPlayer/PiPContext.types.d.ts +16 -0
- package/dist/icons/components/VideoPlayer/usePiP.d.ts +2 -0
- package/dist/icons/components/index.d.ts +2 -0
- package/dist/index-CcTTuhg8.esm.js +94920 -0
- package/dist/index-Dq4qpx9F.js +95142 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +3 -3
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/VideoPlayer/pipManager.d.ts +0 -60
- package/dist/components/VideoPlayer/pipManager.js +0 -272
- package/dist/components/VideoPlayer/pipManager.js.map +0 -1
- package/dist/components/components/VideoPlayer/pipManager.d.ts +0 -60
- package/dist/icons/components/VideoPlayer/pipManager.d.ts +0 -60
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-C08W0lXg.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 Facebook_1;
|
|
22
|
+
var hasRequiredFacebook;
|
|
23
|
+
|
|
24
|
+
function requireFacebook () {
|
|
25
|
+
if (hasRequiredFacebook) return Facebook_1;
|
|
26
|
+
hasRequiredFacebook = 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 Facebook_exports = {};
|
|
60
|
+
__export(Facebook_exports, {
|
|
61
|
+
default: () => Facebook
|
|
62
|
+
});
|
|
63
|
+
Facebook_1 = __toCommonJS(Facebook_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://connect.facebook.net/en_US/sdk.js";
|
|
68
|
+
const SDK_GLOBAL = "FB";
|
|
69
|
+
const SDK_GLOBAL_READY = "fbAsyncInit";
|
|
70
|
+
const PLAYER_ID_PREFIX = "facebook-player-";
|
|
71
|
+
class Facebook extends import_react.Component {
|
|
72
|
+
constructor() {
|
|
73
|
+
super(...arguments);
|
|
74
|
+
__publicField(this, "callPlayer", import_utils.callPlayer);
|
|
75
|
+
__publicField(this, "playerID", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);
|
|
76
|
+
__publicField(this, "mute", () => {
|
|
77
|
+
this.callPlayer("mute");
|
|
78
|
+
});
|
|
79
|
+
__publicField(this, "unmute", () => {
|
|
80
|
+
this.callPlayer("unmute");
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
componentDidMount() {
|
|
84
|
+
this.props.onMount && this.props.onMount(this);
|
|
85
|
+
}
|
|
86
|
+
load(url, isReady) {
|
|
87
|
+
if (isReady) {
|
|
88
|
+
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => FB.XFBML.parse());
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => {
|
|
92
|
+
FB.init({
|
|
93
|
+
appId: this.props.config.appId,
|
|
94
|
+
xfbml: true,
|
|
95
|
+
version: this.props.config.version
|
|
96
|
+
});
|
|
97
|
+
FB.Event.subscribe("xfbml.render", (msg) => {
|
|
98
|
+
this.props.onLoaded();
|
|
99
|
+
});
|
|
100
|
+
FB.Event.subscribe("xfbml.ready", (msg) => {
|
|
101
|
+
if (msg.type === "video" && msg.id === this.playerID) {
|
|
102
|
+
this.player = msg.instance;
|
|
103
|
+
this.player.subscribe("startedPlaying", this.props.onPlay);
|
|
104
|
+
this.player.subscribe("paused", this.props.onPause);
|
|
105
|
+
this.player.subscribe("finishedPlaying", this.props.onEnded);
|
|
106
|
+
this.player.subscribe("startedBuffering", this.props.onBuffer);
|
|
107
|
+
this.player.subscribe("finishedBuffering", this.props.onBufferEnd);
|
|
108
|
+
this.player.subscribe("error", this.props.onError);
|
|
109
|
+
if (this.props.muted) {
|
|
110
|
+
this.callPlayer("mute");
|
|
111
|
+
} else {
|
|
112
|
+
this.callPlayer("unmute");
|
|
113
|
+
}
|
|
114
|
+
this.props.onReady();
|
|
115
|
+
document.getElementById(this.playerID).querySelector("iframe").style.visibility = "visible";
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
play() {
|
|
121
|
+
this.callPlayer("play");
|
|
122
|
+
}
|
|
123
|
+
pause() {
|
|
124
|
+
this.callPlayer("pause");
|
|
125
|
+
}
|
|
126
|
+
stop() {
|
|
127
|
+
}
|
|
128
|
+
seekTo(seconds, keepPlaying = true) {
|
|
129
|
+
this.callPlayer("seek", seconds);
|
|
130
|
+
if (!keepPlaying) {
|
|
131
|
+
this.pause();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
setVolume(fraction) {
|
|
135
|
+
this.callPlayer("setVolume", fraction);
|
|
136
|
+
}
|
|
137
|
+
getDuration() {
|
|
138
|
+
return this.callPlayer("getDuration");
|
|
139
|
+
}
|
|
140
|
+
getCurrentTime() {
|
|
141
|
+
return this.callPlayer("getCurrentPosition");
|
|
142
|
+
}
|
|
143
|
+
getSecondsLoaded() {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
render() {
|
|
147
|
+
const { attributes } = this.props.config;
|
|
148
|
+
const style = {
|
|
149
|
+
width: "100%",
|
|
150
|
+
height: "100%"
|
|
151
|
+
};
|
|
152
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
style,
|
|
156
|
+
id: this.playerID,
|
|
157
|
+
className: "fb-video",
|
|
158
|
+
"data-href": this.props.url,
|
|
159
|
+
"data-autoplay": this.props.playing ? "true" : "false",
|
|
160
|
+
"data-allowfullscreen": "true",
|
|
161
|
+
"data-controls": this.props.controls ? "true" : "false",
|
|
162
|
+
...attributes
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
__publicField(Facebook, "displayName", "Facebook");
|
|
168
|
+
__publicField(Facebook, "canPlay", import_patterns.canPlay.facebook);
|
|
169
|
+
__publicField(Facebook, "loopOnEnded", true);
|
|
170
|
+
return Facebook_1;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
var FacebookExports = /*@__PURE__*/ requireFacebook();
|
|
174
|
+
var Facebook = /*@__PURE__*/index.getDefaultExportFromCjs(FacebookExports);
|
|
175
|
+
|
|
176
|
+
var Facebook$1 = /*#__PURE__*/_mergeNamespaces({
|
|
177
|
+
__proto__: null,
|
|
178
|
+
default: Facebook
|
|
179
|
+
}, [FacebookExports]);
|
|
180
|
+
|
|
181
|
+
exports.Facebook = Facebook$1;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { r as requireUtils, a as requirePatterns, g as getDefaultExportFromCjs } from './index-F6zEoSWf.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 Facebook_1;
|
|
20
|
+
var hasRequiredFacebook;
|
|
21
|
+
|
|
22
|
+
function requireFacebook () {
|
|
23
|
+
if (hasRequiredFacebook) return Facebook_1;
|
|
24
|
+
hasRequiredFacebook = 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 Facebook_exports = {};
|
|
58
|
+
__export(Facebook_exports, {
|
|
59
|
+
default: () => Facebook
|
|
60
|
+
});
|
|
61
|
+
Facebook_1 = __toCommonJS(Facebook_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://connect.facebook.net/en_US/sdk.js";
|
|
66
|
+
const SDK_GLOBAL = "FB";
|
|
67
|
+
const SDK_GLOBAL_READY = "fbAsyncInit";
|
|
68
|
+
const PLAYER_ID_PREFIX = "facebook-player-";
|
|
69
|
+
class Facebook extends import_react.Component {
|
|
70
|
+
constructor() {
|
|
71
|
+
super(...arguments);
|
|
72
|
+
__publicField(this, "callPlayer", import_utils.callPlayer);
|
|
73
|
+
__publicField(this, "playerID", this.props.config.playerId || `${PLAYER_ID_PREFIX}${(0, import_utils.randomString)()}`);
|
|
74
|
+
__publicField(this, "mute", () => {
|
|
75
|
+
this.callPlayer("mute");
|
|
76
|
+
});
|
|
77
|
+
__publicField(this, "unmute", () => {
|
|
78
|
+
this.callPlayer("unmute");
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
componentDidMount() {
|
|
82
|
+
this.props.onMount && this.props.onMount(this);
|
|
83
|
+
}
|
|
84
|
+
load(url, isReady) {
|
|
85
|
+
if (isReady) {
|
|
86
|
+
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => FB.XFBML.parse());
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
(0, import_utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY).then((FB) => {
|
|
90
|
+
FB.init({
|
|
91
|
+
appId: this.props.config.appId,
|
|
92
|
+
xfbml: true,
|
|
93
|
+
version: this.props.config.version
|
|
94
|
+
});
|
|
95
|
+
FB.Event.subscribe("xfbml.render", (msg) => {
|
|
96
|
+
this.props.onLoaded();
|
|
97
|
+
});
|
|
98
|
+
FB.Event.subscribe("xfbml.ready", (msg) => {
|
|
99
|
+
if (msg.type === "video" && msg.id === this.playerID) {
|
|
100
|
+
this.player = msg.instance;
|
|
101
|
+
this.player.subscribe("startedPlaying", this.props.onPlay);
|
|
102
|
+
this.player.subscribe("paused", this.props.onPause);
|
|
103
|
+
this.player.subscribe("finishedPlaying", this.props.onEnded);
|
|
104
|
+
this.player.subscribe("startedBuffering", this.props.onBuffer);
|
|
105
|
+
this.player.subscribe("finishedBuffering", this.props.onBufferEnd);
|
|
106
|
+
this.player.subscribe("error", this.props.onError);
|
|
107
|
+
if (this.props.muted) {
|
|
108
|
+
this.callPlayer("mute");
|
|
109
|
+
} else {
|
|
110
|
+
this.callPlayer("unmute");
|
|
111
|
+
}
|
|
112
|
+
this.props.onReady();
|
|
113
|
+
document.getElementById(this.playerID).querySelector("iframe").style.visibility = "visible";
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
play() {
|
|
119
|
+
this.callPlayer("play");
|
|
120
|
+
}
|
|
121
|
+
pause() {
|
|
122
|
+
this.callPlayer("pause");
|
|
123
|
+
}
|
|
124
|
+
stop() {
|
|
125
|
+
}
|
|
126
|
+
seekTo(seconds, keepPlaying = true) {
|
|
127
|
+
this.callPlayer("seek", seconds);
|
|
128
|
+
if (!keepPlaying) {
|
|
129
|
+
this.pause();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
setVolume(fraction) {
|
|
133
|
+
this.callPlayer("setVolume", fraction);
|
|
134
|
+
}
|
|
135
|
+
getDuration() {
|
|
136
|
+
return this.callPlayer("getDuration");
|
|
137
|
+
}
|
|
138
|
+
getCurrentTime() {
|
|
139
|
+
return this.callPlayer("getCurrentPosition");
|
|
140
|
+
}
|
|
141
|
+
getSecondsLoaded() {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
render() {
|
|
145
|
+
const { attributes } = this.props.config;
|
|
146
|
+
const style = {
|
|
147
|
+
width: "100%",
|
|
148
|
+
height: "100%"
|
|
149
|
+
};
|
|
150
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
151
|
+
"div",
|
|
152
|
+
{
|
|
153
|
+
style,
|
|
154
|
+
id: this.playerID,
|
|
155
|
+
className: "fb-video",
|
|
156
|
+
"data-href": this.props.url,
|
|
157
|
+
"data-autoplay": this.props.playing ? "true" : "false",
|
|
158
|
+
"data-allowfullscreen": "true",
|
|
159
|
+
"data-controls": this.props.controls ? "true" : "false",
|
|
160
|
+
...attributes
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
__publicField(Facebook, "displayName", "Facebook");
|
|
166
|
+
__publicField(Facebook, "canPlay", import_patterns.canPlay.facebook);
|
|
167
|
+
__publicField(Facebook, "loopOnEnded", true);
|
|
168
|
+
return Facebook_1;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
var FacebookExports = /*@__PURE__*/ requireFacebook();
|
|
172
|
+
var Facebook = /*@__PURE__*/getDefaultExportFromCjs(FacebookExports);
|
|
173
|
+
|
|
174
|
+
var Facebook$1 = /*#__PURE__*/_mergeNamespaces({
|
|
175
|
+
__proto__: null,
|
|
176
|
+
default: Facebook
|
|
177
|
+
}, [FacebookExports]);
|
|
178
|
+
|
|
179
|
+
export { Facebook$1 as F };
|