@editframe/react 0.3.1 → 0.6.0-beta.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/elements/EFAudio.cjs +11 -0
  2. package/dist/elements/EFAudio.js +11 -0
  3. package/dist/elements/EFCaptions.cjs +17 -0
  4. package/dist/elements/EFCaptions.js +17 -0
  5. package/dist/elements/EFImage.cjs +11 -0
  6. package/dist/elements/EFImage.js +11 -0
  7. package/dist/elements/EFTimegroup.cjs +11 -0
  8. package/dist/elements/EFTimegroup.js +11 -0
  9. package/dist/elements/EFVideo.cjs +11 -0
  10. package/dist/elements/EFVideo.js +11 -0
  11. package/dist/elements/EFWaveform.cjs +11 -0
  12. package/dist/elements/EFWaveform.js +11 -0
  13. package/dist/gui/EFFilmstrip.cjs +11 -0
  14. package/dist/gui/EFFilmstrip.js +11 -0
  15. package/dist/gui/EFWorkbench.cjs +11 -0
  16. package/dist/gui/EFWorkbench.js +11 -0
  17. package/dist/hooks/useTimingInfo.cjs +35 -0
  18. package/dist/hooks/useTimingInfo.js +35 -0
  19. package/dist/index.cjs +21 -0
  20. package/dist/index.js +20 -146
  21. package/dist/packages/react/src/elements/EFAudio.d.ts +3 -0
  22. package/dist/packages/react/src/elements/EFCaptions.d.ts +4 -0
  23. package/dist/packages/react/src/elements/EFImage.d.ts +3 -0
  24. package/dist/packages/react/src/elements/EFTimegroup.d.ts +3 -0
  25. package/dist/packages/react/src/elements/EFVideo.d.ts +3 -0
  26. package/dist/packages/react/src/elements/EFWaveform.d.ts +3 -0
  27. package/dist/packages/react/src/gui/EFFilmstrip.d.ts +3 -0
  28. package/dist/packages/react/src/gui/EFWorkbench.d.ts +3 -0
  29. package/dist/packages/react/src/hooks/useTimingInfo.d.ts +8 -0
  30. package/dist/packages/react/src/index.d.ts +9 -0
  31. package/package.json +25 -45
  32. package/src/elements/EFAudio.ts +9 -0
  33. package/src/elements/EFCaptions.ts +18 -0
  34. package/src/elements/EFImage.ts +9 -0
  35. package/src/elements/EFTimegroup.ts +9 -0
  36. package/src/elements/EFVideo.ts +9 -0
  37. package/src/elements/EFWaveform.ts +9 -0
  38. package/src/gui/EFFilmstrip.ts +9 -0
  39. package/src/gui/EFWorkbench.ts +9 -0
  40. package/src/hooks/useTimingInfo.ts +52 -0
  41. package/README.md +0 -66
  42. package/dist/Player.d.ts +0 -20
  43. package/dist/Player.d.ts.map +0 -1
  44. package/dist/index.d.ts +0 -2
  45. package/dist/index.d.ts.map +0 -1
  46. package/dist/index.esm.js +0 -139
  47. package/dist/index.esm.js.map +0 -1
  48. package/dist/index.js.map +0 -1
  49. package/dist/shared.d.ts +0 -3
  50. package/dist/shared.d.ts.map +0 -1
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const react = require("@lit/react");
5
+ const elements = require("@editframe/elements");
6
+ const EFAudio = react.createComponent({
7
+ tagName: "ef-audio",
8
+ elementClass: elements.EFAudio,
9
+ react: React
10
+ });
11
+ exports.EFAudio = EFAudio;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFAudio as EFAudio$1 } from "@editframe/elements";
4
+ const EFAudio = createComponent({
5
+ tagName: "ef-audio",
6
+ elementClass: EFAudio$1,
7
+ react: React
8
+ });
9
+ export {
10
+ EFAudio
11
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const react = require("@lit/react");
5
+ const elements = require("@editframe/elements");
6
+ const EFCaptions = react.createComponent({
7
+ tagName: "ef-captions",
8
+ elementClass: elements.EFCaptions,
9
+ react: React
10
+ });
11
+ const EFCaptionsActiveWord = react.createComponent({
12
+ tagName: "ef-captions-active-word",
13
+ elementClass: elements.EFCaptionsActiveWord,
14
+ react: React
15
+ });
16
+ exports.EFCaptions = EFCaptions;
17
+ exports.EFCaptionsActiveWord = EFCaptionsActiveWord;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFCaptions as EFCaptions$1, EFCaptionsActiveWord as EFCaptionsActiveWord$1 } from "@editframe/elements";
4
+ const EFCaptions = createComponent({
5
+ tagName: "ef-captions",
6
+ elementClass: EFCaptions$1,
7
+ react: React
8
+ });
9
+ const EFCaptionsActiveWord = createComponent({
10
+ tagName: "ef-captions-active-word",
11
+ elementClass: EFCaptionsActiveWord$1,
12
+ react: React
13
+ });
14
+ export {
15
+ EFCaptions,
16
+ EFCaptionsActiveWord
17
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const react = require("@lit/react");
5
+ const elements = require("@editframe/elements");
6
+ const EFImage = react.createComponent({
7
+ tagName: "ef-image",
8
+ elementClass: elements.EFImage,
9
+ react: React
10
+ });
11
+ exports.EFImage = EFImage;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFImage as EFImage$1 } from "@editframe/elements";
4
+ const EFImage = createComponent({
5
+ tagName: "ef-image",
6
+ elementClass: EFImage$1,
7
+ react: React
8
+ });
9
+ export {
10
+ EFImage
11
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const react = require("@lit/react");
5
+ const elements = require("@editframe/elements");
6
+ const EFTimegroup = react.createComponent({
7
+ tagName: "ef-timegroup",
8
+ elementClass: elements.EFTimegroup,
9
+ react: React
10
+ });
11
+ exports.EFTimegroup = EFTimegroup;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFTimegroup as EFTimegroup$1 } from "@editframe/elements";
4
+ const EFTimegroup = createComponent({
5
+ tagName: "ef-timegroup",
6
+ elementClass: EFTimegroup$1,
7
+ react: React
8
+ });
9
+ export {
10
+ EFTimegroup
11
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const react = require("@lit/react");
5
+ const elements = require("@editframe/elements");
6
+ const EFVideo = react.createComponent({
7
+ tagName: "ef-video",
8
+ elementClass: elements.EFVideo,
9
+ react: React
10
+ });
11
+ exports.EFVideo = EFVideo;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFVideo as EFVideo$1 } from "@editframe/elements";
4
+ const EFVideo = createComponent({
5
+ tagName: "ef-video",
6
+ elementClass: EFVideo$1,
7
+ react: React
8
+ });
9
+ export {
10
+ EFVideo
11
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const react = require("@lit/react");
5
+ const elements = require("@editframe/elements");
6
+ const EFWaveform = react.createComponent({
7
+ tagName: "ef-waveform",
8
+ elementClass: elements.EFWaveform,
9
+ react: React
10
+ });
11
+ exports.EFWaveform = EFWaveform;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFWaveform as EFWaveform$1 } from "@editframe/elements";
4
+ const EFWaveform = createComponent({
5
+ tagName: "ef-waveform",
6
+ elementClass: EFWaveform$1,
7
+ react: React
8
+ });
9
+ export {
10
+ EFWaveform
11
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const react = require("@lit/react");
5
+ const elements = require("@editframe/elements");
6
+ const EFFilmstrip = react.createComponent({
7
+ tagName: "ef-filmstrip",
8
+ elementClass: elements.EFFilmstrip,
9
+ react: React
10
+ });
11
+ exports.EFFilmstrip = EFFilmstrip;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFFilmstrip as EFFilmstrip$1 } from "@editframe/elements";
4
+ const EFFilmstrip = createComponent({
5
+ tagName: "ef-filmstrip",
6
+ elementClass: EFFilmstrip$1,
7
+ react: React
8
+ });
9
+ export {
10
+ EFFilmstrip
11
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ const react = require("@lit/react");
5
+ const elements = require("@editframe/elements");
6
+ const EFWorkbench = react.createComponent({
7
+ tagName: "ef-workbench",
8
+ elementClass: elements.EFWorkbench,
9
+ react: React
10
+ });
11
+ exports.EFWorkbench = EFWorkbench;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFWorkbench as EFWorkbench$1 } from "@editframe/elements";
4
+ const EFWorkbench = createComponent({
5
+ tagName: "ef-workbench",
6
+ elementClass: EFWorkbench$1,
7
+ react: React
8
+ });
9
+ export {
10
+ EFWorkbench
11
+ };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
4
+ class CurrentTimeController {
5
+ constructor(host, setCurrentTime) {
6
+ this.host = host;
7
+ this.setCurrentTime = setCurrentTime;
8
+ this.host.addController(this);
9
+ }
10
+ hostDisconnected() {
11
+ this.host.removeController(this);
12
+ }
13
+ hostUpdated() {
14
+ this.setCurrentTime({
15
+ ownCurrentTimeMs: this.host.ownCurrentTimeMs,
16
+ durationMs: this.host.durationMs,
17
+ percentComplete: this.host.ownCurrentTimeMs / this.host.durationMs
18
+ });
19
+ }
20
+ }
21
+ const useTimingInfo = (timegroupRef = React.useRef(null)) => {
22
+ const [timeInfo, setTimeInfo] = React.useState({
23
+ ownCurrentTimeMs: 0,
24
+ durationMs: 0,
25
+ percentComplete: 0
26
+ });
27
+ React.useEffect(() => {
28
+ if (!timegroupRef.current) {
29
+ throw new Error("Timegroup ref not set");
30
+ }
31
+ new CurrentTimeController(timegroupRef.current, setTimeInfo);
32
+ }, [timegroupRef.current]);
33
+ return { ...timeInfo, ref: timegroupRef };
34
+ };
35
+ exports.useTimingInfo = useTimingInfo;
@@ -0,0 +1,35 @@
1
+ import { useState, useEffect, useRef } from "react";
2
+ class CurrentTimeController {
3
+ constructor(host, setCurrentTime) {
4
+ this.host = host;
5
+ this.setCurrentTime = setCurrentTime;
6
+ this.host.addController(this);
7
+ }
8
+ hostDisconnected() {
9
+ this.host.removeController(this);
10
+ }
11
+ hostUpdated() {
12
+ this.setCurrentTime({
13
+ ownCurrentTimeMs: this.host.ownCurrentTimeMs,
14
+ durationMs: this.host.durationMs,
15
+ percentComplete: this.host.ownCurrentTimeMs / this.host.durationMs
16
+ });
17
+ }
18
+ }
19
+ const useTimingInfo = (timegroupRef = useRef(null)) => {
20
+ const [timeInfo, setTimeInfo] = useState({
21
+ ownCurrentTimeMs: 0,
22
+ durationMs: 0,
23
+ percentComplete: 0
24
+ });
25
+ useEffect(() => {
26
+ if (!timegroupRef.current) {
27
+ throw new Error("Timegroup ref not set");
28
+ }
29
+ new CurrentTimeController(timegroupRef.current, setTimeInfo);
30
+ }, [timegroupRef.current]);
31
+ return { ...timeInfo, ref: timegroupRef };
32
+ };
33
+ export {
34
+ useTimingInfo
35
+ };
package/dist/index.cjs ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const EFAudio = require("./elements/EFAudio.cjs");
4
+ const EFCaptions = require("./elements/EFCaptions.cjs");
5
+ const EFImage = require("./elements/EFImage.cjs");
6
+ const EFTimegroup = require("./elements/EFTimegroup.cjs");
7
+ const EFVideo = require("./elements/EFVideo.cjs");
8
+ const EFWaveform = require("./elements/EFWaveform.cjs");
9
+ const EFWorkbench = require("./gui/EFWorkbench.cjs");
10
+ const EFFilmstrip = require("./gui/EFFilmstrip.cjs");
11
+ const useTimingInfo = require("./hooks/useTimingInfo.cjs");
12
+ exports.EFAudio = EFAudio.EFAudio;
13
+ exports.EFCaptions = EFCaptions.EFCaptions;
14
+ exports.EFCaptionsActiveWord = EFCaptions.EFCaptionsActiveWord;
15
+ exports.EFImage = EFImage.EFImage;
16
+ exports.EFTimegroup = EFTimegroup.EFTimegroup;
17
+ exports.EFVideo = EFVideo.EFVideo;
18
+ exports.EFWaveform = EFWaveform.EFWaveform;
19
+ exports.EFWorkbench = EFWorkbench.EFWorkbench;
20
+ exports.EFFilmstrip = EFFilmstrip.EFFilmstrip;
21
+ exports.useTimingInfo = useTimingInfo.useTimingInfo;
package/dist/index.js CHANGED
@@ -1,147 +1,21 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
-
11
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
12
- // require the crypto API and do not support built-in fallback to lower quality random number
13
- // generators (like Math.random()).
14
- let getRandomValues;
15
- const rnds8 = new Uint8Array(16);
16
- function rng() {
17
- // lazy load so that environments that need to polyfill have a chance to do so
18
- if (!getRandomValues) {
19
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
20
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
21
-
22
- if (!getRandomValues) {
23
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
24
- }
25
- }
26
-
27
- return getRandomValues(rnds8);
28
- }
29
-
30
- /**
31
- * Convert array of 16 byte values to UUID string format of the form:
32
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
33
- */
34
-
35
- const byteToHex = [];
36
-
37
- for (let i = 0; i < 256; ++i) {
38
- byteToHex.push((i + 0x100).toString(16).slice(1));
39
- }
40
-
41
- function unsafeStringify(arr, offset = 0) {
42
- // Note: Be careful editing this code! It's been tuned for performance
43
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
44
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
45
- }
46
-
47
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
48
- var native = {
49
- randomUUID
1
+ import { EFAudio } from "./elements/EFAudio.js";
2
+ import { EFCaptions, EFCaptionsActiveWord } from "./elements/EFCaptions.js";
3
+ import { EFImage } from "./elements/EFImage.js";
4
+ import { EFTimegroup } from "./elements/EFTimegroup.js";
5
+ import { EFVideo } from "./elements/EFVideo.js";
6
+ import { EFWaveform } from "./elements/EFWaveform.js";
7
+ import { EFWorkbench } from "./gui/EFWorkbench.js";
8
+ import { EFFilmstrip } from "./gui/EFFilmstrip.js";
9
+ import { useTimingInfo } from "./hooks/useTimingInfo.js";
10
+ export {
11
+ EFAudio,
12
+ EFCaptions,
13
+ EFCaptionsActiveWord,
14
+ EFFilmstrip,
15
+ EFImage,
16
+ EFTimegroup,
17
+ EFVideo,
18
+ EFWaveform,
19
+ EFWorkbench,
20
+ useTimingInfo
50
21
  };
51
-
52
- function v4(options, buf, offset) {
53
- if (native.randomUUID && !buf && !options) {
54
- return native.randomUUID();
55
- }
56
-
57
- options = options || {};
58
- const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
59
-
60
- rnds[6] = rnds[6] & 0x0f | 0x40;
61
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
62
-
63
- if (buf) {
64
- offset = offset || 0;
65
-
66
- for (let i = 0; i < 16; ++i) {
67
- buf[offset + i] = rnds[i];
68
- }
69
-
70
- return buf;
71
- }
72
-
73
- return unsafeStringify(rnds);
74
- }
75
-
76
- var f=Object.defineProperty;var u=(n,t,e)=>t in n?f(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>(u(n,typeof t!="symbol"?t+"":t,e),e);var o=(n,t,e)=>new Promise((a,s)=>{var d=r=>{try{p(e.next(r));}catch(h){s(h);}},l=r=>{try{p(e.throw(r));}catch(h){s(h);}},p=r=>r.done?a(r.value):Promise.resolve(r.value).then(d,l);p((e=e.apply(n,t)).next());});var m=class{constructor({applicationId:t,config:e,containerId:a,dimensions:s,host:d="https://embed.editframe.com",mode:l,playerControls:p=!0,playerLoop:r=!1}){i(this,"applicationId");i(this,"config");i(this,"container");i(this,"dimensions");i(this,"host");i(this,"iFrameId");i(this,"mode");i(this,"playerLoop");i(this,"playerState");i(this,"playerControls");i(this,"editframeLogo");i(this,"iFrame");i(this,"readyMediaIds",[]);i(this,"updateConfig",t=>o(this,null,function*(){this.config=t,yield this.sendCallWithValue("setConfig",{config:this.config,iFrameId:this.iFrameId});}));i(this,"setupContainer",t=>{t.style.alignItems="center",t.style.display="flex",t.style.justifyContent="center",t.style.height="100%",t.style.width="100%";});i(this,"setupEditframeLogo",()=>{var e;let t=document.createElement("img");return t.src="https://cdn.editframe.com/web/logo_white.png",t.style.position="absolute",t.style.transition="opacity 0.5s",(e=this.container)==null||e.appendChild(t),this.editframeLogo=t,t});i(this,"setupIFrame",()=>{var s,d,l;let t=document.createElement("iframe"),a=`${this.host}/${this.applicationId}?mode=${this.mode}`;return this.playerControls||(a=`${a}&hideControls`),this.playerLoop&&(a=`${a}&loop`),t.setAttribute("loading","lazy"),t.setAttribute("src",a),t.style.width=((s=this.dimensions)==null?void 0:s.width)||"100%",t.style.height=((d=this.dimensions)==null?void 0:d.height)||"100%",t.style.border="none",t.style.outline="none",t.style.transition="opacity 0.5s",t.scrolling="no",t.frameBorder="0",(l=this.container)==null||l.appendChild(t),this.iFrame=t,t});i(this,"setupEventListeners",()=>{window.addEventListener("message",t=>o(this,null,function*(){if(t.data&&t.data.config&&t.data.iFrameId===this.iFrameId){let{data:{config:e}}=t;this.config=e;}if(t.data&&t.data.pageLoaded&&(yield this.handlePageLoaded()),!(t.data&&t.data.iFrameId&&t.data.iFrameId!==this.iFrameId)){if(t.data&&t.data.iFrameReady&&(yield this.handleIframeReady()),t.data&&t.data.editorReady&&(yield this.handleEditorReady()),t.data&&t.data.playerState&&(this.playerState=t.data.playerState),t.data&&t.data.layerId){let{data:{layerId:e}}=t;this.readyMediaIds.includes(e)||this.readyMediaIds.push(e);}if(this.config){let a=this.config.layers.filter(s=>"source"in s).map(s=>s.id).every(s=>this.readyMediaIds.includes(s));(this.config.layers.length===0||a)&&this.handleEditorReady();}}}));});i(this,"handlePageLoaded",()=>o(this,null,function*(){yield this.sendCallWithValue("setIframeId",{iFrameId:this.iFrameId});}));i(this,"handleIframeReady",()=>o(this,null,function*(){this.config&&(yield this.sendCallWithValue("setConfig",{config:this.config,iFrameId:this.iFrameId}));}));i(this,"handleEditorReady",()=>o(this,null,function*(){setTimeout(()=>{this.editframeLogo.remove();},500);}));if(this.applicationId=t,this.config=e,this.container=document.getElementById(a),this.dimensions=s,this.host=d,this.iFrameId=v4().slice(0,6),this.mode=l||"preview",this.playerControls=p,this.playerLoop=r,this.playerState="stopped",!this.container)throw new Error(`Container #${a} not found`);this.setupContainer(this.container),this.setupEditframeLogo(),this.setupIFrame(),this.setupEventListeners();}sendCallWithValue(t,e){return o(this,null,function*(){return this.iFrame.contentWindow?(this.iFrame.contentWindow.postMessage({call:t,value:e},"*"),!0):!1})}},c=m;var g=class{constructor({applicationId:t,config:e,containerId:a,dimensions:s,hideControls:d=!1,host:l,loop:p=!1,mode:r}){i(this,"state");i(this,"v");i(this,"updateConfig",t=>o(this,null,function*(){yield this.v.sendCallWithValue("setConfig",{config:t,iFrameId:this.v.iFrameId});}));i(this,"play",()=>o(this,null,function*(){yield this.setState("playing");}));i(this,"pause",()=>o(this,null,function*(){yield this.setState("paused");}));i(this,"stop",()=>o(this,null,function*(){yield this.setState("stopped");}));i(this,"seek",t=>o(this,null,function*(){yield this.v.sendCallWithValue("setPlayerSeek",{seconds:t,iFrameId:this.v.iFrameId});}));i(this,"setLoadingState",t=>o(this,null,function*(){yield this.v.sendCallWithValue("setLoadingState",{state:t,iFrameId:this.v.iFrameId});}));i(this,"setState",t=>o(this,null,function*(){yield this.v.sendCallWithValue("setPlayerState",{state:t,iFrameId:this.v.iFrameId}),this.state=t;}));let h=document.getElementById(a);if(this.state="stopped",!h)throw new Error(`Container #${a} not found`);this.v=new c({applicationId:t,config:e,containerId:a,dimensions:s,host:l||"https://embed.editframe.com",playerControls:!d,playerLoop:p,mode:r});}},I=g;
77
-
78
- var Player = function (_a) {
79
- var applicationId = _a.applicationId, children = _a.children, config = _a.config, dimensions = _a.dimensions, hideControls = _a.hideControls, host = _a.host, loading = _a.loading, loop = _a.loop, mode = _a.mode, playerState = _a.playerState, seek = _a.seek;
80
- var player = React.useRef(false);
81
- var ref = React.useRef(null);
82
- var embed = React.useRef({});
83
- var containerId = "ef-player-".concat(v4().slice(0, 6));
84
- if (!applicationId) {
85
- throw new Error('applicationId is required');
86
- }
87
- React.useEffect(function () {
88
- if (!player.current && !embed.current.setState) {
89
- embed.current = new I({
90
- applicationId: applicationId,
91
- config: config,
92
- containerId: containerId,
93
- dimensions: dimensions,
94
- host: host || 'https://embed.editframe.com',
95
- hideControls: hideControls,
96
- loop: loop,
97
- mode: mode
98
- });
99
- player.current = true;
100
- }
101
- return function () {
102
- player.current = false;
103
- };
104
- }, []);
105
- React.useEffect(function () {
106
- if (embed.current && embed.current.setState) {
107
- embed.current.setState(playerState);
108
- }
109
- return function () {
110
- if (embed.current && embed.current.setState) {
111
- embed.current.setState('stopped');
112
- }
113
- };
114
- }, [playerState]);
115
- React.useEffect(function () {
116
- if (embed.current && embed.current.setState) {
117
- embed.current.seek(seek);
118
- }
119
- return function () {
120
- if (embed.current && embed.current.setState) {
121
- embed.current.seek(0);
122
- }
123
- };
124
- }, [seek]);
125
- React.useEffect(function () {
126
- if (embed.current && embed.current.setState) {
127
- embed.current.setLoadingState(loading);
128
- }
129
- return function () {
130
- if (embed.current && embed.current.setState) {
131
- embed.current.setLoadingState(false);
132
- }
133
- };
134
- }, [loading]);
135
- React.useEffect(function () {
136
- if (embed.current && embed.current.setState) {
137
- embed.current.setLoadingState(true);
138
- embed.current.updateConfig(config);
139
- embed.current.setLoadingState(false);
140
- }
141
- return function () { };
142
- }, [config]);
143
- return React__default['default'].createElement("div", { style: { backgroundColor: "black" }, id: containerId, ref: ref }, children);
144
- };
145
-
146
- exports.Player = Player;
147
- //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ import { EFAudio as EFAudioElement } from '../../../elements/src';
2
+
3
+ export declare const EFAudio: import('@lit/react').ReactWebComponent<EFAudioElement, {}>;
@@ -0,0 +1,4 @@
1
+ import { EFCaptions as EFCaptionsElement, EFCaptionsActiveWord as EFCaptionsActiveWordElement } from '../../../elements/src';
2
+
3
+ export declare const EFCaptions: import('@lit/react').ReactWebComponent<EFCaptionsElement, {}>;
4
+ export declare const EFCaptionsActiveWord: import('@lit/react').ReactWebComponent<EFCaptionsActiveWordElement, {}>;
@@ -0,0 +1,3 @@
1
+ import { EFImage as EFImageElement } from '../../../elements/src';
2
+
3
+ export declare const EFImage: import('@lit/react').ReactWebComponent<EFImageElement, {}>;
@@ -0,0 +1,3 @@
1
+ import { EFTimegroup as EFTimegroupElement } from '../../../elements/src';
2
+
3
+ export declare const EFTimegroup: import('@lit/react').ReactWebComponent<EFTimegroupElement, {}>;
@@ -0,0 +1,3 @@
1
+ import { EFVideo as EFVideoElement } from '../../../elements/src';
2
+
3
+ export declare const EFVideo: import('@lit/react').ReactWebComponent<EFVideoElement, {}>;
@@ -0,0 +1,3 @@
1
+ import { EFWaveform as EFWaveformElement } from '../../../elements/src';
2
+
3
+ export declare const EFWaveform: import('@lit/react').ReactWebComponent<EFWaveformElement, {}>;
@@ -0,0 +1,3 @@
1
+ import { EFFilmstrip as EFFilmstripElement } from '../../../elements/src';
2
+
3
+ export declare const EFFilmstrip: import('@lit/react').ReactWebComponent<EFFilmstripElement, {}>;
@@ -0,0 +1,3 @@
1
+ import { EFWorkbench as EFWorkbenchElement } from '../../../elements/src';
2
+
3
+ export declare const EFWorkbench: import('@lit/react').ReactWebComponent<EFWorkbenchElement, {}>;
@@ -0,0 +1,8 @@
1
+ import { EFTimegroup } from '../../../elements/src';
2
+
3
+ export declare const useTimingInfo: (timegroupRef?: React.RefObject<EFTimegroup>) => {
4
+ ref: import('react').RefObject<EFTimegroup>;
5
+ ownCurrentTimeMs: number;
6
+ durationMs: number;
7
+ percentComplete: number;
8
+ };
@@ -0,0 +1,9 @@
1
+ export { EFAudio } from './elements/EFAudio';
2
+ export { EFCaptions, EFCaptionsActiveWord } from './elements/EFCaptions';
3
+ export { EFImage } from './elements/EFImage';
4
+ export { EFTimegroup } from './elements/EFTimegroup';
5
+ export { EFVideo } from './elements/EFVideo';
6
+ export { EFWaveform } from './elements/EFWaveform';
7
+ export { EFWorkbench } from './gui/EFWorkbench';
8
+ export { EFFilmstrip } from './gui/EFFilmstrip';
9
+ export { useTimingInfo } from './hooks/useTimingInfo';
package/package.json CHANGED
@@ -1,53 +1,33 @@
1
1
  {
2
2
  "name": "@editframe/react",
3
- "author": "Editframe",
3
+ "version": "0.6.0-beta.18",
4
4
  "description": "",
5
- "main": "dist/index.js",
6
- "module": "dist/index.esm.js",
7
- "types": "dist/index.d.ts",
8
- "keywords": [],
9
- "peerDependencies": {
10
- "react": ">=16.8.0",
11
- "react-dom": ">=16.8.0"
5
+ "exports": {
6
+ ".": {
7
+ "import": "./dist/index.js",
8
+ "require": "./dist/index.cjs"
9
+ }
12
10
  },
13
- "devDependencies": {
14
- "@babel/core": "^7.15.0",
15
- "@rollup/plugin-commonjs": "^17.1.0",
16
- "@rollup/plugin-node-resolve": "^11.2.1",
17
- "@types/react": "^16.14.14",
18
- "@types/react-dom": "^16.9.14",
19
- "@types/uuid": "^9.0.1",
20
- "autoprefixer": "^10.4.13",
21
- "babel-loader": "^8.2.2",
22
- "babel-preset-react-app": "^10.0.0",
23
- "identity-obj-proxy": "^3.0.0",
24
- "react": "^16.14.0",
25
- "react-dom": "^16.14.0",
26
- "rollup": "^2.56.3",
27
- "rollup-plugin-peer-deps-external": "^2.2.4",
28
- "rollup-plugin-polyfill-node": "^0.12.0",
29
- "rollup-plugin-typescript2": "^0.29.0",
30
- "typescript": "^4.8.4",
31
- "tsconfig": "0.0.0"
11
+ "types": "./dist/packages/react/dist/packages/react/src/index.d.ts",
12
+ "type": "module",
13
+ "scripts": {
14
+ "typecheck": "tsc --noEmit --emitDeclarationOnly false",
15
+ "build": "vite build",
16
+ "build:watch": "vite build --watch"
32
17
  },
18
+ "author": "",
19
+ "license": "UNLICENSED",
33
20
  "dependencies": {
34
- "uuid": "^9.0.0",
35
- "@editframe/embed": "0.6.0"
36
- },
37
- "files": [
38
- "dist/**"
39
- ],
40
- "version": "0.3.1",
41
- "publishConfig": {
42
- "access": "public"
21
+ "@editframe/elements": "0.6.0-beta.18",
22
+ "@lit/react": "^1.0.5",
23
+ "react": "^18.3.0",
24
+ "react-dom": "^18.3.0"
43
25
  },
44
- "scripts": {
45
- "build": "rollup -c",
46
- "dev": "npm run build -- --watch",
47
- "format": "prettier --write '**/*.{js,ts,tsx}' --loglevel error",
48
- "lint": "eslint --ext .ts .",
49
- "lint:fix": "eslint --ext .ts . --fix",
50
- "test": "jest",
51
- "test:watch": "jest --watch"
26
+ "devDependencies": {
27
+ "@types/react": "^18.3.0",
28
+ "@types/react-dom": "^18.3.0",
29
+ "rollup-plugin-tsconfig-paths": "^1.5.2",
30
+ "vite-plugin-dts": "^3.9.1",
31
+ "vite-tsconfig-paths": "^4.3.2"
52
32
  }
53
- }
33
+ }
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFAudio as EFAudioElement } from "@editframe/elements";
4
+
5
+ export const EFAudio = createComponent({
6
+ tagName: "ef-audio",
7
+ elementClass: EFAudioElement,
8
+ react: React,
9
+ });
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import {
4
+ EFCaptions as EFCaptionsElement,
5
+ EFCaptionsActiveWord as EFCaptionsActiveWordElement,
6
+ } from "@editframe/elements";
7
+
8
+ export const EFCaptions = createComponent({
9
+ tagName: "ef-captions",
10
+ elementClass: EFCaptionsElement,
11
+ react: React,
12
+ });
13
+
14
+ export const EFCaptionsActiveWord = createComponent({
15
+ tagName: "ef-captions-active-word",
16
+ elementClass: EFCaptionsActiveWordElement,
17
+ react: React,
18
+ });
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFImage as EFImageElement } from "@editframe/elements";
4
+
5
+ export const EFImage = createComponent({
6
+ tagName: "ef-image",
7
+ elementClass: EFImageElement,
8
+ react: React,
9
+ });
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFTimegroup as EFTimegroupElement } from "@editframe/elements";
4
+
5
+ export const EFTimegroup = createComponent({
6
+ tagName: "ef-timegroup",
7
+ elementClass: EFTimegroupElement,
8
+ react: React,
9
+ });
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFVideo as EFVideoElement } from "@editframe/elements";
4
+
5
+ export const EFVideo = createComponent({
6
+ tagName: "ef-video",
7
+ elementClass: EFVideoElement,
8
+ react: React,
9
+ });
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFWaveform as EFWaveformElement } from "@editframe/elements";
4
+
5
+ export const EFWaveform = createComponent({
6
+ tagName: "ef-waveform",
7
+ elementClass: EFWaveformElement,
8
+ react: React,
9
+ });
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFFilmstrip as EFFilmstripElement } from "@editframe/elements";
4
+
5
+ export const EFFilmstrip = createComponent({
6
+ tagName: "ef-filmstrip",
7
+ elementClass: EFFilmstripElement,
8
+ react: React,
9
+ });
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { EFWorkbench as EFWorkbenchElement } from "@editframe/elements";
4
+
5
+ export const EFWorkbench = createComponent({
6
+ tagName: "ef-workbench",
7
+ elementClass: EFWorkbenchElement,
8
+ react: React,
9
+ });
@@ -0,0 +1,52 @@
1
+ import type { EFTimegroup } from "@editframe/elements";
2
+ import type { ReactiveController, ReactiveControllerHost } from "lit";
3
+ import { useEffect, useRef, useState } from "react";
4
+
5
+ interface TimeInfo {
6
+ ownCurrentTimeMs: number;
7
+ durationMs: number;
8
+ percentComplete: number;
9
+ }
10
+
11
+ class CurrentTimeController implements ReactiveController {
12
+ constructor(
13
+ private host: {
14
+ ownCurrentTimeMs: number;
15
+ durationMs: number;
16
+ } & ReactiveControllerHost,
17
+ private setCurrentTime: React.Dispatch<React.SetStateAction<TimeInfo>>,
18
+ ) {
19
+ this.host.addController(this);
20
+ }
21
+
22
+ hostDisconnected(): void {
23
+ this.host.removeController(this);
24
+ }
25
+
26
+ hostUpdated(): void {
27
+ this.setCurrentTime({
28
+ ownCurrentTimeMs: this.host.ownCurrentTimeMs,
29
+ durationMs: this.host.durationMs,
30
+ percentComplete: this.host.ownCurrentTimeMs / this.host.durationMs,
31
+ });
32
+ }
33
+ }
34
+
35
+ export const useTimingInfo = (
36
+ timegroupRef: React.RefObject<EFTimegroup> = useRef<EFTimegroup>(null),
37
+ ) => {
38
+ const [timeInfo, setTimeInfo] = useState<TimeInfo>({
39
+ ownCurrentTimeMs: 0,
40
+ durationMs: 0,
41
+ percentComplete: 0,
42
+ });
43
+
44
+ useEffect(() => {
45
+ if (!timegroupRef.current) {
46
+ throw new Error("Timegroup ref not set");
47
+ }
48
+ new CurrentTimeController(timegroupRef.current, setTimeInfo);
49
+ }, [timegroupRef.current]);
50
+
51
+ return { ...timeInfo, ref: timegroupRef };
52
+ };
package/README.md DELETED
@@ -1,66 +0,0 @@
1
- # Editframe React Player
2
-
3
-
4
- This is react component to preview a video using [Editframe SDK](https://www.editframe.com/docs/sdks) video config JSON object.
5
-
6
-
7
- ## Installation
8
- You can install the Editframe React Player using npm or yarn:
9
-
10
- Npm
11
- ```sh
12
- npm install @editframe/react
13
- ```
14
- Yarn
15
- ```sh
16
- yarn add @editframe/react
17
- ```
18
-
19
-
20
- ## Getting Started
21
-
22
- To get started with the Editframe React, you will need to obtain an Application ID from the Editframe dashboard.
23
-
24
- Once you have your Application ID, you can use the React Player
25
-
26
-
27
- ```App.tsx
28
- import "./App.css";
29
- import { Player } from "@editframe/react";
30
- import { useState } from "react";
31
-
32
- function App() {
33
- const [playerState, setPlayerState] = useState<"stopped" | "playing" | "paused">("playing"); // you can use this to control the player
34
- const [seek, setSeek] = useState(0); // you can use this to seek the player
35
- const config = {
36
- backgroundColor: "#000000FF",
37
- dimensions: {
38
- height: 1080,
39
- width: 1920,
40
- },
41
- duration: 10,
42
- metadata: {},
43
- layers: [],
44
- }; // this is the config for the player to render the video
45
- return (
46
- <div className="App">
47
- <div style={{ height: "100vh", width: "100vw" }}>
48
- <Player
49
- config={config}
50
- style={{
51
- height: "100%",
52
- width: "100%",
53
- }}
54
- applicationId="demo"
55
- loop={false}
56
- playerState={playerState}
57
- seek={seek}
58
- />
59
- </div>
60
- </div>
61
- );
62
- }
63
- export default App;
64
- ```
65
- You can check our [React Player Demo App](https://github.com/editframe/react-player-demo-app)
66
-
package/dist/Player.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import { DetailedHTMLProps, FunctionComponent, HTMLAttributes } from 'react';
2
- import { CompositionConfigEditor } from './shared';
3
- export interface IPlayerProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
4
- applicationId?: string;
5
- config: CompositionConfigEditor;
6
- dimensions?: {
7
- height: string;
8
- width: string;
9
- };
10
- hideControls?: boolean;
11
- host?: string;
12
- loop: boolean;
13
- playerState?: 'playing' | 'paused' | 'stopped';
14
- seek?: number;
15
- loading?: boolean;
16
- mode?: string;
17
- }
18
- declare const Player: FunctionComponent<IPlayerProps>;
19
- export default Player;
20
- //# sourceMappingURL=Player.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Player.d.ts","sourceRoot":"","sources":["../src/Player.tsx"],"names":[],"mappings":"AACA,OAAc,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EAGf,MAAM,OAAO,CAAA;AAGd,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAElD,MAAM,WAAW,YACf,SAAQ,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,UAAU,CAAC,EAAE;QACX,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,QAAA,MAAM,MAAM,EAAE,iBAAiB,CAAC,YAAY,CAiF3C,CAAA;AAGD,eAAe,MAAM,CAAA"}
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { default as Player } from './Player';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA"}
package/dist/index.esm.js DELETED
@@ -1,139 +0,0 @@
1
- import React, { useRef, useEffect } from 'react';
2
-
3
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
4
- // require the crypto API and do not support built-in fallback to lower quality random number
5
- // generators (like Math.random()).
6
- let getRandomValues;
7
- const rnds8 = new Uint8Array(16);
8
- function rng() {
9
- // lazy load so that environments that need to polyfill have a chance to do so
10
- if (!getRandomValues) {
11
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
12
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
13
-
14
- if (!getRandomValues) {
15
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
16
- }
17
- }
18
-
19
- return getRandomValues(rnds8);
20
- }
21
-
22
- /**
23
- * Convert array of 16 byte values to UUID string format of the form:
24
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
25
- */
26
-
27
- const byteToHex = [];
28
-
29
- for (let i = 0; i < 256; ++i) {
30
- byteToHex.push((i + 0x100).toString(16).slice(1));
31
- }
32
-
33
- function unsafeStringify(arr, offset = 0) {
34
- // Note: Be careful editing this code! It's been tuned for performance
35
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
36
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
37
- }
38
-
39
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
40
- var native = {
41
- randomUUID
42
- };
43
-
44
- function v4(options, buf, offset) {
45
- if (native.randomUUID && !buf && !options) {
46
- return native.randomUUID();
47
- }
48
-
49
- options = options || {};
50
- const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
51
-
52
- rnds[6] = rnds[6] & 0x0f | 0x40;
53
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
54
-
55
- if (buf) {
56
- offset = offset || 0;
57
-
58
- for (let i = 0; i < 16; ++i) {
59
- buf[offset + i] = rnds[i];
60
- }
61
-
62
- return buf;
63
- }
64
-
65
- return unsafeStringify(rnds);
66
- }
67
-
68
- var f=Object.defineProperty;var u=(n,t,e)=>t in n?f(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>(u(n,typeof t!="symbol"?t+"":t,e),e);var o=(n,t,e)=>new Promise((a,s)=>{var d=r=>{try{p(e.next(r));}catch(h){s(h);}},l=r=>{try{p(e.throw(r));}catch(h){s(h);}},p=r=>r.done?a(r.value):Promise.resolve(r.value).then(d,l);p((e=e.apply(n,t)).next());});var m=class{constructor({applicationId:t,config:e,containerId:a,dimensions:s,host:d="https://embed.editframe.com",mode:l,playerControls:p=!0,playerLoop:r=!1}){i(this,"applicationId");i(this,"config");i(this,"container");i(this,"dimensions");i(this,"host");i(this,"iFrameId");i(this,"mode");i(this,"playerLoop");i(this,"playerState");i(this,"playerControls");i(this,"editframeLogo");i(this,"iFrame");i(this,"readyMediaIds",[]);i(this,"updateConfig",t=>o(this,null,function*(){this.config=t,yield this.sendCallWithValue("setConfig",{config:this.config,iFrameId:this.iFrameId});}));i(this,"setupContainer",t=>{t.style.alignItems="center",t.style.display="flex",t.style.justifyContent="center",t.style.height="100%",t.style.width="100%";});i(this,"setupEditframeLogo",()=>{var e;let t=document.createElement("img");return t.src="https://cdn.editframe.com/web/logo_white.png",t.style.position="absolute",t.style.transition="opacity 0.5s",(e=this.container)==null||e.appendChild(t),this.editframeLogo=t,t});i(this,"setupIFrame",()=>{var s,d,l;let t=document.createElement("iframe"),a=`${this.host}/${this.applicationId}?mode=${this.mode}`;return this.playerControls||(a=`${a}&hideControls`),this.playerLoop&&(a=`${a}&loop`),t.setAttribute("loading","lazy"),t.setAttribute("src",a),t.style.width=((s=this.dimensions)==null?void 0:s.width)||"100%",t.style.height=((d=this.dimensions)==null?void 0:d.height)||"100%",t.style.border="none",t.style.outline="none",t.style.transition="opacity 0.5s",t.scrolling="no",t.frameBorder="0",(l=this.container)==null||l.appendChild(t),this.iFrame=t,t});i(this,"setupEventListeners",()=>{window.addEventListener("message",t=>o(this,null,function*(){if(t.data&&t.data.config&&t.data.iFrameId===this.iFrameId){let{data:{config:e}}=t;this.config=e;}if(t.data&&t.data.pageLoaded&&(yield this.handlePageLoaded()),!(t.data&&t.data.iFrameId&&t.data.iFrameId!==this.iFrameId)){if(t.data&&t.data.iFrameReady&&(yield this.handleIframeReady()),t.data&&t.data.editorReady&&(yield this.handleEditorReady()),t.data&&t.data.playerState&&(this.playerState=t.data.playerState),t.data&&t.data.layerId){let{data:{layerId:e}}=t;this.readyMediaIds.includes(e)||this.readyMediaIds.push(e);}if(this.config){let a=this.config.layers.filter(s=>"source"in s).map(s=>s.id).every(s=>this.readyMediaIds.includes(s));(this.config.layers.length===0||a)&&this.handleEditorReady();}}}));});i(this,"handlePageLoaded",()=>o(this,null,function*(){yield this.sendCallWithValue("setIframeId",{iFrameId:this.iFrameId});}));i(this,"handleIframeReady",()=>o(this,null,function*(){this.config&&(yield this.sendCallWithValue("setConfig",{config:this.config,iFrameId:this.iFrameId}));}));i(this,"handleEditorReady",()=>o(this,null,function*(){setTimeout(()=>{this.editframeLogo.remove();},500);}));if(this.applicationId=t,this.config=e,this.container=document.getElementById(a),this.dimensions=s,this.host=d,this.iFrameId=v4().slice(0,6),this.mode=l||"preview",this.playerControls=p,this.playerLoop=r,this.playerState="stopped",!this.container)throw new Error(`Container #${a} not found`);this.setupContainer(this.container),this.setupEditframeLogo(),this.setupIFrame(),this.setupEventListeners();}sendCallWithValue(t,e){return o(this,null,function*(){return this.iFrame.contentWindow?(this.iFrame.contentWindow.postMessage({call:t,value:e},"*"),!0):!1})}},c=m;var g=class{constructor({applicationId:t,config:e,containerId:a,dimensions:s,hideControls:d=!1,host:l,loop:p=!1,mode:r}){i(this,"state");i(this,"v");i(this,"updateConfig",t=>o(this,null,function*(){yield this.v.sendCallWithValue("setConfig",{config:t,iFrameId:this.v.iFrameId});}));i(this,"play",()=>o(this,null,function*(){yield this.setState("playing");}));i(this,"pause",()=>o(this,null,function*(){yield this.setState("paused");}));i(this,"stop",()=>o(this,null,function*(){yield this.setState("stopped");}));i(this,"seek",t=>o(this,null,function*(){yield this.v.sendCallWithValue("setPlayerSeek",{seconds:t,iFrameId:this.v.iFrameId});}));i(this,"setLoadingState",t=>o(this,null,function*(){yield this.v.sendCallWithValue("setLoadingState",{state:t,iFrameId:this.v.iFrameId});}));i(this,"setState",t=>o(this,null,function*(){yield this.v.sendCallWithValue("setPlayerState",{state:t,iFrameId:this.v.iFrameId}),this.state=t;}));let h=document.getElementById(a);if(this.state="stopped",!h)throw new Error(`Container #${a} not found`);this.v=new c({applicationId:t,config:e,containerId:a,dimensions:s,host:l||"https://embed.editframe.com",playerControls:!d,playerLoop:p,mode:r});}},I=g;
69
-
70
- var Player = function (_a) {
71
- var applicationId = _a.applicationId, children = _a.children, config = _a.config, dimensions = _a.dimensions, hideControls = _a.hideControls, host = _a.host, loading = _a.loading, loop = _a.loop, mode = _a.mode, playerState = _a.playerState, seek = _a.seek;
72
- var player = useRef(false);
73
- var ref = useRef(null);
74
- var embed = useRef({});
75
- var containerId = "ef-player-".concat(v4().slice(0, 6));
76
- if (!applicationId) {
77
- throw new Error('applicationId is required');
78
- }
79
- useEffect(function () {
80
- if (!player.current && !embed.current.setState) {
81
- embed.current = new I({
82
- applicationId: applicationId,
83
- config: config,
84
- containerId: containerId,
85
- dimensions: dimensions,
86
- host: host || 'https://embed.editframe.com',
87
- hideControls: hideControls,
88
- loop: loop,
89
- mode: mode
90
- });
91
- player.current = true;
92
- }
93
- return function () {
94
- player.current = false;
95
- };
96
- }, []);
97
- useEffect(function () {
98
- if (embed.current && embed.current.setState) {
99
- embed.current.setState(playerState);
100
- }
101
- return function () {
102
- if (embed.current && embed.current.setState) {
103
- embed.current.setState('stopped');
104
- }
105
- };
106
- }, [playerState]);
107
- useEffect(function () {
108
- if (embed.current && embed.current.setState) {
109
- embed.current.seek(seek);
110
- }
111
- return function () {
112
- if (embed.current && embed.current.setState) {
113
- embed.current.seek(0);
114
- }
115
- };
116
- }, [seek]);
117
- useEffect(function () {
118
- if (embed.current && embed.current.setState) {
119
- embed.current.setLoadingState(loading);
120
- }
121
- return function () {
122
- if (embed.current && embed.current.setState) {
123
- embed.current.setLoadingState(false);
124
- }
125
- };
126
- }, [loading]);
127
- useEffect(function () {
128
- if (embed.current && embed.current.setState) {
129
- embed.current.setLoadingState(true);
130
- embed.current.updateConfig(config);
131
- embed.current.setLoadingState(false);
132
- }
133
- return function () { };
134
- }, [config]);
135
- return React.createElement("div", { style: { backgroundColor: "black" }, id: containerId, ref: ref }, children);
136
- };
137
-
138
- export { Player };
139
- //# sourceMappingURL=index.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/stringify.js","../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/native.js","../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/v4.js","../../embed/dist/index.mjs","../src/Player.tsx"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","var f=Object.defineProperty;var u=(n,t,e)=>t in n?f(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>(u(n,typeof t!=\"symbol\"?t+\"\":t,e),e);var o=(n,t,e)=>new Promise((a,s)=>{var d=r=>{try{p(e.next(r))}catch(h){s(h)}},l=r=>{try{p(e.throw(r))}catch(h){s(h)}},p=r=>r.done?a(r.value):Promise.resolve(r.value).then(d,l);p((e=e.apply(n,t)).next())});import{v4 as y}from\"uuid\";var m=class{constructor({applicationId:t,config:e,containerId:a,dimensions:s,host:d=\"https://embed.editframe.com\",mode:l,playerControls:p=!0,playerLoop:r=!1}){i(this,\"applicationId\");i(this,\"config\");i(this,\"container\");i(this,\"dimensions\");i(this,\"host\");i(this,\"iFrameId\");i(this,\"mode\");i(this,\"playerLoop\");i(this,\"playerState\");i(this,\"playerControls\");i(this,\"editframeLogo\");i(this,\"iFrame\");i(this,\"readyMediaIds\",[]);i(this,\"updateConfig\",t=>o(this,null,function*(){this.config=t,yield this.sendCallWithValue(\"setConfig\",{config:this.config,iFrameId:this.iFrameId})}));i(this,\"setupContainer\",t=>{t.style.alignItems=\"center\",t.style.display=\"flex\",t.style.justifyContent=\"center\",t.style.height=\"100%\",t.style.width=\"100%\"});i(this,\"setupEditframeLogo\",()=>{var e;let t=document.createElement(\"img\");return t.src=\"https://cdn.editframe.com/web/logo_white.png\",t.style.position=\"absolute\",t.style.transition=\"opacity 0.5s\",(e=this.container)==null||e.appendChild(t),this.editframeLogo=t,t});i(this,\"setupIFrame\",()=>{var s,d,l;let t=document.createElement(\"iframe\"),a=`${this.host}/${this.applicationId}?mode=${this.mode}`;return this.playerControls||(a=`${a}&hideControls`),this.playerLoop&&(a=`${a}&loop`),t.setAttribute(\"loading\",\"lazy\"),t.setAttribute(\"src\",a),t.style.width=((s=this.dimensions)==null?void 0:s.width)||\"100%\",t.style.height=((d=this.dimensions)==null?void 0:d.height)||\"100%\",t.style.border=\"none\",t.style.outline=\"none\",t.style.transition=\"opacity 0.5s\",t.scrolling=\"no\",t.frameBorder=\"0\",(l=this.container)==null||l.appendChild(t),this.iFrame=t,t});i(this,\"setupEventListeners\",()=>{window.addEventListener(\"message\",t=>o(this,null,function*(){if(t.data&&t.data.config&&t.data.iFrameId===this.iFrameId){let{data:{config:e}}=t;this.config=e}if(t.data&&t.data.pageLoaded&&(yield this.handlePageLoaded()),!(t.data&&t.data.iFrameId&&t.data.iFrameId!==this.iFrameId)){if(t.data&&t.data.iFrameReady&&(yield this.handleIframeReady()),t.data&&t.data.editorReady&&(yield this.handleEditorReady()),t.data&&t.data.playerState&&(this.playerState=t.data.playerState),t.data&&t.data.layerId){let{data:{layerId:e}}=t;this.readyMediaIds.includes(e)||this.readyMediaIds.push(e)}if(this.config){let a=this.config.layers.filter(s=>\"source\"in s).map(s=>s.id).every(s=>this.readyMediaIds.includes(s));(this.config.layers.length===0||a)&&this.handleEditorReady()}}}))});i(this,\"handlePageLoaded\",()=>o(this,null,function*(){yield this.sendCallWithValue(\"setIframeId\",{iFrameId:this.iFrameId})}));i(this,\"handleIframeReady\",()=>o(this,null,function*(){this.config&&(yield this.sendCallWithValue(\"setConfig\",{config:this.config,iFrameId:this.iFrameId}))}));i(this,\"handleEditorReady\",()=>o(this,null,function*(){setTimeout(()=>{this.editframeLogo.remove()},500)}));if(this.applicationId=t,this.config=e,this.container=document.getElementById(a),this.dimensions=s,this.host=d,this.iFrameId=y().slice(0,6),this.mode=l||\"preview\",this.playerControls=p,this.playerLoop=r,this.playerState=\"stopped\",!this.container)throw new Error(`Container #${a} not found`);this.setupContainer(this.container),this.setupEditframeLogo(),this.setupIFrame(),this.setupEventListeners()}sendCallWithValue(t,e){return o(this,null,function*(){return this.iFrame.contentWindow?(this.iFrame.contentWindow.postMessage({call:t,value:e},\"*\"),!0):!1})}},c=m;var g=class{constructor({applicationId:t,config:e,containerId:a,dimensions:s,hideControls:d=!1,host:l,loop:p=!1,mode:r}){i(this,\"state\");i(this,\"v\");i(this,\"updateConfig\",t=>o(this,null,function*(){yield this.v.sendCallWithValue(\"setConfig\",{config:t,iFrameId:this.v.iFrameId})}));i(this,\"play\",()=>o(this,null,function*(){yield this.setState(\"playing\")}));i(this,\"pause\",()=>o(this,null,function*(){yield this.setState(\"paused\")}));i(this,\"stop\",()=>o(this,null,function*(){yield this.setState(\"stopped\")}));i(this,\"seek\",t=>o(this,null,function*(){yield this.v.sendCallWithValue(\"setPlayerSeek\",{seconds:t,iFrameId:this.v.iFrameId})}));i(this,\"setLoadingState\",t=>o(this,null,function*(){yield this.v.sendCallWithValue(\"setLoadingState\",{state:t,iFrameId:this.v.iFrameId})}));i(this,\"setState\",t=>o(this,null,function*(){yield this.v.sendCallWithValue(\"setPlayerState\",{state:t,iFrameId:this.v.iFrameId}),this.state=t}));let h=document.getElementById(a);if(this.state=\"stopped\",!h)throw new Error(`Container #${a} not found`);this.v=new c({applicationId:t,config:e,containerId:a,dimensions:s,host:l||\"https://embed.editframe.com\",playerControls:!d,playerLoop:p,mode:r})}},I=g;export{c as Embed,I as Player};\n","import { Player as PlayerClass } from '@editframe/embed'\nimport React, {\n DetailedHTMLProps,\n FunctionComponent,\n HTMLAttributes,\n useEffect,\n useRef,\n} from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport { CompositionConfigEditor } from './shared'\n\nexport interface IPlayerProps\n extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {\n applicationId?: string\n config: CompositionConfigEditor\n dimensions?: {\n height: string\n width: string\n }\n hideControls?: boolean\n host?: string\n loop: boolean\n playerState?: 'playing' | 'paused' | 'stopped'\n seek?: number\n loading?: boolean\n mode?: string\n}\n\nconst Player: FunctionComponent<IPlayerProps> = ({\n applicationId,\n children,\n config,\n dimensions,\n hideControls,\n host,\n loading,\n loop,\n mode,\n playerState,\n seek\n}) => {\n const player = useRef(false)\n const ref = useRef(null)\n const embed = useRef({} as any)\n const containerId = `ef-player-${uuid().slice(0, 6)}`\n\n if (!applicationId) {\n throw new Error('applicationId is required')\n }\n \n useEffect(() => {\n if (!player.current && !embed.current.setState) {\n embed.current = new PlayerClass({\n applicationId,\n config,\n containerId,\n dimensions,\n host: host || 'https://embed.editframe.com',\n hideControls,\n loop,\n mode\n })\n player.current = true\n }\n return () => {\n player.current = false\n }\n }, [])\n useEffect(() => {\n if (embed.current && embed.current.setState) {\n embed.current.setState(playerState)\n }\n return () => {\n if (embed.current && embed.current.setState) {\n embed.current.setState('stopped')\n }\n }\n }, [playerState])\n useEffect(() => {\n if (embed.current && embed.current.setState) {\n embed.current.seek(seek)\n }\n return () => {\n if (embed.current && embed.current.setState) {\n embed.current.seek(0)\n }\n }\n }, [seek])\n useEffect(() => {\n if (embed.current && embed.current.setState) {\n embed.current.setLoadingState(loading)\n }\n return () => {\n if (embed.current && embed.current.setState) {\n embed.current.setLoadingState(false)\n }\n }\n }, [loading])\n useEffect(() => {\n if (embed.current && embed.current.setState) {\n embed.current.setLoadingState(true)\n embed.current.updateConfig(config)\n embed.current.setLoadingState(false)\n }\n return () => { }\n }, [config])\n\n\n return <div style={{ backgroundColor: \"black\" }} id={containerId} ref={ref}>{children}</div>\n}\n\n\nexport default Player\n"],"names":["y","uuid","PlayerClass"],"mappings":";;AAAA;AACA;AACA;AACA,IAAI,eAAe,CAAC;AACpB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AAClB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB;AACA,IAAI,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACrH;AACA,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,MAAM,MAAM,IAAI,KAAK,CAAC,0GAA0G,CAAC,CAAC;AAClI,KAAK;AACL,GAAG;AACH;AACA,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC;;AChBA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB;AACA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC,EAAE;AAC9B,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AACD;AACO,SAAS,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,EAAE;AACjD;AACA;AACA,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAA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AGZ,OAAO,6BAAK,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,IAAG,QAAQ,CAAO,CAAA;AAC9F;;;;"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/stringify.js","../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/native.js","../../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/v4.js","../../embed/dist/index.mjs","../src/Player.tsx"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","var f=Object.defineProperty;var u=(n,t,e)=>t in n?f(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>(u(n,typeof t!=\"symbol\"?t+\"\":t,e),e);var o=(n,t,e)=>new Promise((a,s)=>{var d=r=>{try{p(e.next(r))}catch(h){s(h)}},l=r=>{try{p(e.throw(r))}catch(h){s(h)}},p=r=>r.done?a(r.value):Promise.resolve(r.value).then(d,l);p((e=e.apply(n,t)).next())});import{v4 as y}from\"uuid\";var m=class{constructor({applicationId:t,config:e,containerId:a,dimensions:s,host:d=\"https://embed.editframe.com\",mode:l,playerControls:p=!0,playerLoop:r=!1}){i(this,\"applicationId\");i(this,\"config\");i(this,\"container\");i(this,\"dimensions\");i(this,\"host\");i(this,\"iFrameId\");i(this,\"mode\");i(this,\"playerLoop\");i(this,\"playerState\");i(this,\"playerControls\");i(this,\"editframeLogo\");i(this,\"iFrame\");i(this,\"readyMediaIds\",[]);i(this,\"updateConfig\",t=>o(this,null,function*(){this.config=t,yield this.sendCallWithValue(\"setConfig\",{config:this.config,iFrameId:this.iFrameId})}));i(this,\"setupContainer\",t=>{t.style.alignItems=\"center\",t.style.display=\"flex\",t.style.justifyContent=\"center\",t.style.height=\"100%\",t.style.width=\"100%\"});i(this,\"setupEditframeLogo\",()=>{var e;let t=document.createElement(\"img\");return t.src=\"https://cdn.editframe.com/web/logo_white.png\",t.style.position=\"absolute\",t.style.transition=\"opacity 0.5s\",(e=this.container)==null||e.appendChild(t),this.editframeLogo=t,t});i(this,\"setupIFrame\",()=>{var s,d,l;let t=document.createElement(\"iframe\"),a=`${this.host}/${this.applicationId}?mode=${this.mode}`;return this.playerControls||(a=`${a}&hideControls`),this.playerLoop&&(a=`${a}&loop`),t.setAttribute(\"loading\",\"lazy\"),t.setAttribute(\"src\",a),t.style.width=((s=this.dimensions)==null?void 0:s.width)||\"100%\",t.style.height=((d=this.dimensions)==null?void 0:d.height)||\"100%\",t.style.border=\"none\",t.style.outline=\"none\",t.style.transition=\"opacity 0.5s\",t.scrolling=\"no\",t.frameBorder=\"0\",(l=this.container)==null||l.appendChild(t),this.iFrame=t,t});i(this,\"setupEventListeners\",()=>{window.addEventListener(\"message\",t=>o(this,null,function*(){if(t.data&&t.data.config&&t.data.iFrameId===this.iFrameId){let{data:{config:e}}=t;this.config=e}if(t.data&&t.data.pageLoaded&&(yield this.handlePageLoaded()),!(t.data&&t.data.iFrameId&&t.data.iFrameId!==this.iFrameId)){if(t.data&&t.data.iFrameReady&&(yield this.handleIframeReady()),t.data&&t.data.editorReady&&(yield this.handleEditorReady()),t.data&&t.data.playerState&&(this.playerState=t.data.playerState),t.data&&t.data.layerId){let{data:{layerId:e}}=t;this.readyMediaIds.includes(e)||this.readyMediaIds.push(e)}if(this.config){let a=this.config.layers.filter(s=>\"source\"in s).map(s=>s.id).every(s=>this.readyMediaIds.includes(s));(this.config.layers.length===0||a)&&this.handleEditorReady()}}}))});i(this,\"handlePageLoaded\",()=>o(this,null,function*(){yield this.sendCallWithValue(\"setIframeId\",{iFrameId:this.iFrameId})}));i(this,\"handleIframeReady\",()=>o(this,null,function*(){this.config&&(yield this.sendCallWithValue(\"setConfig\",{config:this.config,iFrameId:this.iFrameId}))}));i(this,\"handleEditorReady\",()=>o(this,null,function*(){setTimeout(()=>{this.editframeLogo.remove()},500)}));if(this.applicationId=t,this.config=e,this.container=document.getElementById(a),this.dimensions=s,this.host=d,this.iFrameId=y().slice(0,6),this.mode=l||\"preview\",this.playerControls=p,this.playerLoop=r,this.playerState=\"stopped\",!this.container)throw new Error(`Container #${a} not found`);this.setupContainer(this.container),this.setupEditframeLogo(),this.setupIFrame(),this.setupEventListeners()}sendCallWithValue(t,e){return o(this,null,function*(){return this.iFrame.contentWindow?(this.iFrame.contentWindow.postMessage({call:t,value:e},\"*\"),!0):!1})}},c=m;var g=class{constructor({applicationId:t,config:e,containerId:a,dimensions:s,hideControls:d=!1,host:l,loop:p=!1,mode:r}){i(this,\"state\");i(this,\"v\");i(this,\"updateConfig\",t=>o(this,null,function*(){yield this.v.sendCallWithValue(\"setConfig\",{config:t,iFrameId:this.v.iFrameId})}));i(this,\"play\",()=>o(this,null,function*(){yield this.setState(\"playing\")}));i(this,\"pause\",()=>o(this,null,function*(){yield this.setState(\"paused\")}));i(this,\"stop\",()=>o(this,null,function*(){yield this.setState(\"stopped\")}));i(this,\"seek\",t=>o(this,null,function*(){yield this.v.sendCallWithValue(\"setPlayerSeek\",{seconds:t,iFrameId:this.v.iFrameId})}));i(this,\"setLoadingState\",t=>o(this,null,function*(){yield this.v.sendCallWithValue(\"setLoadingState\",{state:t,iFrameId:this.v.iFrameId})}));i(this,\"setState\",t=>o(this,null,function*(){yield this.v.sendCallWithValue(\"setPlayerState\",{state:t,iFrameId:this.v.iFrameId}),this.state=t}));let h=document.getElementById(a);if(this.state=\"stopped\",!h)throw new Error(`Container #${a} not found`);this.v=new c({applicationId:t,config:e,containerId:a,dimensions:s,host:l||\"https://embed.editframe.com\",playerControls:!d,playerLoop:p,mode:r})}},I=g;export{c as Embed,I as Player};\n","import { Player as PlayerClass } from '@editframe/embed'\nimport React, {\n DetailedHTMLProps,\n FunctionComponent,\n HTMLAttributes,\n useEffect,\n useRef,\n} from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport { CompositionConfigEditor } from './shared'\n\nexport interface IPlayerProps\n extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {\n applicationId?: string\n config: CompositionConfigEditor\n dimensions?: {\n height: string\n width: string\n }\n hideControls?: boolean\n host?: string\n loop: boolean\n playerState?: 'playing' | 'paused' | 'stopped'\n seek?: number\n loading?: boolean\n mode?: string\n}\n\nconst Player: FunctionComponent<IPlayerProps> = ({\n applicationId,\n children,\n config,\n dimensions,\n hideControls,\n host,\n loading,\n loop,\n mode,\n playerState,\n seek\n}) => {\n const player = useRef(false)\n const ref = useRef(null)\n const embed = useRef({} as any)\n const containerId = `ef-player-${uuid().slice(0, 6)}`\n\n if (!applicationId) {\n throw new Error('applicationId is required')\n }\n \n useEffect(() => {\n if (!player.current && !embed.current.setState) {\n embed.current = new PlayerClass({\n applicationId,\n config,\n containerId,\n dimensions,\n host: host || 'https://embed.editframe.com',\n hideControls,\n loop,\n mode\n })\n player.current = true\n }\n return () => {\n player.current = false\n }\n }, [])\n useEffect(() => {\n if (embed.current && embed.current.setState) {\n embed.current.setState(playerState)\n }\n return () => {\n if (embed.current && embed.current.setState) {\n embed.current.setState('stopped')\n }\n }\n }, [playerState])\n useEffect(() => {\n if (embed.current && embed.current.setState) {\n embed.current.seek(seek)\n }\n return () => {\n if (embed.current && embed.current.setState) {\n embed.current.seek(0)\n }\n }\n }, [seek])\n useEffect(() => {\n if (embed.current && embed.current.setState) {\n embed.current.setLoadingState(loading)\n }\n return () => {\n if (embed.current && embed.current.setState) {\n embed.current.setLoadingState(false)\n }\n }\n }, [loading])\n useEffect(() => {\n if (embed.current && embed.current.setState) {\n embed.current.setLoadingState(true)\n embed.current.updateConfig(config)\n embed.current.setLoadingState(false)\n }\n return () => { }\n }, [config])\n\n\n return <div style={{ backgroundColor: \"black\" }} id={containerId} ref={ref}>{children}</div>\n}\n\n\nexport default Player\n"],"names":["y","useRef","uuid","useEffect","PlayerClass","React"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA,IAAI,eAAe,CAAC;AACpB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AAClB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB;AACA,IAAI,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACrH;AACA,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,MAAM,MAAM,IAAI,KAAK,CAAC,0GAA0G,CAAC,CAAC;AAClI,KAAK;AACL,GAAG;AACH;AACA,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC;;AChBA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB;AACA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC,EAAE;AAC9B,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CA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;KACF,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IACbA,eAAS,CAAC;QACR,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE;YAC3C,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;YACnC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;YAClC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;SACrC;QACD,OAAO,eAAS,CAAA;KACjB,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAGZ,OAAOE,iDAAK,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,IAAG,QAAQ,CAAO,CAAA;AAC9F;;;;"}
package/dist/shared.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { CompositionConfigEditor } from '../../shared-types';
2
- export type { CompositionConfigEditor };
3
- //# sourceMappingURL=shared.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAE5D,YAAY,EAAE,uBAAuB,EAAE,CAAA"}