@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
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @license React
|
|
21
|
+
* react.production.min.js
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the MIT license found in the
|
|
26
|
+
* LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/** @license React v0.19.1
|
|
30
|
+
* scheduler.production.min.js
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the MIT license found in the
|
|
35
|
+
* LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/** @license React v16.14.0
|
|
39
|
+
* react-dom.production.min.js
|
|
40
|
+
*
|
|
41
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the MIT license found in the
|
|
44
|
+
* LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/** @license React v16.14.0
|
|
48
|
+
* react.production.min.js
|
|
49
|
+
*
|
|
50
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the MIT license found in the
|
|
53
|
+
* LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
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 _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
6
|
+
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); } }
|
|
7
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
+
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); }
|
|
11
|
+
import { screenplaySchema } from "./main/screenplaySchema.js";
|
|
12
|
+
import { LayoutFactory } from "./main/lib/layouts/LayoutFactory.js";
|
|
13
|
+
import { toFrames, toPascalCase } from "./main/lib/Sequence.js";
|
|
14
|
+
import { transitionThemes } from "./config.js";
|
|
15
|
+
export var RemotionRenderer = /*#__PURE__*/function () {
|
|
16
|
+
function RemotionRenderer(screenplay) {
|
|
17
|
+
_classCallCheck(this, RemotionRenderer);
|
|
18
|
+
_defineProperty(this, "screenplay", void 0);
|
|
19
|
+
_defineProperty(this, "fps", 30);
|
|
20
|
+
_defineProperty(this, "mainVideoTrack", {});
|
|
21
|
+
_defineProperty(this, "layoutVideoTrack", []);
|
|
22
|
+
_defineProperty(this, "effectsVideoTrack", []);
|
|
23
|
+
_defineProperty(this, "captionsVideoTrack", []);
|
|
24
|
+
_defineProperty(this, "audioTrack", []);
|
|
25
|
+
_defineProperty(this, "output", void 0);
|
|
26
|
+
this.screenplay = screenplay;
|
|
27
|
+
this.output = this.getRemotionOutputSettings();
|
|
28
|
+
}
|
|
29
|
+
return _createClass(RemotionRenderer, [{
|
|
30
|
+
key: "validate",
|
|
31
|
+
value: function validate() {
|
|
32
|
+
try {
|
|
33
|
+
screenplaySchema.parse(this.screenplay);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
console.log({
|
|
36
|
+
error: error
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, {
|
|
41
|
+
key: "getRemotionOutputSettings",
|
|
42
|
+
value: function getRemotionOutputSettings() {
|
|
43
|
+
var _this = this;
|
|
44
|
+
var compositionMetadata = {};
|
|
45
|
+
var orientation = this.screenplay.output.orientation;
|
|
46
|
+
var theme = this.screenplay.input.theme || "default";
|
|
47
|
+
switch (orientation) {
|
|
48
|
+
case "landscape":
|
|
49
|
+
{
|
|
50
|
+
compositionMetadata.width = 1920;
|
|
51
|
+
compositionMetadata.height = 1080;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
case "portrait":
|
|
55
|
+
{
|
|
56
|
+
compositionMetadata.width = 1080;
|
|
57
|
+
compositionMetadata.height = 1920;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
case "square":
|
|
61
|
+
{
|
|
62
|
+
compositionMetadata.width = 1080;
|
|
63
|
+
compositionMetadata.height = 1080;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
var segmentTrack = this.getSegmentTrack();
|
|
68
|
+
var segments = segmentTrack.segments;
|
|
69
|
+
compositionMetadata.durationInFrames = segments.reduce(function (durationInFrames, segment, index, array) {
|
|
70
|
+
var segmentDuration = segment.layout.data.duration || 0;
|
|
71
|
+
var trimLeft = segment.layout.data.trimLeft || 0;
|
|
72
|
+
var trimRight = segment.layout.data.trimRight || 0;
|
|
73
|
+
var netDuration = segmentDuration - trimLeft - trimRight;
|
|
74
|
+
var duration = durationInFrames + netDuration * _this.fps;
|
|
75
|
+
var transitionTheme = transitionThemes[theme];
|
|
76
|
+
if (transitionTheme) {
|
|
77
|
+
var isLast = index === array.length - 1;
|
|
78
|
+
return toFrames(duration) - (isLast ? 0 : transitionTheme.durationInFrames);
|
|
79
|
+
}
|
|
80
|
+
return toFrames(duration);
|
|
81
|
+
}, 0);
|
|
82
|
+
compositionMetadata.theme = this.screenplay.input.theme || "default";
|
|
83
|
+
compositionMetadata.fps = this.fps;
|
|
84
|
+
return _objectSpread(_objectSpread({}, this.screenplay.output), compositionMetadata);
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
87
|
+
key: "toRemotionFragment",
|
|
88
|
+
value: function toRemotionFragment(screenPlaySegment, layout) {
|
|
89
|
+
var _screenPlaySegment$da, _toFrames, _screenPlaySegment$da2, _screenPlaySegment$da3;
|
|
90
|
+
var trimLeft = 0;
|
|
91
|
+
if (layout) {
|
|
92
|
+
trimLeft = layout.data.trimLeft || 0;
|
|
93
|
+
}
|
|
94
|
+
var from = this.fps * (screenPlaySegment.data.offset - trimLeft) || 0;
|
|
95
|
+
var durationInFrames = toFrames(this.fps * screenPlaySegment.data.duration);
|
|
96
|
+
var to = from + durationInFrames;
|
|
97
|
+
return _objectSpread(_objectSpread({}, screenPlaySegment.data), {}, {
|
|
98
|
+
component: toPascalCase(screenPlaySegment.type),
|
|
99
|
+
videoUrl: (_screenPlaySegment$da = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$da === void 0 ? void 0 : _screenPlaySegment$da.videoUrl,
|
|
100
|
+
startVideoFrom: (_toFrames = toFrames(this.fps * ((_screenPlaySegment$da2 = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$da2 === void 0 ? void 0 : _screenPlaySegment$da2.start), false, true)) !== null && _toFrames !== void 0 ? _toFrames : 0,
|
|
101
|
+
durationInFrames: durationInFrames,
|
|
102
|
+
from: from,
|
|
103
|
+
to: to,
|
|
104
|
+
videoZoom: (_screenPlaySegment$da3 = screenPlaySegment.data.sourceVideo) === null || _screenPlaySegment$da3 === void 0 ? void 0 : _screenPlaySegment$da3.zoom,
|
|
105
|
+
offset: toFrames(this.fps * (screenPlaySegment.data.offset - trimLeft)) || 0,
|
|
106
|
+
theme: screenPlaySegment.theme,
|
|
107
|
+
themeSettings: screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : screenPlaySegment.themeSettings
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
key: "toRemotionAudioFragment",
|
|
112
|
+
value: function toRemotionAudioFragment(screenPlaySegment) {
|
|
113
|
+
var _screenPlaySegment$da4, _toFrames2, _screenPlaySegment$da5, _screenPlaySegment$da6, _screenPlaySegment$da7, _screenPlaySegment$da8, _screenPlaySegment$da9, _screenPlaySegment$da10;
|
|
114
|
+
var from = this.fps * screenPlaySegment.data.offset || 0;
|
|
115
|
+
var durationInFrames = toFrames(this.fps * screenPlaySegment.data.duration) || undefined;
|
|
116
|
+
var to = from + durationInFrames;
|
|
117
|
+
return _objectSpread(_objectSpread({}, screenPlaySegment.data), {}, {
|
|
118
|
+
component: toPascalCase(screenPlaySegment.type),
|
|
119
|
+
src: (_screenPlaySegment$da4 = screenPlaySegment.data.sourceAudio) === null || _screenPlaySegment$da4 === void 0 ? void 0 : _screenPlaySegment$da4.url,
|
|
120
|
+
startAudioFrom: (_toFrames2 = toFrames(this.fps * ((_screenPlaySegment$da5 = screenPlaySegment.data.sourceAudio) === null || _screenPlaySegment$da5 === void 0 ? void 0 : _screenPlaySegment$da5.start), false, true)) !== null && _toFrames2 !== void 0 ? _toFrames2 : 0,
|
|
121
|
+
durationInFrames: durationInFrames,
|
|
122
|
+
from: from,
|
|
123
|
+
to: to,
|
|
124
|
+
offset: this.fps * screenPlaySegment.data.offset || 0,
|
|
125
|
+
volume: (_screenPlaySegment$da6 = (_screenPlaySegment$da7 = screenPlaySegment.data) === null || _screenPlaySegment$da7 === void 0 ? void 0 : (_screenPlaySegment$da8 = _screenPlaySegment$da7.sourceAudio) === null || _screenPlaySegment$da8 === void 0 ? void 0 : _screenPlaySegment$da8.volume) !== null && _screenPlaySegment$da6 !== void 0 ? _screenPlaySegment$da6 : 1,
|
|
126
|
+
loop: ((_screenPlaySegment$da9 = screenPlaySegment.data) === null || _screenPlaySegment$da9 === void 0 ? void 0 : (_screenPlaySegment$da10 = _screenPlaySegment$da9.sourceAudio) === null || _screenPlaySegment$da10 === void 0 ? void 0 : _screenPlaySegment$da10.loop) || false
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}, {
|
|
130
|
+
key: "toRemotionSegment",
|
|
131
|
+
value: function toRemotionSegment(screenPlaySegment) {
|
|
132
|
+
var _this2 = this;
|
|
133
|
+
var layout = screenPlaySegment.layout,
|
|
134
|
+
effects = screenPlaySegment.effects;
|
|
135
|
+
return {
|
|
136
|
+
layout: LayoutFactory.createObject(layout),
|
|
137
|
+
effects: effects.map(function (effect) {
|
|
138
|
+
if (effect.type.includes("caption")) {
|
|
139
|
+
return _this2.toRemotionCaptionSegment(effect, layout);
|
|
140
|
+
}
|
|
141
|
+
return _this2.toRemotionFragment(effect, layout);
|
|
142
|
+
})
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}, {
|
|
146
|
+
key: "toEffectSegment",
|
|
147
|
+
value: function toEffectSegment(screenPlaySegment) {
|
|
148
|
+
return this.toRemotionFragment(screenPlaySegment);
|
|
149
|
+
}
|
|
150
|
+
}, {
|
|
151
|
+
key: "toRemotionCaptionSegment",
|
|
152
|
+
value: function toRemotionCaptionSegment(screenPlaySegment, screenplayLayout) {
|
|
153
|
+
var _this3 = this;
|
|
154
|
+
var trimLeft = screenplayLayout.data.trimLeft || 0;
|
|
155
|
+
var from = this.fps * (screenPlaySegment.data.offset + trimLeft) || 0;
|
|
156
|
+
var transcripts = screenPlaySegment.data.transcript_text;
|
|
157
|
+
if (!transcripts) {
|
|
158
|
+
throw new Error("No transcript_text provided in transcript segment");
|
|
159
|
+
}
|
|
160
|
+
transcripts = transcripts.map(function (transcript) {
|
|
161
|
+
var transcriptFrom = _this3.fps * (transcript.offset - trimLeft) || 0;
|
|
162
|
+
var transcriptDurationInFrames = toFrames(_this3.fps * transcript.duration);
|
|
163
|
+
return {
|
|
164
|
+
text: transcript.text,
|
|
165
|
+
from: transcriptFrom,
|
|
166
|
+
durationInFrames: transcriptDurationInFrames,
|
|
167
|
+
punctuations: transcript.punctuations ? transcript.punctuations.map(function (p) {
|
|
168
|
+
return _objectSpread(_objectSpread({}, p), {}, {
|
|
169
|
+
start: toFrames(_this3.fps * (p.start - trimLeft)),
|
|
170
|
+
end: toFrames(_this3.fps * (p.end - trimLeft))
|
|
171
|
+
});
|
|
172
|
+
}) : []
|
|
173
|
+
};
|
|
174
|
+
});
|
|
175
|
+
return {
|
|
176
|
+
component: toPascalCase(screenPlaySegment.type),
|
|
177
|
+
durationInFrames: toFrames(this.screenplay.durationInFrames),
|
|
178
|
+
from: from,
|
|
179
|
+
transcripts: transcripts,
|
|
180
|
+
theme: screenPlaySegment.theme,
|
|
181
|
+
color: screenPlaySegment.data.color
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
}, {
|
|
185
|
+
key: "generateMainVideoTrack",
|
|
186
|
+
value: function generateMainVideoTrack() {
|
|
187
|
+
var _screenPlayLayoutTrac;
|
|
188
|
+
var screenPlayLayoutTrack = this.screenplay.tracks.find(function (track) {
|
|
189
|
+
return track.type === "segment";
|
|
190
|
+
});
|
|
191
|
+
if (!screenPlayLayoutTrack) {
|
|
192
|
+
throw new Error("Layout track not found");
|
|
193
|
+
}
|
|
194
|
+
if (!screenPlayLayoutTrack.segments && ((_screenPlayLayoutTrac = screenPlayLayoutTrack.segments) === null || _screenPlayLayoutTrac === void 0 ? void 0 : _screenPlayLayoutTrac.length) === 0) {
|
|
195
|
+
throw new Error("Layout track has no segments specified");
|
|
196
|
+
}
|
|
197
|
+
this.mainVideoTrack = this.toRemotionSegment(screenPlayLayoutTrack.segments[0]);
|
|
198
|
+
}
|
|
199
|
+
}, {
|
|
200
|
+
key: "getSegmentTrack",
|
|
201
|
+
value: function getSegmentTrack() {
|
|
202
|
+
var screenPlayLayoutTrack = this.screenplay.tracks.find(function (track) {
|
|
203
|
+
return track.type === "segment";
|
|
204
|
+
});
|
|
205
|
+
if (!screenPlayLayoutTrack) {
|
|
206
|
+
throw new Error("Layout track not found");
|
|
207
|
+
}
|
|
208
|
+
return screenPlayLayoutTrack;
|
|
209
|
+
}
|
|
210
|
+
}, {
|
|
211
|
+
key: "generateLayoutTrack",
|
|
212
|
+
value: function generateLayoutTrack() {
|
|
213
|
+
var _this4 = this;
|
|
214
|
+
var segmentTrack = this.getSegmentTrack();
|
|
215
|
+
var segments = segmentTrack.segments;
|
|
216
|
+
segments.forEach(function (segment) {
|
|
217
|
+
_this4.layoutVideoTrack.push(_this4.toRemotionSegment(segment));
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}, {
|
|
221
|
+
key: "generateEffectsTrack",
|
|
222
|
+
value: function generateEffectsTrack() {
|
|
223
|
+
var _this5 = this;
|
|
224
|
+
var screenPlayEffectTrack = this.screenplay.tracks.find(function (track) {
|
|
225
|
+
return track.type === "effect";
|
|
226
|
+
});
|
|
227
|
+
if (!screenPlayEffectTrack) {
|
|
228
|
+
throw new Error("Effect track not found");
|
|
229
|
+
}
|
|
230
|
+
var segments = screenPlayEffectTrack.segments;
|
|
231
|
+
segments.forEach(function (segment) {
|
|
232
|
+
_this5.effectsVideoTrack.push(_this5.toEffectSegment(segment));
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}, {
|
|
236
|
+
key: "generateCaptionsTrack",
|
|
237
|
+
value: function generateCaptionsTrack() {
|
|
238
|
+
var _this6 = this;
|
|
239
|
+
var screenPlayCaptionTrack = this.screenplay.tracks.find(function (track) {
|
|
240
|
+
return track.type === "caption";
|
|
241
|
+
});
|
|
242
|
+
if (!screenPlayCaptionTrack) {
|
|
243
|
+
throw new Error("Caption track not found");
|
|
244
|
+
}
|
|
245
|
+
var segments = screenPlayCaptionTrack.segments;
|
|
246
|
+
segments.forEach(function (segment, _ref) {
|
|
247
|
+
_objectDestructuringEmpty(_ref);
|
|
248
|
+
_this6.captionsVideoTrack.push(_this6.toRemotionCaptionSegment(segment));
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}, {
|
|
252
|
+
key: "generateAudioTrack",
|
|
253
|
+
value: function generateAudioTrack() {
|
|
254
|
+
var _this7 = this;
|
|
255
|
+
var screenPlayAudioTrack = this.screenplay.tracks.find(function (track) {
|
|
256
|
+
return track.type === "audio";
|
|
257
|
+
});
|
|
258
|
+
if (!screenPlayAudioTrack) {
|
|
259
|
+
console.log("[ScreenPlay] Audio track not found. Skipping");
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
var segments = screenPlayAudioTrack.segments;
|
|
263
|
+
segments.forEach(function (segment) {
|
|
264
|
+
_this7.audioTrack.push(_this7.toRemotionAudioFragment(segment));
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
}, {
|
|
268
|
+
key: "buildRemotionTimeline",
|
|
269
|
+
value: function buildRemotionTimeline() {
|
|
270
|
+
return {
|
|
271
|
+
input: this.screenplay.input,
|
|
272
|
+
mainVideoTrack: this.mainVideoTrack,
|
|
273
|
+
layoutVideoTrack: this.layoutVideoTrack,
|
|
274
|
+
effectsVideoTrack: this.effectsVideoTrack,
|
|
275
|
+
captionsVideoTrack: this.captionsVideoTrack,
|
|
276
|
+
audioTrack: this.audioTrack,
|
|
277
|
+
output: this.output
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
}]);
|
|
281
|
+
}();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Composition, getInputProps } from "remotion";
|
|
2
|
+
import { DynamicVideoComposition } from "./tracks/DynamicVideoComposition";
|
|
3
|
+
import { defaultProps } from "./development.js";
|
|
4
|
+
export var RemotionRoot = function RemotionRoot() {
|
|
5
|
+
var props = getInputProps();
|
|
6
|
+
var _ref = props.output || {},
|
|
7
|
+
fps = _ref.fps,
|
|
8
|
+
width = _ref.width,
|
|
9
|
+
height = _ref.height,
|
|
10
|
+
durationInFrames = _ref.durationInFrames;
|
|
11
|
+
return /*#__PURE__*/React.createElement(Composition, {
|
|
12
|
+
id: "RemotionRenderer",
|
|
13
|
+
component: DynamicVideoComposition,
|
|
14
|
+
durationInFrames: durationInFrames || defaultProps.output.durationInFrames,
|
|
15
|
+
fps: fps || defaultProps.output.fps,
|
|
16
|
+
width: width || defaultProps.output.width,
|
|
17
|
+
height: height || defaultProps.output.height,
|
|
18
|
+
props: props,
|
|
19
|
+
inputProps: props,
|
|
20
|
+
defaultProps: defaultProps
|
|
21
|
+
});
|
|
22
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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; } }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import React, { useEffect, useState } from 'react';
|
|
8
|
+
import { delayRender, continueRender, cancelRender } from 'remotion';
|
|
9
|
+
import { Lottie } from '@remotion/lottie';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Convert a HEX color string (e.g. "#ff8800") to the RGBA float array that
|
|
13
|
+
* Lottie expects: [r, g, b, a] where each component is 0‑1.
|
|
14
|
+
*/
|
|
15
|
+
var hexToRGBA = function hexToRGBA(hex) {
|
|
16
|
+
var clean = hex.replace('#', '');
|
|
17
|
+
var _int = parseInt(clean, 16);
|
|
18
|
+
return [(_int >> 16 & 255) / 255,
|
|
19
|
+
// red
|
|
20
|
+
(_int >> 8 & 255) / 255,
|
|
21
|
+
// green
|
|
22
|
+
(_int & 255) / 255,
|
|
23
|
+
// blue
|
|
24
|
+
1 // alpha (fully opaque)
|
|
25
|
+
];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Recursively walks through shape objects and overrides any fill (fl) or
|
|
30
|
+
* stroke (st) color with the provided RGBA array.
|
|
31
|
+
*/
|
|
32
|
+
var _applyColor = function applyColor(shapes, rgba) {
|
|
33
|
+
shapes === null || shapes === void 0 ? void 0 : shapes.forEach(function (shape) {
|
|
34
|
+
if (shape.ty === 'fl' || shape.ty === 'st') {
|
|
35
|
+
shape.c.k = rgba;
|
|
36
|
+
}
|
|
37
|
+
if (shape.it) {
|
|
38
|
+
_applyColor(shape.it, rgba);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Traverses all layers (top‑level + asset layers) and applies the primary
|
|
45
|
+
* color to every fill / stroke it encounters. This is useful for Lottie files
|
|
46
|
+
* that were exported with a single static color (e.g. white) and do not use
|
|
47
|
+
* layer naming conventions like "PrimaryColor".
|
|
48
|
+
*/
|
|
49
|
+
var replaceGlobalColor = function replaceGlobalColor(data, hex) {
|
|
50
|
+
var _data$assets;
|
|
51
|
+
var rgba = hexToRGBA(hex);
|
|
52
|
+
var traverseLayers = function traverseLayers(layers) {
|
|
53
|
+
layers === null || layers === void 0 ? void 0 : layers.forEach(function (layer) {
|
|
54
|
+
return _applyColor(layer.shapes, rgba);
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
traverseLayers(data.layers);
|
|
58
|
+
(_data$assets = data.assets) === null || _data$assets === void 0 ? void 0 : _data$assets.forEach(function (asset) {
|
|
59
|
+
return traverseLayers(asset.layers);
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* LottieAnimationGlobal – specialised wrapper to render the provided Lottie
|
|
65
|
+
* (e.g. text‑bubble‑animation.json) while dynamically replacing **all** stroke
|
|
66
|
+
* and fill colors with the supplied `primaryColor`.
|
|
67
|
+
*
|
|
68
|
+
* Props:
|
|
69
|
+
* • animationPath – URL or local path to the json file.
|
|
70
|
+
* • primaryColor – HEX string, defaults to "#ffffff".
|
|
71
|
+
* • autoplay – boolean, whether to start playing immediately.
|
|
72
|
+
* • loop – boolean, whether to loop the animation.
|
|
73
|
+
*/
|
|
74
|
+
export var LottieAnimationGlobal = function LottieAnimationGlobal(_ref) {
|
|
75
|
+
var animationPath = _ref.animationPath,
|
|
76
|
+
_ref$primaryColor = _ref.primaryColor,
|
|
77
|
+
primaryColor = _ref$primaryColor === void 0 ? '#ffffff' : _ref$primaryColor,
|
|
78
|
+
_ref$autoplay = _ref.autoplay,
|
|
79
|
+
autoplay = _ref$autoplay === void 0 ? false : _ref$autoplay,
|
|
80
|
+
_ref$loop = _ref.loop,
|
|
81
|
+
loop = _ref$loop === void 0 ? false : _ref$loop;
|
|
82
|
+
var _useState = useState(function () {
|
|
83
|
+
return delayRender('loading‑bubble‑lottie');
|
|
84
|
+
}),
|
|
85
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
86
|
+
handle = _useState2[0];
|
|
87
|
+
var _useState3 = useState(null),
|
|
88
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
89
|
+
animationData = _useState4[0],
|
|
90
|
+
setAnimationData = _useState4[1];
|
|
91
|
+
useEffect(function () {
|
|
92
|
+
fetch(animationPath).then(function (res) {
|
|
93
|
+
return res.json();
|
|
94
|
+
}).then(function (json) {
|
|
95
|
+
// Apply color replacement once the JSON is loaded
|
|
96
|
+
replaceGlobalColor(json, primaryColor);
|
|
97
|
+
setAnimationData(json);
|
|
98
|
+
continueRender(handle);
|
|
99
|
+
})["catch"](function (err) {
|
|
100
|
+
cancelRender(err);
|
|
101
|
+
console.error('BubbleLottieAnimation: failed to load', err);
|
|
102
|
+
});
|
|
103
|
+
}, [animationPath, primaryColor, handle]);
|
|
104
|
+
if (!animationData) return null;
|
|
105
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: "lottie-animation-wrapper",
|
|
107
|
+
style: {
|
|
108
|
+
width: '100%',
|
|
109
|
+
height: '100%'
|
|
110
|
+
}
|
|
111
|
+
}, /*#__PURE__*/React.createElement(Lottie, {
|
|
112
|
+
animationData: animationData,
|
|
113
|
+
loop: loop,
|
|
114
|
+
autoplay: autoplay
|
|
115
|
+
}), /*#__PURE__*/React.createElement("style", null, "\n .lottie-animation-wrapper *:not(style) {\n display: block !important;\n visibility: visible !important;\n }\n "));
|
|
116
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AbsoluteFill, Img } from 'remotion';
|
|
3
|
+
export var VirtualBackground = function VirtualBackground(_ref) {
|
|
4
|
+
var url = _ref.url,
|
|
5
|
+
_ref$zIndex = _ref.zIndex,
|
|
6
|
+
zIndex = _ref$zIndex === void 0 ? 2 : _ref$zIndex,
|
|
7
|
+
_ref$borderRadius = _ref.borderRadius,
|
|
8
|
+
borderRadius = _ref$borderRadius === void 0 ? '30px' : _ref$borderRadius;
|
|
9
|
+
if (!url) return null;
|
|
10
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
11
|
+
style: {
|
|
12
|
+
overflow: 'hidden',
|
|
13
|
+
borderRadius: borderRadius,
|
|
14
|
+
width: '100%',
|
|
15
|
+
height: '100%',
|
|
16
|
+
zIndex: zIndex
|
|
17
|
+
}
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Img, {
|
|
19
|
+
src: url,
|
|
20
|
+
style: {
|
|
21
|
+
width: '100%',
|
|
22
|
+
height: '100%',
|
|
23
|
+
objectFit: 'cover'
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Img } from "remotion";
|
|
3
|
+
|
|
4
|
+
// Places a virtual background image within a positioned rectangle
|
|
5
|
+
export var VirtualBackgroundUnderlay = function VirtualBackgroundUnderlay(_ref) {
|
|
6
|
+
var url = _ref.url,
|
|
7
|
+
_ref$top = _ref.top,
|
|
8
|
+
top = _ref$top === void 0 ? 0 : _ref$top,
|
|
9
|
+
_ref$left = _ref.left,
|
|
10
|
+
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
11
|
+
_ref$width = _ref.width,
|
|
12
|
+
width = _ref$width === void 0 ? "100%" : _ref$width,
|
|
13
|
+
_ref$height = _ref.height,
|
|
14
|
+
height = _ref$height === void 0 ? "100%" : _ref$height,
|
|
15
|
+
_ref$zIndex = _ref.zIndex,
|
|
16
|
+
zIndex = _ref$zIndex === void 0 ? 2 : _ref$zIndex,
|
|
17
|
+
borderRadius = _ref.borderRadius,
|
|
18
|
+
_ref$zoom = _ref.zoom,
|
|
19
|
+
zoom = _ref$zoom === void 0 ? 1 : _ref$zoom;
|
|
20
|
+
if (!url) return null;
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
style: {
|
|
23
|
+
position: "absolute",
|
|
24
|
+
top: top,
|
|
25
|
+
left: left,
|
|
26
|
+
width: width,
|
|
27
|
+
height: height,
|
|
28
|
+
overflow: "hidden",
|
|
29
|
+
borderRadius: borderRadius,
|
|
30
|
+
zIndex: zIndex,
|
|
31
|
+
transform: "scale(".concat(zoom, ")")
|
|
32
|
+
}
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Img, {
|
|
34
|
+
src: url,
|
|
35
|
+
style: {
|
|
36
|
+
width: "100%",
|
|
37
|
+
height: "100%",
|
|
38
|
+
objectFit: "cover"
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useThemedComponents } from "../../theme/hooks/useThemedComponents.js";
|
|
3
|
+
export var CaptionSimple = function CaptionSimple(_ref) {
|
|
4
|
+
var transcripts = _ref.transcripts,
|
|
5
|
+
color = _ref.color,
|
|
6
|
+
theme = _ref.theme;
|
|
7
|
+
var Caption = useThemedComponents("Caption", theme);
|
|
8
|
+
return /*#__PURE__*/React.createElement(Caption, {
|
|
9
|
+
transcripts: transcripts,
|
|
10
|
+
color: color
|
|
11
|
+
});
|
|
12
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AbsoluteFill, OffthreadVideo, Sequence } from "remotion";
|
|
3
|
+
import { useVirtualBackground } from "../../hooks/useVirtualBackground";
|
|
4
|
+
import { VirtualBackground } from "../backgrounds/VirtualBackground";
|
|
5
|
+
export var BrollFullscreen = function BrollFullscreen(_ref) {
|
|
6
|
+
var videoUrl = _ref.videoUrl,
|
|
7
|
+
durationInFrames = _ref.durationInFrames;
|
|
8
|
+
// Virtual background is typically used under person overlays; here it will
|
|
9
|
+
// have no effect if covered by fullscreen broll, but keeping parity.
|
|
10
|
+
var _useVirtualBackground = useVirtualBackground(),
|
|
11
|
+
isVirtual = _useVirtualBackground.isVirtual,
|
|
12
|
+
url = _useVirtualBackground.url;
|
|
13
|
+
return /*#__PURE__*/React.createElement(Sequence, {
|
|
14
|
+
durationInFrames: durationInFrames
|
|
15
|
+
}, /*#__PURE__*/React.createElement(AbsoluteFill, null, isVirtual && url ? /*#__PURE__*/React.createElement(VirtualBackground, {
|
|
16
|
+
url: url,
|
|
17
|
+
zIndex: 1
|
|
18
|
+
}) : null, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
19
|
+
src: videoUrl,
|
|
20
|
+
style: {
|
|
21
|
+
width: "100%",
|
|
22
|
+
height: "100%",
|
|
23
|
+
objectFit: "cover"
|
|
24
|
+
},
|
|
25
|
+
muted: true
|
|
26
|
+
})));
|
|
27
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AbsoluteFill } from "remotion";
|
|
3
|
+
export var GlitchText = function GlitchText(_ref) {
|
|
4
|
+
var text = _ref.text;
|
|
5
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
6
|
+
style: {
|
|
7
|
+
display: "grid",
|
|
8
|
+
placeItems: "center"
|
|
9
|
+
}
|
|
10
|
+
}, /*#__PURE__*/React.createElement("style", null, "body {\n background: transparent;\n font-family: \"Oswald\", sans-serif;\n font-style: italic;\n}\n\n.container {\n position: absolute;\n transform: translate(-50%, -50%);\n top: 40%;\n left: 50%;\n}\n\n.glitch, .glow {\n color: #dfbfbf;\n position: relative;\n font-size: 9vw;\n animation: glitch 5s 5s infinite;\n}\n\n.glitch::before, .glow::before {\n content: attr(data-text);\n position: absolute;\n left: -2px;\n text-shadow: -5px 0 magenta;\n background: transparent;\n overflow: hidden;\n top: 0;\n animation: noise-1 3s linear infinite alternate-reverse, glitch 5s 5.05s infinite;\n}\n\n.glitch::after, .glow::after {\n content: attr(data-text);\n position: absolute;\n left: 2px;\n text-shadow: -5px 0 lightgreen;\n background: transparent;\n overflow: hidden;\n top: 0;\n animation: noise-2 3s linear infinite alternate-reverse, glitch 5s 5s infinite;\n}\n\n@keyframes glitch {\n 1% {\n transform: rotateX(10deg) skewX(90deg);\n }\n 2% {\n transform: rotateX(0deg) skewX(0deg);\n }\n}\n@keyframes noise-1 {\n 3.3333333333% {\n clip-path: inset(59px 0 12px 0);\n }\n 6.6666666667% {\n clip-path: inset(77px 0 14px 0);\n }\n 10% {\n clip-path: inset(50px 0 41px 0);\n }\n 13.3333333333% {\n clip-path: inset(19px 0 5px 0);\n }\n 16.6666666667% {\n clip-path: inset(44px 0 35px 0);\n }\n 20% {\n clip-path: inset(78px 0 14px 0);\n }\n 23.3333333333% {\n clip-path: inset(41px 0 23px 0);\n }\n 26.6666666667% {\n clip-path: inset(21px 0 7px 0);\n }\n 30% {\n clip-path: inset(48px 0 18px 0);\n }\n 33.3333333333% {\n clip-path: inset(38px 0 57px 0);\n }\n 36.6666666667% {\n clip-path: inset(14px 0 4px 0);\n }\n 40% {\n clip-path: inset(30px 0 2px 0);\n }\n 43.3333333333% {\n clip-path: inset(96px 0 4px 0);\n }\n 46.6666666667% {\n clip-path: inset(18px 0 67px 0);\n }\n 50% {\n clip-path: inset(60px 0 3px 0);\n }\n 53.3333333333% {\n clip-path: inset(92px 0 6px 0);\n }\n 56.6666666667% {\n clip-path: inset(74px 0 3px 0);\n }\n 60% {\n clip-path: inset(89px 0 12px 0);\n }\n 63.3333333333% {\n clip-path: inset(76px 0 24px 0);\n }\n 66.6666666667% {\n clip-path: inset(75px 0 7px 0);\n }\n 70% {\n clip-path: inset(18px 0 61px 0);\n }\n 73.3333333333% {\n clip-path: inset(62px 0 13px 0);\n }\n 76.6666666667% {\n clip-path: inset(67px 0 18px 0);\n }\n 80% {\n clip-path: inset(43px 0 29px 0);\n }\n 83.3333333333% {\n clip-path: inset(40px 0 34px 0);\n }\n 86.6666666667% {\n clip-path: inset(13px 0 67px 0);\n }\n 90% {\n clip-path: inset(94px 0 4px 0);\n }\n 93.3333333333% {\n clip-path: inset(58px 0 41px 0);\n }\n 96.6666666667% {\n clip-path: inset(2px 0 92px 0);\n }\n 100% {\n clip-path: inset(36px 0 63px 0);\n }\n}\n@keyframes noise-2 {\n 0% {\n clip-path: inset(5px 0 57px 0);\n }\n 3.3333333333% {\n clip-path: inset(32px 0 67px 0);\n }\n 6.6666666667% {\n clip-path: inset(94px 0 5px 0);\n }\n 10% {\n clip-path: inset(15px 0 62px 0);\n }\n 13.3333333333% {\n clip-path: inset(46px 0 36px 0);\n }\n 16.6666666667% {\n clip-path: inset(18px 0 58px 0);\n }\n 20% {\n clip-path: inset(25px 0 39px 0);\n }\n 23.3333333333% {\n clip-path: inset(65px 0 11px 0);\n }\n 26.6666666667% {\n clip-path: inset(49px 0 48px 0);\n }\n 30% {\n clip-path: inset(54px 0 17px 0);\n }\n 33.3333333333% {\n clip-path: inset(25px 0 28px 0);\n }\n 36.6666666667% {\n clip-path: inset(72px 0 28px 0);\n }\n 40% {\n clip-path: inset(86px 0 7px 0);\n }\n 43.3333333333% {\n clip-path: inset(62px 0 2px 0);\n }\n 46.6666666667% {\n clip-path: inset(28px 0 9px 0);\n }\n 50% {\n clip-path: inset(96px 0 1px 0);\n }\n 53.3333333333% {\n clip-path: inset(65px 0 9px 0);\n }\n 56.6666666667% {\n clip-path: inset(87px 0 1px 0);\n }\n 60% {\n clip-path: inset(69px 0 9px 0);\n }\n 63.3333333333% {\n clip-path: inset(65px 0 26px 0);\n }\n 66.6666666667% {\n clip-path: inset(79px 0 5px 0);\n }\n 70% {\n clip-path: inset(39px 0 45px 0);\n }\n 73.3333333333% {\n clip-path: inset(69px 0 11px 0);\n }\n 76.6666666667% {\n clip-path: inset(81px 0 3px 0);\n }\n 80% {\n clip-path: inset(44px 0 40px 0);\n }\n 83.3333333333% {\n clip-path: inset(89px 0 10px 0);\n }\n 86.6666666667% {\n clip-path: inset(7px 0 68px 0);\n }\n 90% {\n clip-path: inset(80px 0 6px 0);\n }\n 93.3333333333% {\n clip-path: inset(58px 0 2px 0);\n }\n 96.6666666667% {\n clip-path: inset(20px 0 57px 0);\n }\n 100% {\n clip-path: inset(86px 0 11px 0);\n }\n}\n.scanlines {\n overflow: hidden;\n mix-blend-mode: difference;\n}\n\n.scanlines::before {\n content: \"\";\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n background: repeating-linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.05) 0.5%, transparent 1%);\n animation: fudge 7s ease-in-out alternate infinite;\n}\n\n@keyframes fudge {\n from {\n transform: translate(0px, 0px);\n }\n to {\n transform: translate(0px, 2%);\n }\n}\n.glow {\n text-shadow: 0 0 1000px #dfbfbf;\n color: transparent;\n position: absolute;\n top: 0;\n}\n\n.subtitle {\n font-family: Arial, Helvetica, sans-serif;\n font-weight: 100;\n font-size: 0.8vw;\n color: rgba(165, 141, 141, 0.4);\n text-transform: uppercase;\n letter-spacing: 1em;\n text-align: center;\n position: absolute;\n left: 17%;\n animation: glitch-2 5s 5.02s infinite;\n}\n\n@keyframes glitch-2 {\n 1% {\n transform: rotateX(10deg) skewX(70deg);\n }\n 2% {\n transform: rotateX(0deg) skewX(0deg);\n }\n}"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
className: "container"
|
|
12
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "glitch",
|
|
14
|
+
"data-text": "ELISAB\xC9TH"
|
|
15
|
+
}, "ELISAB\xC9TH"), /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "glow"
|
|
17
|
+
}, "ELISAB\xC9TH"), /*#__PURE__*/React.createElement("p", {
|
|
18
|
+
className: "subtitle"
|
|
19
|
+
}, "IMPRACTICAL DEVELOPER")), /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "scanlines"
|
|
21
|
+
})));
|
|
22
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AbsoluteFill } from "remotion";
|
|
3
|
+
import { useThemedComponents } from "../../theme/hooks/useThemedComponents.js";
|
|
4
|
+
export var HandoffNametag = function HandoffNametag(props) {
|
|
5
|
+
var HandoffNametag = useThemedComponents("HandoffNametag", props.theme);
|
|
6
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AbsoluteFill, null, /*#__PURE__*/React.createElement(HandoffNametag, props)));
|
|
7
|
+
};
|