@zync/zync-screnplay-player 0.1.187
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/ZyncScreenplayPlayer.js +35 -0
- package/dist/bundle.js +2 -0
- package/dist/bundle.js.LICENSE.txt +54 -0
- package/dist/index.js +4 -0
- package/dist/screenplay/RemotionRenderer/RemotionRenderer.js +281 -0
- package/dist/screenplay/RemotionRenderer/Root.js +22 -0
- package/dist/screenplay/RemotionRenderer/components/LottieAnimationGlobal.js +116 -0
- package/dist/screenplay/RemotionRenderer/components/backgrounds/VirtualBackground.js +26 -0
- package/dist/screenplay/RemotionRenderer/components/backgrounds/VirtualBackgroundUnderlay.js +41 -0
- package/dist/screenplay/RemotionRenderer/components/captions/CaptionSimple.js +12 -0
- package/dist/screenplay/RemotionRenderer/components/effects/BrollFullscreen.js +27 -0
- package/dist/screenplay/RemotionRenderer/components/effects/GlitchText.js +22 -0
- package/dist/screenplay/RemotionRenderer/components/effects/HandoffNametag.js +7 -0
- package/dist/screenplay/RemotionRenderer/components/effects/LottieAnimation.js +64 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Nametag.js +9 -0
- package/dist/screenplay/RemotionRenderer/components/effects/PhraseRainbowEffect.js +34 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Sentence.js +50 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Title.js +12 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/BrollGreenScreen.js +742 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/BrollSplitScreen.js +714 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/BrollStudioBackdrop.js +620 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/DynamicTriangle.js +618 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/Handoff.js +161 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/IntroVideo.js +1330 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/KeyPointOverlayDepth.js +397 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/Keyword.js +539 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/KeywordStudioBackdrop.js +714 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStill.js +381 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillFullScreen.js +178 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillGreenScreen.js +568 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillGreenScreenV2.js +731 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillStudioBackdrop.js +588 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrame.js +183 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameBroll.js +181 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameSentence.js +17 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameZoomCut.js +13 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/TextWithVideo.js +373 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/quote-bubble-animation.json +1 -0
- package/dist/screenplay/RemotionRenderer/components/utils/BlurOverlay.js +19 -0
- package/dist/screenplay/RemotionRenderer/components/utils/ChromaKeyedVideo.js +59 -0
- package/dist/screenplay/RemotionRenderer/components/utils/FaceCenteredVideo.js +562 -0
- package/dist/screenplay/RemotionRenderer/components/utils/PausableImg.js +124 -0
- package/dist/screenplay/RemotionRenderer/components/utils/README.md +80 -0
- package/dist/screenplay/RemotionRenderer/components/utils/SafeZones.js +69 -0
- package/dist/screenplay/RemotionRenderer/components/utils/StretchText.js +124 -0
- package/dist/screenplay/RemotionRenderer/components/utils/StretchTextDemo.js +66 -0
- package/dist/screenplay/RemotionRenderer/config.js +8 -0
- package/dist/screenplay/RemotionRenderer/development.js +1370 -0
- package/dist/screenplay/RemotionRenderer/helpers/cleanFacemetadata.js +29 -0
- package/dist/screenplay/RemotionRenderer/helpers/convertToSeconds.js +14 -0
- package/dist/screenplay/RemotionRenderer/helpers/faceBasedVideoStyles.js +212 -0
- package/dist/screenplay/RemotionRenderer/helpers/faceCenteredVideoTransforms.js +468 -0
- package/dist/screenplay/RemotionRenderer/helpers/getContrastColor.js +15 -0
- package/dist/screenplay/RemotionRenderer/helpers/getVideoOrientation.js +21 -0
- package/dist/screenplay/RemotionRenderer/helpers/hexToRgb.js +48 -0
- package/dist/screenplay/RemotionRenderer/hooks/useLottieReplaceColor.js +45 -0
- package/dist/screenplay/RemotionRenderer/hooks/useOrientationBased.js +29 -0
- package/dist/screenplay/RemotionRenderer/hooks/useTimeInterpolate.js +54 -0
- package/dist/screenplay/RemotionRenderer/hooks/useVirtualBackground.js +38 -0
- package/dist/screenplay/RemotionRenderer/index.js +3 -0
- package/dist/screenplay/RemotionRenderer/main/lib/Sequence.js +76 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/DefaultLayout.js +72 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/DynamicTriangleLayout.js +54 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/HandoffLayout.js +50 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/IntroVideoLayout.js +33 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/KeywordLayout.js +36 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/LayoutFactory.js +68 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/MotionStillLayout.js +36 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/SimpleFrameLayout.js +43 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/TextWithVideoLayout.js +52 -0
- package/dist/screenplay/RemotionRenderer/main/screenplaySchema.js +92 -0
- package/dist/screenplay/RemotionRenderer/registeredComponents.js +91 -0
- package/dist/screenplay/RemotionRenderer/theme/config.js +8 -0
- package/dist/screenplay/RemotionRenderer/theme/hooks/useTheme.js +24 -0
- package/dist/screenplay/RemotionRenderer/theme/hooks/useThemedComponents.js +101 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldNameTag.js +147 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldSentence.js +138 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldTitle.js +136 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColor.js +67 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorInverse.js +67 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorShadow.js +66 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionElegant.js +134 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionEmphasis.js +122 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionPunctuated.js +84 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBoom.js +88 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBubble.js +91 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordPopup.js +118 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/DefaultCaption.js +62 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag/handoffNametagConfig.js +59 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag.js +173 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Nametag.js +129 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/AnimatedSentence.js +20 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/AnimatedSentenceDefault.js +29 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/SentenceSimple.helpers.js +61 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence.js +86 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Title.js +112 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/constants.js +1 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Nametag.js +134 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Sentence.js +49 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Title.js +108 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/animations.js +30 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/config.js +9 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchNametag.js +252 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchSentence.js +156 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchTitle.js +142 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/DisplacedText.js +66 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/GlitchAnimatedLine.js +38 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/SplitSentence.js +80 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/helpers.js +32 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/none/Nametag.js +3 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/none/Title.js +3 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullNametag.js +165 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullSentence.js +94 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullTitle.js +98 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/designs/sentence.js +92 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/designs/title.js +119 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/Nametag.js +122 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsCaption.js +93 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsSentence.js +76 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/Title.js +90 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/shared.js +62 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Nametag.js +145 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/SportsBounceSentence.js +148 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Title.js +160 -0
- package/dist/screenplay/RemotionRenderer/tracks/AudioTrack.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/CaptionsVideoTrack.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/DynamicVideoComposition.js +31 -0
- package/dist/screenplay/RemotionRenderer/tracks/EffectsVideoTrack.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +141 -0
- package/dist/screenplay/RemotionRenderer/tracks/Soundtrack.js +16 -0
- package/dist/screenplay/RemotionRenderer/tracks/Watermark.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/transitions/GlitchOne.js +92 -0
- package/package.json +45 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
2
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
3
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
|
+
import { interpolate, useCurrentFrame, useVideoConfig } from "remotion";
|
|
5
|
+
export var DEFAULT_TIME_INTERPOLATE_OPTIONS = {
|
|
6
|
+
extrapolateRight: "clamp",
|
|
7
|
+
extrapolateLeft: "clamp"
|
|
8
|
+
};
|
|
9
|
+
export var calculateInputRangeInPhases = function calculateInputRangeInPhases(phaseDurations, delayInSeconds) {
|
|
10
|
+
var inputRange = [];
|
|
11
|
+
var cumulativeSum = 0 + delayInSeconds;
|
|
12
|
+
var _iterator = _createForOfIteratorHelper(phaseDurations),
|
|
13
|
+
_step;
|
|
14
|
+
try {
|
|
15
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
16
|
+
var duration = _step.value;
|
|
17
|
+
inputRange.push(cumulativeSum);
|
|
18
|
+
cumulativeSum += duration;
|
|
19
|
+
}
|
|
20
|
+
} catch (err) {
|
|
21
|
+
_iterator.e(err);
|
|
22
|
+
} finally {
|
|
23
|
+
_iterator.f();
|
|
24
|
+
}
|
|
25
|
+
inputRange.push(cumulativeSum); // Add the final cumulative value
|
|
26
|
+
return inputRange;
|
|
27
|
+
};
|
|
28
|
+
export var useTimeInterpolate = function useTimeInterpolate() {
|
|
29
|
+
var inputRangeInSeconds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 1];
|
|
30
|
+
var
|
|
31
|
+
// interpolate from zeroth second to the first second
|
|
32
|
+
outputRange = arguments.length > 1 ? arguments[1] : undefined;
|
|
33
|
+
var options = arguments.length > 2 ? arguments[2] : undefined;
|
|
34
|
+
var frame = useCurrentFrame();
|
|
35
|
+
var _useVideoConfig = useVideoConfig(),
|
|
36
|
+
fps = _useVideoConfig.fps;
|
|
37
|
+
var inputRangeAdjusted = inputRangeInSeconds.map(function (num) {
|
|
38
|
+
return num * fps;
|
|
39
|
+
});
|
|
40
|
+
return interpolate(frame, inputRangeAdjusted, outputRange, options);
|
|
41
|
+
};
|
|
42
|
+
export var timeInterpolate = function timeInterpolate() {
|
|
43
|
+
var inputRangeInSeconds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 1];
|
|
44
|
+
var
|
|
45
|
+
// interpolate from zeroth second to the first second
|
|
46
|
+
outputRange = arguments.length > 1 ? arguments[1] : undefined;
|
|
47
|
+
var options = arguments.length > 2 ? arguments[2] : undefined;
|
|
48
|
+
var fps = arguments.length > 3 ? arguments[3] : undefined;
|
|
49
|
+
var frame = arguments.length > 4 ? arguments[4] : undefined;
|
|
50
|
+
var inputRangeAdjusted = inputRangeInSeconds.map(function (num) {
|
|
51
|
+
return num * fps;
|
|
52
|
+
});
|
|
53
|
+
return interpolate(frame, inputRangeAdjusted, outputRange, options);
|
|
54
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useVideoConfig } from "remotion";
|
|
2
|
+
import { useOrientationBased } from "./useOrientationBased";
|
|
3
|
+
|
|
4
|
+
// Returns orientation-aware virtual background info from screenplay input
|
|
5
|
+
export var useVirtualBackground = function useVirtualBackground() {
|
|
6
|
+
var _window, _window$screenplayPro;
|
|
7
|
+
var _useVideoConfig = useVideoConfig(),
|
|
8
|
+
_useVideoConfig$props = _useVideoConfig.props,
|
|
9
|
+
_useVideoConfig$props2 = _useVideoConfig$props === void 0 ? {} : _useVideoConfig$props,
|
|
10
|
+
_useVideoConfig$props3 = _useVideoConfig$props2.input,
|
|
11
|
+
input = _useVideoConfig$props3 === void 0 ? ((_window = window) === null || _window === void 0 ? void 0 : (_window$screenplayPro = _window.screenplayProps) === null || _window$screenplayPro === void 0 ? void 0 : _window$screenplayPro.input) || {} : _useVideoConfig$props3;
|
|
12
|
+
var _ref = input || {},
|
|
13
|
+
userBackgroundType = _ref.userBackgroundType,
|
|
14
|
+
dynamicBackgroundLandscape = _ref.dynamicBackgroundLandscape,
|
|
15
|
+
dynamicBackgroundPortrait = _ref.dynamicBackgroundPortrait,
|
|
16
|
+
dynamicBackgroundSquare = _ref.dynamicBackgroundSquare;
|
|
17
|
+
|
|
18
|
+
// Pick the correct URL for the current output orientation
|
|
19
|
+
var perOrientation = useOrientationBased({
|
|
20
|
+
landscape: {
|
|
21
|
+
url: dynamicBackgroundLandscape
|
|
22
|
+
},
|
|
23
|
+
portrait: {
|
|
24
|
+
url: dynamicBackgroundPortrait
|
|
25
|
+
},
|
|
26
|
+
square: {
|
|
27
|
+
url: dynamicBackgroundSquare
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var url = perOrientation === null || perOrientation === void 0 ? void 0 : perOrientation.url;
|
|
31
|
+
var orientation = perOrientation === null || perOrientation === void 0 ? void 0 : perOrientation.orientation;
|
|
32
|
+
var isVirtual = userBackgroundType === "virtual" && typeof url === "string" && url.length > 0;
|
|
33
|
+
return {
|
|
34
|
+
isVirtual: isVirtual,
|
|
35
|
+
url: url,
|
|
36
|
+
orientation: orientation
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
5
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
6
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
7
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
|
+
export var toPascalCase = function toPascalCase(snakeCaseStr) {
|
|
11
|
+
return snakeCaseStr.split("_") // Split the string by underscores
|
|
12
|
+
.map(function (word) {
|
|
13
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
14
|
+
}) // Capitalize the first letter of each word
|
|
15
|
+
.join(""); // Join the words back together without separators
|
|
16
|
+
};
|
|
17
|
+
export var toFrames = function toFrames(number) {
|
|
18
|
+
var useEven = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
19
|
+
var allowZero = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
20
|
+
if (typeof number === "number" && Number.isFinite(number)) {
|
|
21
|
+
var minimumFrame = allowZero ? 0 : 1;
|
|
22
|
+
var rounded = Math.round(number);
|
|
23
|
+
var frames = Math.max(minimumFrame, rounded);
|
|
24
|
+
if (!useEven) {
|
|
25
|
+
return frames;
|
|
26
|
+
}
|
|
27
|
+
var minEven = minimumFrame % 2 === 0 ? minimumFrame : minimumFrame + 1;
|
|
28
|
+
if (frames % 2 === 0) {
|
|
29
|
+
return Math.max(minEven, frames);
|
|
30
|
+
}
|
|
31
|
+
var lowerEven = frames - 1;
|
|
32
|
+
if (lowerEven >= minEven) {
|
|
33
|
+
// Prefer not to overshoot the requested timestamp when we can stay within bounds.
|
|
34
|
+
return lowerEven;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Fall back to the next admissible even value (may overshoot by a frame near the start).
|
|
38
|
+
var higherEven = frames + 1;
|
|
39
|
+
return Math.max(minEven, higherEven);
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
};
|
|
43
|
+
export var Sequence = /*#__PURE__*/function () {
|
|
44
|
+
function Sequence(props) {
|
|
45
|
+
_classCallCheck(this, Sequence);
|
|
46
|
+
_defineProperty(this, "fps", 30);
|
|
47
|
+
_defineProperty(this, "component", void 0);
|
|
48
|
+
_defineProperty(this, "config", {});
|
|
49
|
+
// props shared across layouts
|
|
50
|
+
_defineProperty(this, "props", {});
|
|
51
|
+
// specific layout props
|
|
52
|
+
_defineProperty(this, "from", void 0);
|
|
53
|
+
_defineProperty(this, "durationInFrames", void 0);
|
|
54
|
+
_defineProperty(this, "to", void 0);
|
|
55
|
+
var duration = props.data.duration;
|
|
56
|
+
var trimLeft = props.data.trimLeft || 0;
|
|
57
|
+
var trimRight = props.data.trimRight || 0;
|
|
58
|
+
var netDuration = duration - trimLeft - trimRight;
|
|
59
|
+
this.from = this.fps * props.data.offset || 0;
|
|
60
|
+
this.durationInFrames = toFrames(this.fps * netDuration);
|
|
61
|
+
this.to = this.from + this.durationInFrames;
|
|
62
|
+
this.component = toPascalCase(props.type);
|
|
63
|
+
}
|
|
64
|
+
return _createClass(Sequence, [{
|
|
65
|
+
key: "flatten",
|
|
66
|
+
value: function flatten() {
|
|
67
|
+
return _objectSpread(_objectSpread({
|
|
68
|
+
fps: this.fps,
|
|
69
|
+
from: this.from,
|
|
70
|
+
to: this.to,
|
|
71
|
+
durationInFrames: this.durationInFrames,
|
|
72
|
+
component: this.component
|
|
73
|
+
}, this.config), this.props);
|
|
74
|
+
}
|
|
75
|
+
}]);
|
|
76
|
+
}();
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
9
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
10
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
15
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
16
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
18
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
19
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
20
|
+
import { Sequence, toFrames } from "../Sequence.js";
|
|
21
|
+
import { getVideoOrientation } from "../../../helpers/getVideoOrientation.js";
|
|
22
|
+
import { cleanFacemetadata } from "../../../helpers/cleanFacemetadata";
|
|
23
|
+
export var Layout = /*#__PURE__*/function (_Sequence) {
|
|
24
|
+
function Layout(props) {
|
|
25
|
+
var _this;
|
|
26
|
+
_classCallCheck(this, Layout);
|
|
27
|
+
_this = _callSuper(this, Layout, [props]);
|
|
28
|
+
_this.getLayoutProps(props);
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
_inherits(Layout, _Sequence);
|
|
32
|
+
return _createClass(Layout, [{
|
|
33
|
+
key: "getLayoutProps",
|
|
34
|
+
value: function getLayoutProps(props) {
|
|
35
|
+
var _props$data, _props$data2, _props$data$sourceVid, _props$data3, _props$data$noBackgro, _props$data$noBackgro2;
|
|
36
|
+
var sourceVideoOrientation = getVideoOrientation(props.data.sourceVideo.aspectRatio);
|
|
37
|
+
var trimLeft = ((_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.trimLeft) || 0;
|
|
38
|
+
var trimRight = ((_props$data2 = props.data) === null || _props$data2 === void 0 ? void 0 : _props$data2.trimRight) || 0;
|
|
39
|
+
|
|
40
|
+
// Coerce effect toggles to strict booleans (handles strings like "true")
|
|
41
|
+
var coerceBool = function coerceBool(val) {
|
|
42
|
+
return val === true || val === "true" || val === 1 || val === "1";
|
|
43
|
+
};
|
|
44
|
+
var coerceEffects = function coerceEffects(effects) {
|
|
45
|
+
if (!effects) return effects;
|
|
46
|
+
return Object.entries(effects).reduce(function (acc, _ref) {
|
|
47
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
48
|
+
key = _ref2[0],
|
|
49
|
+
value = _ref2[1];
|
|
50
|
+
acc[key] = coerceBool(value);
|
|
51
|
+
return acc;
|
|
52
|
+
}, {});
|
|
53
|
+
};
|
|
54
|
+
this.config = {
|
|
55
|
+
theme: props.theme,
|
|
56
|
+
frameColor: props.data.frameColor,
|
|
57
|
+
logoUrl: props.data.logoUrl,
|
|
58
|
+
videoUrl: props.data.sourceVideo.videoUrl,
|
|
59
|
+
videoZoom: props.data.sourceVideo.zoom,
|
|
60
|
+
sourceVideoOrientation: sourceVideoOrientation,
|
|
61
|
+
startVideoFrom: toFrames(this.fps * (((_props$data$sourceVid = props.data.sourceVideo) === null || _props$data$sourceVid === void 0 ? void 0 : _props$data$sourceVid.start) + trimLeft), true) || 0,
|
|
62
|
+
disableTransitionSounds: (_props$data3 = props.data) === null || _props$data3 === void 0 ? void 0 : _props$data3.disableTransitionSounds,
|
|
63
|
+
trimLeft: trimLeft,
|
|
64
|
+
trimRight: trimRight,
|
|
65
|
+
words: props.data.words,
|
|
66
|
+
noBackgroundVideoUrl: (_props$data$noBackgro = props.data.noBackgroundVideo) === null || _props$data$noBackgro === void 0 ? void 0 : _props$data$noBackgro.videoUrl,
|
|
67
|
+
noBackgroundVideoEffects: coerceEffects(props.data.noBackgroundVideoEffects),
|
|
68
|
+
faceMetadata: cleanFacemetadata((_props$data$noBackgro2 = props.data.noBackgroundVideo) === null || _props$data$noBackgro2 === void 0 ? void 0 : _props$data$noBackgro2.faceMetadata)
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}]);
|
|
72
|
+
}(Sequence);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
9
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
13
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
14
|
+
import { Layout } from "./DefaultLayout.js";
|
|
15
|
+
export var DynamicTriangleLayout = /*#__PURE__*/function (_Layout) {
|
|
16
|
+
function DynamicTriangleLayout(props) {
|
|
17
|
+
var _this;
|
|
18
|
+
_classCallCheck(this, DynamicTriangleLayout);
|
|
19
|
+
_this = _callSuper(this, DynamicTriangleLayout, [props]);
|
|
20
|
+
_this.getVideoProps(props);
|
|
21
|
+
return _this;
|
|
22
|
+
}
|
|
23
|
+
_inherits(DynamicTriangleLayout, _Layout);
|
|
24
|
+
return _createClass(DynamicTriangleLayout, [{
|
|
25
|
+
key: "getVideoProps",
|
|
26
|
+
value: function getVideoProps(props) {
|
|
27
|
+
var _props$data$sourceVid, _props$data$sourceVid2, _props$data, _props$data2, _props$data3, _props$data4, _props$data5, _props$data6, _props$data7, _props$data8, _props$data9, _props$data10, _props$data11, _props$data12, _props$data13;
|
|
28
|
+
this.props = {
|
|
29
|
+
videoUrl: (_props$data$sourceVid = props.data.sourceVideo) === null || _props$data$sourceVid === void 0 ? void 0 : _props$data$sourceVid.videoUrl,
|
|
30
|
+
videoZoom: ((_props$data$sourceVid2 = props.data.sourceVideo) === null || _props$data$sourceVid2 === void 0 ? void 0 : _props$data$sourceVid2.zoom) || 1,
|
|
31
|
+
disableTransitionSounds: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.disableTransitionSounds,
|
|
32
|
+
triangleSize: ((_props$data2 = props.data) === null || _props$data2 === void 0 ? void 0 : _props$data2.triangleSize) || 600,
|
|
33
|
+
triangleColor: ((_props$data3 = props.data) === null || _props$data3 === void 0 ? void 0 : _props$data3.triangleColor) || "#00FF7F",
|
|
34
|
+
triangleBorderWidth: ((_props$data4 = props.data) === null || _props$data4 === void 0 ? void 0 : _props$data4.triangleBorderWidth) || 20,
|
|
35
|
+
borderRadius: ((_props$data5 = props.data) === null || _props$data5 === void 0 ? void 0 : _props$data5.borderRadius) || 80,
|
|
36
|
+
// radius for rounded corners (default for super rounded)
|
|
37
|
+
rotationSpeed: ((_props$data6 = props.data) === null || _props$data6 === void 0 ? void 0 : _props$data6.rotationSpeed) || 30,
|
|
38
|
+
// degrees per second
|
|
39
|
+
horizontalMovement: ((_props$data7 = props.data) === null || _props$data7 === void 0 ? void 0 : _props$data7.horizontalMovement) || 0,
|
|
40
|
+
// pixels per second
|
|
41
|
+
verticalMovement: ((_props$data8 = props.data) === null || _props$data8 === void 0 ? void 0 : _props$data8.verticalMovement) || 0,
|
|
42
|
+
// pixels per second
|
|
43
|
+
maskStartScale: ((_props$data9 = props.data) === null || _props$data9 === void 0 ? void 0 : _props$data9.maskStartScale) !== undefined ? props.data.maskStartScale : 10,
|
|
44
|
+
// Default to large scale (full screen)
|
|
45
|
+
maskEndScale: ((_props$data10 = props.data) === null || _props$data10 === void 0 ? void 0 : _props$data10.maskEndScale) !== undefined ? props.data.maskEndScale : 1,
|
|
46
|
+
// Shrink to normal size
|
|
47
|
+
maskAnimationDuration: ((_props$data11 = props.data) === null || _props$data11 === void 0 ? void 0 : _props$data11.maskAnimationDuration) || 2,
|
|
48
|
+
// Duration in seconds for mask animation
|
|
49
|
+
sentenceText: (_props$data12 = props.data) === null || _props$data12 === void 0 ? void 0 : _props$data12.sentenceText,
|
|
50
|
+
text: (_props$data13 = props.data) === null || _props$data13 === void 0 ? void 0 : _props$data13.text
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}]);
|
|
54
|
+
}(Layout);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
9
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
13
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
14
|
+
import { Layout } from "./DefaultLayout.js";
|
|
15
|
+
import { toFrames } from "../Sequence.js";
|
|
16
|
+
import { getVideoOrientation } from "../../../helpers/getVideoOrientation.js";
|
|
17
|
+
import { cleanFacemetadata } from "../../../helpers/cleanFacemetadata";
|
|
18
|
+
export var HandoffLayout = /*#__PURE__*/function (_Layout) {
|
|
19
|
+
function HandoffLayout(props) {
|
|
20
|
+
var _this;
|
|
21
|
+
_classCallCheck(this, HandoffLayout);
|
|
22
|
+
_this = _callSuper(this, HandoffLayout, [props]);
|
|
23
|
+
_this.getVideoProps(props);
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
_inherits(HandoffLayout, _Layout);
|
|
27
|
+
return _createClass(HandoffLayout, [{
|
|
28
|
+
key: "getVideoProps",
|
|
29
|
+
value: function getVideoProps(props) {
|
|
30
|
+
var _props$data$sourceVid, _props$data, _props$data2, _props$data3, _props$data4, _props$data5, _props$data6, _props$data6$firstNoB, _props$data7, _props$data7$firstNoB, _props$data8, _props$data9, _props$data10, _props$data11, _props$data11$secondN, _props$data12, _props$data12$secondN, _props$data$sourceVid2, _props$data$sourceVid3;
|
|
31
|
+
var sourceVideoOrientation = getVideoOrientation((_props$data$sourceVid = props.data.sourceVideo) === null || _props$data$sourceVid === void 0 ? void 0 : _props$data$sourceVid.aspectRatio);
|
|
32
|
+
this.props = {
|
|
33
|
+
startFirstVideoFrom: toFrames(this.fps * (((_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.startFirstVideoFrom) + (((_props$data2 = props.data) === null || _props$data2 === void 0 ? void 0 : _props$data2.trimLeft) || 0)), true) || 0,
|
|
34
|
+
firstVideoFile: (_props$data3 = props.data) === null || _props$data3 === void 0 ? void 0 : _props$data3.firstVideoFile,
|
|
35
|
+
firstVideoDuration: ((_props$data4 = props.data) === null || _props$data4 === void 0 ? void 0 : _props$data4.firstVideoDuration) - (((_props$data5 = props.data) === null || _props$data5 === void 0 ? void 0 : _props$data5.trimLeft) || 0),
|
|
36
|
+
firstNoBackgroundVideoUrl: (_props$data6 = props.data) === null || _props$data6 === void 0 ? void 0 : (_props$data6$firstNoB = _props$data6.firstNoBackgroundVideo) === null || _props$data6$firstNoB === void 0 ? void 0 : _props$data6$firstNoB.videoUrl,
|
|
37
|
+
firstNoBackgroundFaceMetadata: cleanFacemetadata((_props$data7 = props.data) === null || _props$data7 === void 0 ? void 0 : (_props$data7$firstNoB = _props$data7.firstNoBackgroundVideo) === null || _props$data7$firstNoB === void 0 ? void 0 : _props$data7$firstNoB.faceMetadata),
|
|
38
|
+
startSecondVideoFrom: toFrames(this.fps * ((_props$data8 = props.data) === null || _props$data8 === void 0 ? void 0 : _props$data8.startSecondVideoFrom), true) || 0,
|
|
39
|
+
firstVideoDurationWithoutLastSegment: (_props$data9 = props.data) === null || _props$data9 === void 0 ? void 0 : _props$data9.firstVideoDurationWithoutLastSegment,
|
|
40
|
+
secondVideoFile: (_props$data10 = props.data) === null || _props$data10 === void 0 ? void 0 : _props$data10.secondVideoFile,
|
|
41
|
+
secondNoBackgroundVideoUrl: (_props$data11 = props.data) === null || _props$data11 === void 0 ? void 0 : (_props$data11$secondN = _props$data11.secondNoBackgroundVideo) === null || _props$data11$secondN === void 0 ? void 0 : _props$data11$secondN.videoUrl,
|
|
42
|
+
secondNoBackgroundFaceMetadata: cleanFacemetadata((_props$data12 = props.data) === null || _props$data12 === void 0 ? void 0 : (_props$data12$secondN = _props$data12.secondNoBackgroundVideo) === null || _props$data12$secondN === void 0 ? void 0 : _props$data12$secondN.faceMetadata),
|
|
43
|
+
videoUrl: (_props$data$sourceVid2 = props.data.sourceVideo) === null || _props$data$sourceVid2 === void 0 ? void 0 : _props$data$sourceVid2.videoUrl,
|
|
44
|
+
sourceVideoOrientation: sourceVideoOrientation,
|
|
45
|
+
videoZoom: ((_props$data$sourceVid3 = props.data.sourceVideo) === null || _props$data$sourceVid3 === void 0 ? void 0 : _props$data$sourceVid3.zoom) || 1,
|
|
46
|
+
text: props.data.text
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}]);
|
|
50
|
+
}(Layout);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
9
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
13
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
14
|
+
import { Layout } from "./DefaultLayout.js";
|
|
15
|
+
export var IntroVideoLayout = /*#__PURE__*/function (_Layout) {
|
|
16
|
+
function IntroVideoLayout(props) {
|
|
17
|
+
var _this;
|
|
18
|
+
_classCallCheck(this, IntroVideoLayout);
|
|
19
|
+
_this = _callSuper(this, IntroVideoLayout, [props]);
|
|
20
|
+
_this.getVideoProps(props);
|
|
21
|
+
return _this;
|
|
22
|
+
}
|
|
23
|
+
_inherits(IntroVideoLayout, _Layout);
|
|
24
|
+
return _createClass(IntroVideoLayout, [{
|
|
25
|
+
key: "getVideoProps",
|
|
26
|
+
value: function getVideoProps(props) {
|
|
27
|
+
this.props = {
|
|
28
|
+
sentenceText: props.data.sentenceText,
|
|
29
|
+
sentenceTextTwo: props.data.sentenceTextTwo
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}]);
|
|
33
|
+
}(Layout);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
9
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
13
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
14
|
+
import { Layout } from "./DefaultLayout.js";
|
|
15
|
+
export var KeywordLayout = /*#__PURE__*/function (_Layout) {
|
|
16
|
+
function KeywordLayout(props) {
|
|
17
|
+
var _this;
|
|
18
|
+
_classCallCheck(this, KeywordLayout);
|
|
19
|
+
_this = _callSuper(this, KeywordLayout, [props]);
|
|
20
|
+
_this.getVideoProps(props);
|
|
21
|
+
return _this;
|
|
22
|
+
}
|
|
23
|
+
_inherits(KeywordLayout, _Layout);
|
|
24
|
+
return _createClass(KeywordLayout, [{
|
|
25
|
+
key: "getVideoProps",
|
|
26
|
+
value: function getVideoProps(props) {
|
|
27
|
+
var _props$data$sourceVid, _props$data$sourceVid2, _props$data;
|
|
28
|
+
this.props = {
|
|
29
|
+
videoUrl: (_props$data$sourceVid = props.data.sourceVideo) === null || _props$data$sourceVid === void 0 ? void 0 : _props$data$sourceVid.videoUrl,
|
|
30
|
+
videoZoom: ((_props$data$sourceVid2 = props.data.sourceVideo) === null || _props$data$sourceVid2 === void 0 ? void 0 : _props$data$sourceVid2.zoom) || 1,
|
|
31
|
+
disableTransitionSounds: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.disableTransitionSounds,
|
|
32
|
+
words: props.data.words
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}]);
|
|
36
|
+
}(Layout);
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { SimpleFrameLayout } from "./SimpleFrameLayout.js";
|
|
8
|
+
import { Layout } from "./DefaultLayout.js";
|
|
9
|
+
import { TextWithVideoLayout } from "./TextWithVideoLayout.js";
|
|
10
|
+
import { HandoffLayout } from "./HandoffLayout.js";
|
|
11
|
+
import { MotionStillLayout } from "./MotionStillLayout.js";
|
|
12
|
+
import { KeywordLayout } from "./KeywordLayout.js";
|
|
13
|
+
import { IntroVideoLayout } from "./IntroVideoLayout";
|
|
14
|
+
import { DynamicTriangleLayout } from "./DynamicTriangleLayout.js";
|
|
15
|
+
export var LayoutFactory = /*#__PURE__*/function () {
|
|
16
|
+
function LayoutFactory() {
|
|
17
|
+
_classCallCheck(this, LayoutFactory);
|
|
18
|
+
}
|
|
19
|
+
return _createClass(LayoutFactory, null, [{
|
|
20
|
+
key: "createObject",
|
|
21
|
+
value: function createObject(props) {
|
|
22
|
+
switch (props.type) {
|
|
23
|
+
case "text_with_video":
|
|
24
|
+
{
|
|
25
|
+
return new TextWithVideoLayout(props).flatten();
|
|
26
|
+
}
|
|
27
|
+
case "broll_background":
|
|
28
|
+
case "simple_frame_broll":
|
|
29
|
+
case "simple_frame_sentence":
|
|
30
|
+
case "broll_split_screen":
|
|
31
|
+
case "broll_green_screen":
|
|
32
|
+
case "broll_studio_backdrop":
|
|
33
|
+
case "key_point_overlay_depth":
|
|
34
|
+
case "simple_frame":
|
|
35
|
+
{
|
|
36
|
+
return new SimpleFrameLayout(props).flatten();
|
|
37
|
+
}
|
|
38
|
+
case "handoff":
|
|
39
|
+
{
|
|
40
|
+
return new HandoffLayout(props).flatten();
|
|
41
|
+
}
|
|
42
|
+
case "motion_still":
|
|
43
|
+
case "motion_still_green_screen":
|
|
44
|
+
case "motion_still_full_screen":
|
|
45
|
+
case "motion_still_studio_backdrop":
|
|
46
|
+
{
|
|
47
|
+
return new MotionStillLayout(props).flatten();
|
|
48
|
+
}
|
|
49
|
+
case "keyword":
|
|
50
|
+
{
|
|
51
|
+
return new KeywordLayout(props).flatten();
|
|
52
|
+
}
|
|
53
|
+
case "intro_video":
|
|
54
|
+
{
|
|
55
|
+
return new IntroVideoLayout(props).flatten();
|
|
56
|
+
}
|
|
57
|
+
case "dynamic_triangle":
|
|
58
|
+
{
|
|
59
|
+
return new DynamicTriangleLayout(props).flatten();
|
|
60
|
+
}
|
|
61
|
+
default:
|
|
62
|
+
{
|
|
63
|
+
return new Layout(props).flatten();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}]);
|
|
68
|
+
}();
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
9
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
13
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
14
|
+
import { Layout } from "./DefaultLayout.js";
|
|
15
|
+
export var MotionStillLayout = /*#__PURE__*/function (_Layout) {
|
|
16
|
+
function MotionStillLayout(props) {
|
|
17
|
+
var _this;
|
|
18
|
+
_classCallCheck(this, MotionStillLayout);
|
|
19
|
+
_this = _callSuper(this, MotionStillLayout, [props]);
|
|
20
|
+
_this.getVideoProps(props);
|
|
21
|
+
return _this;
|
|
22
|
+
}
|
|
23
|
+
_inherits(MotionStillLayout, _Layout);
|
|
24
|
+
return _createClass(MotionStillLayout, [{
|
|
25
|
+
key: "getVideoProps",
|
|
26
|
+
value: function getVideoProps(props) {
|
|
27
|
+
var _props$data$sourceVid, _props$data$sourceVid2, _props$data;
|
|
28
|
+
this.props = {
|
|
29
|
+
videoUrl: (_props$data$sourceVid = props.data.sourceVideo) === null || _props$data$sourceVid === void 0 ? void 0 : _props$data$sourceVid.videoUrl,
|
|
30
|
+
imageUrl: props.data.imageUrl,
|
|
31
|
+
videoZoom: ((_props$data$sourceVid2 = props.data.sourceVideo) === null || _props$data$sourceVid2 === void 0 ? void 0 : _props$data$sourceVid2.zoom) || 1,
|
|
32
|
+
disableTransitionSounds: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.disableTransitionSounds
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}]);
|
|
36
|
+
}(Layout);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
9
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
13
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
14
|
+
import { Layout } from "./DefaultLayout.js";
|
|
15
|
+
import { cleanFacemetadata } from "../../../helpers/cleanFacemetadata";
|
|
16
|
+
import { SimpleFrameSentence } from "../../../components/layouts/SimpleFrameSentence";
|
|
17
|
+
export var SimpleFrameLayout = /*#__PURE__*/function (_Layout) {
|
|
18
|
+
function SimpleFrameLayout(props) {
|
|
19
|
+
var _this;
|
|
20
|
+
_classCallCheck(this, SimpleFrameLayout);
|
|
21
|
+
_this = _callSuper(this, SimpleFrameLayout, [props]);
|
|
22
|
+
_this.getVideoProps(props);
|
|
23
|
+
return _this;
|
|
24
|
+
}
|
|
25
|
+
_inherits(SimpleFrameLayout, _Layout);
|
|
26
|
+
return _createClass(SimpleFrameLayout, [{
|
|
27
|
+
key: "getVideoProps",
|
|
28
|
+
value: function getVideoProps(props) {
|
|
29
|
+
var _props$data$noBackgro, _props$data$noBackgro2, _props$data$sourceVid, _props$data$sourceVid2, _props$data, _props$data2, _props$data3;
|
|
30
|
+
this.props = {
|
|
31
|
+
noBackgroundVideoEffects: props.data.noBackgroundVideoEffects,
|
|
32
|
+
noBackgroundVideoUrl: (_props$data$noBackgro = props.data.noBackgroundVideo) === null || _props$data$noBackgro === void 0 ? void 0 : _props$data$noBackgro.videoUrl,
|
|
33
|
+
faceMetadata: cleanFacemetadata((_props$data$noBackgro2 = props.data.noBackgroundVideo) === null || _props$data$noBackgro2 === void 0 ? void 0 : _props$data$noBackgro2.faceMetadata),
|
|
34
|
+
videoUrl: (_props$data$sourceVid = props.data.sourceVideo) === null || _props$data$sourceVid === void 0 ? void 0 : _props$data$sourceVid.videoUrl,
|
|
35
|
+
videoZoom: ((_props$data$sourceVid2 = props.data.sourceVideo) === null || _props$data$sourceVid2 === void 0 ? void 0 : _props$data$sourceVid2.zoom) || 1,
|
|
36
|
+
disableTransitionSounds: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.disableTransitionSounds,
|
|
37
|
+
brollUrl: (_props$data2 = props.data) === null || _props$data2 === void 0 ? void 0 : _props$data2.brollUrl,
|
|
38
|
+
sentenceText: (_props$data3 = props.data) === null || _props$data3 === void 0 ? void 0 : _props$data3.sentenceText,
|
|
39
|
+
theme: props === null || props === void 0 ? void 0 : props.theme
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}]);
|
|
43
|
+
}(Layout);
|