@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,539 @@
|
|
|
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 _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
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; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5
|
+
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); }
|
|
6
|
+
import { AbsoluteFill, Audio, Easing, Img, interpolate, OffthreadVideo, useCurrentFrame, useVideoConfig } from "remotion";
|
|
7
|
+
import { loadFont } from "@remotion/google-fonts/Poppins";
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { useOrientationBased } from "../../hooks/useOrientationBased.js";
|
|
10
|
+
import { useTheme } from "../../theme/hooks/useTheme.js";
|
|
11
|
+
import { CHROME_PADDING } from "../../config.js";
|
|
12
|
+
import { useTimeInterpolate } from "../../hooks/useTimeInterpolate.js";
|
|
13
|
+
import { variants } from "../../main/lib/layouts/TextWithVideoLayout.js";
|
|
14
|
+
import { distributeTextToFit } from "../../theme/themes/default/Sentence/SentenceSimple.helpers.js";
|
|
15
|
+
import { KeyPointOverlayDepth } from "./KeyPointOverlayDepth";
|
|
16
|
+
import FaceCenteredVideo from "../utils/FaceCenteredVideo";
|
|
17
|
+
import PausableImg from "../utils/PausableImg";
|
|
18
|
+
import { BlurOverlay } from "../utils/BlurOverlay";
|
|
19
|
+
import { useVirtualBackground } from "../../hooks/useVirtualBackground";
|
|
20
|
+
import { VirtualBackgroundUnderlay } from "../backgrounds/VirtualBackgroundUnderlay";
|
|
21
|
+
var _loadFont = loadFont(),
|
|
22
|
+
fontFamily = _loadFont.fontFamily;
|
|
23
|
+
var landscapeClipPath = "polygon(0% 0%, 100% 0%, 90% 100%, 0% 100%)";
|
|
24
|
+
var portraitClipPath = "polygon(0 0, 100% 0, 100% 90%, 0% 100%)";
|
|
25
|
+
var squareClipPath = "polygon(0% 0%, 100% 0%, 90% 100%, 0% 100%)";
|
|
26
|
+
var Logo = function Logo(_ref) {
|
|
27
|
+
var logoUrl = _ref.logoUrl,
|
|
28
|
+
top = _ref.top,
|
|
29
|
+
left = _ref.left,
|
|
30
|
+
right = _ref.right;
|
|
31
|
+
return logoUrl ? /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
style: {
|
|
33
|
+
position: "fixed",
|
|
34
|
+
zIndex: 11,
|
|
35
|
+
top: top,
|
|
36
|
+
left: left,
|
|
37
|
+
right: right
|
|
38
|
+
}
|
|
39
|
+
}, /*#__PURE__*/React.createElement(PausableImg, {
|
|
40
|
+
style: {
|
|
41
|
+
width: "225px",
|
|
42
|
+
maxHeight: "auto",
|
|
43
|
+
objectFit: "contain"
|
|
44
|
+
},
|
|
45
|
+
delayRenderTimeoutInMilliseconds: 60000,
|
|
46
|
+
src: logoUrl
|
|
47
|
+
})) : null;
|
|
48
|
+
};
|
|
49
|
+
var Word = function Word(_ref2) {
|
|
50
|
+
var word = _ref2.word,
|
|
51
|
+
index = _ref2.index;
|
|
52
|
+
var _distributeTextToFit = distributeTextToFit(word, 300, 120, 50),
|
|
53
|
+
fontSize = _distributeTextToFit.fontSize,
|
|
54
|
+
lines = _distributeTextToFit.lines;
|
|
55
|
+
var frame = useCurrentFrame();
|
|
56
|
+
var timings = [0, 90];
|
|
57
|
+
var options = {};
|
|
58
|
+
var translation = interpolate(frame, timings, [0, 30], options);
|
|
59
|
+
var directions = ["translate(".concat(translation, "px, ").concat(translation, "px)"), "translateX(".concat(translation / 2, "px)"), "translate(".concat(translation, "px)"), "translateY(".concat(translation, "px)"), "translateX(".concat(translation, "px)")];
|
|
60
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
style: {
|
|
62
|
+
transform: directions[index % directions.length],
|
|
63
|
+
display: "flex",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
gap: 30,
|
|
66
|
+
willChange: "transform"
|
|
67
|
+
}
|
|
68
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
style: {
|
|
70
|
+
position: "relative",
|
|
71
|
+
width: 3,
|
|
72
|
+
height: 3,
|
|
73
|
+
borderRadius: "100%",
|
|
74
|
+
backgroundColor: "white",
|
|
75
|
+
border: "1px solid white",
|
|
76
|
+
padding: 9
|
|
77
|
+
}
|
|
78
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
style: {
|
|
80
|
+
position: "absolute",
|
|
81
|
+
top: "50%",
|
|
82
|
+
left: "50%",
|
|
83
|
+
width: 45,
|
|
84
|
+
height: 45,
|
|
85
|
+
transform: "translate(-50%, -50%)",
|
|
86
|
+
borderRadius: "100%",
|
|
87
|
+
border: "1px solid white"
|
|
88
|
+
}
|
|
89
|
+
})), /*#__PURE__*/React.createElement("p", {
|
|
90
|
+
style: {
|
|
91
|
+
color: "white",
|
|
92
|
+
textTransform: "uppercase",
|
|
93
|
+
fontWeight: 300,
|
|
94
|
+
letterSpacing: "10px",
|
|
95
|
+
fontSize: fontSize,
|
|
96
|
+
margin: 0,
|
|
97
|
+
height: 80,
|
|
98
|
+
display: "flex",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
gap: 20
|
|
101
|
+
}
|
|
102
|
+
}, lines.map(function (line, index) {
|
|
103
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
104
|
+
key: line + index,
|
|
105
|
+
style: {
|
|
106
|
+
willChange: "transform"
|
|
107
|
+
}
|
|
108
|
+
}, line);
|
|
109
|
+
})));
|
|
110
|
+
};
|
|
111
|
+
var RotatingWordsContainer = /*#__PURE__*/React.memo(function (_ref3) {
|
|
112
|
+
var _ref3$words = _ref3.words,
|
|
113
|
+
words = _ref3$words === void 0 ? [] : _ref3$words;
|
|
114
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
style: {
|
|
116
|
+
fontFamily: fontFamily,
|
|
117
|
+
position: "absolute",
|
|
118
|
+
height: "100%"
|
|
119
|
+
}
|
|
120
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
style: {
|
|
122
|
+
display: "flex",
|
|
123
|
+
flexDirection: "column",
|
|
124
|
+
height: "100%",
|
|
125
|
+
justifyContent: "space-evenly"
|
|
126
|
+
}
|
|
127
|
+
}, words.map(function (word, index) {
|
|
128
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
129
|
+
key: index + word
|
|
130
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
style: {
|
|
132
|
+
position: "relative",
|
|
133
|
+
display: "flex",
|
|
134
|
+
gap: "30px",
|
|
135
|
+
alignItems: "center",
|
|
136
|
+
width: "100%"
|
|
137
|
+
}
|
|
138
|
+
}, /*#__PURE__*/React.createElement(Word, {
|
|
139
|
+
word: word,
|
|
140
|
+
index: index
|
|
141
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
style: {
|
|
143
|
+
position: "relative",
|
|
144
|
+
display: "flex",
|
|
145
|
+
gap: "30px",
|
|
146
|
+
alignItems: "center",
|
|
147
|
+
width: "100%",
|
|
148
|
+
left: "75%"
|
|
149
|
+
}
|
|
150
|
+
}, /*#__PURE__*/React.createElement(Word, {
|
|
151
|
+
word: word,
|
|
152
|
+
index: index
|
|
153
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
154
|
+
style: {
|
|
155
|
+
position: "relative",
|
|
156
|
+
display: "flex",
|
|
157
|
+
gap: "30px",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
width: "100%",
|
|
160
|
+
left: "-75%"
|
|
161
|
+
}
|
|
162
|
+
}, /*#__PURE__*/React.createElement(Word, {
|
|
163
|
+
word: word,
|
|
164
|
+
index: index
|
|
165
|
+
})));
|
|
166
|
+
})));
|
|
167
|
+
});
|
|
168
|
+
var KeywordComponent = function KeywordComponent(_ref4) {
|
|
169
|
+
var startVideoFrom = _ref4.startVideoFrom,
|
|
170
|
+
videoUrl = _ref4.videoUrl,
|
|
171
|
+
logoUrl = _ref4.logoUrl,
|
|
172
|
+
children = _ref4.children,
|
|
173
|
+
textColor = _ref4.textColor,
|
|
174
|
+
textBackgroundColor = _ref4.textBackgroundColor,
|
|
175
|
+
accentColor = _ref4.accentColor,
|
|
176
|
+
_ref4$variant = _ref4.variant,
|
|
177
|
+
variant = _ref4$variant === void 0 ? variants.LEFT_TO_RIGHT : _ref4$variant,
|
|
178
|
+
_ref4$words = _ref4.words,
|
|
179
|
+
words = _ref4$words === void 0 ? [] : _ref4$words,
|
|
180
|
+
durationInFrames = _ref4.durationInFrames,
|
|
181
|
+
faceMetadata = _ref4.faceMetadata,
|
|
182
|
+
muted = _ref4.muted,
|
|
183
|
+
noBackgroundVideoEffects = _ref4.noBackgroundVideoEffects,
|
|
184
|
+
noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl;
|
|
185
|
+
var _useVideoConfig = useVideoConfig(),
|
|
186
|
+
width = _useVideoConfig.width,
|
|
187
|
+
height = _useVideoConfig.height,
|
|
188
|
+
fps = _useVideoConfig.fps;
|
|
189
|
+
var frame = useCurrentFrame();
|
|
190
|
+
var _useVirtualBackground = useVirtualBackground(),
|
|
191
|
+
isVirtual = _useVirtualBackground.isVirtual,
|
|
192
|
+
virtualBgUrl = _useVirtualBackground.url;
|
|
193
|
+
var showVirtual = isVirtual && !!noBackgroundVideoUrl;
|
|
194
|
+
var stylesByVariant = _defineProperty(_defineProperty({}, variants.RIGHT_TO_LEFT, {
|
|
195
|
+
flowDirection: "row-reverse",
|
|
196
|
+
logoLeft: CHROME_PADDING * 2,
|
|
197
|
+
logoRight: undefined
|
|
198
|
+
}), variants.LEFT_TO_RIGHT, {
|
|
199
|
+
flowDirection: "row",
|
|
200
|
+
logoLeft: undefined,
|
|
201
|
+
logoRight: CHROME_PADDING * 2
|
|
202
|
+
});
|
|
203
|
+
var _useOrientationBased = useOrientationBased({
|
|
204
|
+
portrait: {
|
|
205
|
+
containerWidth: "100%",
|
|
206
|
+
imageContainerOutputRange: [-height, -height * 0.41],
|
|
207
|
+
targetVideoWidth: width - 2 * CHROME_PADDING,
|
|
208
|
+
targetVideoHeight: height * 0.5,
|
|
209
|
+
clipPath: portraitClipPath,
|
|
210
|
+
logoTop: CHROME_PADDING * 2,
|
|
211
|
+
logoLeft: CHROME_PADDING * 2 - 5,
|
|
212
|
+
logoRight: undefined,
|
|
213
|
+
flowDirection: "column-reverse"
|
|
214
|
+
},
|
|
215
|
+
landscape: {
|
|
216
|
+
containerWidth: "65%",
|
|
217
|
+
imageContainerOutputRange: [-width, -width * 0.35],
|
|
218
|
+
targetVideoWidth: width * 0.45,
|
|
219
|
+
targetVideoHeight: height,
|
|
220
|
+
clipPath: landscapeClipPath,
|
|
221
|
+
logoTop: CHROME_PADDING * 2,
|
|
222
|
+
logoLeft: stylesByVariant[variant].logoLeft,
|
|
223
|
+
logoRight: stylesByVariant[variant].logoRight,
|
|
224
|
+
flowDirection: "row-reverse"
|
|
225
|
+
},
|
|
226
|
+
square: {
|
|
227
|
+
containerWidth: "65%",
|
|
228
|
+
imageContainerOutputRange: [-width, -width * 0.45],
|
|
229
|
+
targetVideoWidth: width * 0.55,
|
|
230
|
+
targetVideoHeight: height,
|
|
231
|
+
clipPath: squareClipPath,
|
|
232
|
+
logoTop: CHROME_PADDING * 2,
|
|
233
|
+
logoLeft: stylesByVariant[variant].logoLeft,
|
|
234
|
+
logoRight: stylesByVariant[variant].logoRight,
|
|
235
|
+
flowDirection: "row-reverse"
|
|
236
|
+
}
|
|
237
|
+
}),
|
|
238
|
+
imageContainerOutputRange = _useOrientationBased.imageContainerOutputRange,
|
|
239
|
+
containerWidth = _useOrientationBased.containerWidth,
|
|
240
|
+
targetVideoWidth = _useOrientationBased.targetVideoWidth,
|
|
241
|
+
targetVideoHeight = _useOrientationBased.targetVideoHeight,
|
|
242
|
+
clipPath = _useOrientationBased.clipPath,
|
|
243
|
+
logoTop = _useOrientationBased.logoTop,
|
|
244
|
+
logoLeft = _useOrientationBased.logoLeft,
|
|
245
|
+
logoRight = _useOrientationBased.logoRight,
|
|
246
|
+
flowDirection = _useOrientationBased.flowDirection,
|
|
247
|
+
orientation = _useOrientationBased.orientation;
|
|
248
|
+
var isPortrait = orientation === "portrait";
|
|
249
|
+
|
|
250
|
+
// Animation timing configuration
|
|
251
|
+
var entranceEndTime = 0.5; // 0.5 seconds for entrance
|
|
252
|
+
var exitStartTime = durationInFrames ? durationInFrames / fps - 0.5 : null; // 0.5 seconds before end for exit
|
|
253
|
+
var currentTime = frame / fps;
|
|
254
|
+
var animationProgress = 0;
|
|
255
|
+
if (durationInFrames && exitStartTime && currentTime >= exitStartTime) {
|
|
256
|
+
// Exit animation - reverse the progress
|
|
257
|
+
var exitProgress = (currentTime - exitStartTime) / 0.5;
|
|
258
|
+
animationProgress = Math.max(0, 1 - exitProgress);
|
|
259
|
+
} else if (currentTime <= entranceEndTime) {
|
|
260
|
+
// Entrance animation
|
|
261
|
+
animationProgress = Math.min(1, currentTime / entranceEndTime);
|
|
262
|
+
} else {
|
|
263
|
+
// Middle section - fully animated
|
|
264
|
+
animationProgress = 1;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Apply easing to the progress
|
|
268
|
+
var easedProgress = Easing["in"](Easing.quad)(animationProgress);
|
|
269
|
+
|
|
270
|
+
// Calculate animated values based on progress
|
|
271
|
+
var imageContainerTranslate = imageContainerOutputRange[0] + (imageContainerOutputRange[1] - imageContainerOutputRange[0]) * easedProgress;
|
|
272
|
+
var videoWidth = width + (targetVideoWidth - width) * easedProgress;
|
|
273
|
+
var videoHeight = height + (targetVideoHeight - height) * easedProgress;
|
|
274
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
275
|
+
style: {
|
|
276
|
+
isolation: "isolate",
|
|
277
|
+
width: width,
|
|
278
|
+
height: height,
|
|
279
|
+
padding: CHROME_PADDING,
|
|
280
|
+
backgroundColor: accentColor
|
|
281
|
+
}
|
|
282
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
283
|
+
style: {
|
|
284
|
+
position: "fixed",
|
|
285
|
+
zIndex: 999,
|
|
286
|
+
height: CHROME_PADDING,
|
|
287
|
+
width: width,
|
|
288
|
+
top: 0,
|
|
289
|
+
backgroundColor: accentColor
|
|
290
|
+
}
|
|
291
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
292
|
+
style: {
|
|
293
|
+
position: "fixed",
|
|
294
|
+
zIndex: 999,
|
|
295
|
+
width: CHROME_PADDING,
|
|
296
|
+
height: height,
|
|
297
|
+
right: 0,
|
|
298
|
+
backgroundColor: accentColor
|
|
299
|
+
}
|
|
300
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
301
|
+
style: {
|
|
302
|
+
position: "fixed",
|
|
303
|
+
zIndex: 999,
|
|
304
|
+
width: CHROME_PADDING,
|
|
305
|
+
height: height,
|
|
306
|
+
left: 0,
|
|
307
|
+
backgroundColor: accentColor
|
|
308
|
+
}
|
|
309
|
+
}), /*#__PURE__*/React.createElement(Logo, {
|
|
310
|
+
logoUrl: logoUrl,
|
|
311
|
+
top: logoTop,
|
|
312
|
+
left: logoLeft,
|
|
313
|
+
right: logoRight
|
|
314
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
315
|
+
style: {
|
|
316
|
+
display: "flex",
|
|
317
|
+
flexDirection: flowDirection,
|
|
318
|
+
width: "100%",
|
|
319
|
+
height: "100%",
|
|
320
|
+
overflow: "hidden"
|
|
321
|
+
}
|
|
322
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
323
|
+
style: {
|
|
324
|
+
width: containerWidth,
|
|
325
|
+
position: "absolute",
|
|
326
|
+
backgroundColor: textColor,
|
|
327
|
+
fontFamily: fontFamily,
|
|
328
|
+
display: "flex",
|
|
329
|
+
alignItems: "center",
|
|
330
|
+
justifyContent: "center",
|
|
331
|
+
textAlign: "center",
|
|
332
|
+
clipPath: clipPath,
|
|
333
|
+
transform: "translateX(".concat(isPortrait ? 0 : imageContainerTranslate, "px) translateY(").concat(isPortrait ? imageContainerTranslate : 0, "px)"),
|
|
334
|
+
height: height - CHROME_PADDING * 2,
|
|
335
|
+
zIndex: 2
|
|
336
|
+
}
|
|
337
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
338
|
+
style: {
|
|
339
|
+
objectFit: "cover",
|
|
340
|
+
width: "100%",
|
|
341
|
+
height: "100%",
|
|
342
|
+
mixBlendMode: "screen"
|
|
343
|
+
},
|
|
344
|
+
src: "https://storage.googleapis.com/zync-media/assets/static/plexus1.mov",
|
|
345
|
+
startFrom: 120
|
|
346
|
+
}), /*#__PURE__*/React.createElement(RotatingWordsContainer, {
|
|
347
|
+
words: words
|
|
348
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
349
|
+
style: {
|
|
350
|
+
width: videoWidth,
|
|
351
|
+
height: isPortrait ? videoHeight : height - CHROME_PADDING * 2,
|
|
352
|
+
overflow: "hidden",
|
|
353
|
+
position: "relative",
|
|
354
|
+
filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
|
|
355
|
+
}
|
|
356
|
+
}, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
|
|
357
|
+
url: virtualBgUrl,
|
|
358
|
+
top: 0,
|
|
359
|
+
left: 0,
|
|
360
|
+
width: "100%",
|
|
361
|
+
height: "100%",
|
|
362
|
+
zIndex: 1
|
|
363
|
+
}) : null, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
364
|
+
startFrom: startVideoFrom,
|
|
365
|
+
src: videoUrl,
|
|
366
|
+
muted: muted,
|
|
367
|
+
faceMetadata: faceMetadata,
|
|
368
|
+
containerWidth: videoWidth,
|
|
369
|
+
containerHeight: videoHeight,
|
|
370
|
+
useObjectPosition: isPortrait,
|
|
371
|
+
centerHorizontally: isPortrait
|
|
372
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
373
|
+
startFrom: startVideoFrom,
|
|
374
|
+
src: videoUrl,
|
|
375
|
+
muted: muted,
|
|
376
|
+
style: {
|
|
377
|
+
height: "100%",
|
|
378
|
+
objectFit: "cover",
|
|
379
|
+
width: videoWidth
|
|
380
|
+
}
|
|
381
|
+
})), /*#__PURE__*/React.createElement(BlurOverlay, {
|
|
382
|
+
show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && noBackgroundVideoUrl,
|
|
383
|
+
width: width,
|
|
384
|
+
height: height,
|
|
385
|
+
zIndex: 1
|
|
386
|
+
}), noBackgroundVideoUrl && (showVirtual || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
387
|
+
style: {
|
|
388
|
+
padding: CHROME_PADDING,
|
|
389
|
+
isolation: "isolate",
|
|
390
|
+
width: width,
|
|
391
|
+
height: height,
|
|
392
|
+
zIndex: 9
|
|
393
|
+
}
|
|
394
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
395
|
+
style: {
|
|
396
|
+
display: "flex",
|
|
397
|
+
flexDirection: flowDirection,
|
|
398
|
+
width: "100%",
|
|
399
|
+
height: "100%",
|
|
400
|
+
overflow: "hidden"
|
|
401
|
+
}
|
|
402
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
403
|
+
style: {
|
|
404
|
+
width: containerWidth,
|
|
405
|
+
position: "absolute",
|
|
406
|
+
backgroundColor: textColor,
|
|
407
|
+
fontFamily: fontFamily,
|
|
408
|
+
display: "flex",
|
|
409
|
+
alignItems: "center",
|
|
410
|
+
justifyContent: "center",
|
|
411
|
+
textAlign: "center",
|
|
412
|
+
clipPath: clipPath,
|
|
413
|
+
transform: "translateX(".concat(isPortrait ? 0 : imageContainerTranslate, "px) translateY(").concat(isPortrait ? imageContainerTranslate : 0, "px)"),
|
|
414
|
+
height: height - CHROME_PADDING * 2,
|
|
415
|
+
zIndex: 2
|
|
416
|
+
}
|
|
417
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
418
|
+
style: {
|
|
419
|
+
objectFit: "cover",
|
|
420
|
+
width: "100%",
|
|
421
|
+
height: "100%",
|
|
422
|
+
mixBlendMode: "screen"
|
|
423
|
+
},
|
|
424
|
+
src: "https://storage.googleapis.com/zync-media/assets/static/plexus1.mov",
|
|
425
|
+
startFrom: 120
|
|
426
|
+
}), /*#__PURE__*/React.createElement(RotatingWordsContainer, {
|
|
427
|
+
words: words
|
|
428
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
429
|
+
style: {
|
|
430
|
+
width: videoWidth,
|
|
431
|
+
height: isPortrait ? videoHeight : height - CHROME_PADDING * 2,
|
|
432
|
+
overflow: "hidden"
|
|
433
|
+
}
|
|
434
|
+
}, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
435
|
+
startFrom: startVideoFrom,
|
|
436
|
+
src: noBackgroundVideoUrl,
|
|
437
|
+
muted: true,
|
|
438
|
+
transparent: true,
|
|
439
|
+
faceMetadata: faceMetadata,
|
|
440
|
+
containerWidth: videoWidth,
|
|
441
|
+
containerHeight: videoHeight,
|
|
442
|
+
useObjectPosition: isPortrait,
|
|
443
|
+
centerHorizontally: isPortrait,
|
|
444
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects
|
|
445
|
+
})))) : null, noBackgroundVideoUrl && (showVirtual || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim || noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur) && !faceMetadata ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
446
|
+
style: {
|
|
447
|
+
backgroundColor: "transparent",
|
|
448
|
+
padding: CHROME_PADDING,
|
|
449
|
+
isolation: "isolate",
|
|
450
|
+
width: width,
|
|
451
|
+
height: height,
|
|
452
|
+
zIndex: 9
|
|
453
|
+
}
|
|
454
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
455
|
+
style: {
|
|
456
|
+
display: "flex",
|
|
457
|
+
flexDirection: flowDirection,
|
|
458
|
+
width: "100%",
|
|
459
|
+
height: "100%",
|
|
460
|
+
overflow: "hidden"
|
|
461
|
+
}
|
|
462
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
463
|
+
style: {
|
|
464
|
+
width: containerWidth,
|
|
465
|
+
position: "absolute",
|
|
466
|
+
backgroundColor: textColor,
|
|
467
|
+
fontFamily: fontFamily,
|
|
468
|
+
display: "flex",
|
|
469
|
+
alignItems: "center",
|
|
470
|
+
justifyContent: "center",
|
|
471
|
+
textAlign: "center",
|
|
472
|
+
clipPath: clipPath,
|
|
473
|
+
transform: "translateX(".concat(isPortrait ? 0 : imageContainerTranslate, "px) translateY(").concat(isPortrait ? imageContainerTranslate : 0, "px)"),
|
|
474
|
+
height: height - CHROME_PADDING * 2,
|
|
475
|
+
zIndex: 2
|
|
476
|
+
}
|
|
477
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
478
|
+
style: {
|
|
479
|
+
objectFit: "cover",
|
|
480
|
+
width: "100%",
|
|
481
|
+
height: "100%",
|
|
482
|
+
mixBlendMode: "screen"
|
|
483
|
+
},
|
|
484
|
+
src: "https://storage.googleapis.com/zync-media/assets/static/plexus1.mov",
|
|
485
|
+
startFrom: 120
|
|
486
|
+
}), /*#__PURE__*/React.createElement(RotatingWordsContainer, {
|
|
487
|
+
words: words
|
|
488
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
489
|
+
style: {
|
|
490
|
+
width: videoWidth,
|
|
491
|
+
height: isPortrait ? videoHeight : height - CHROME_PADDING * 2,
|
|
492
|
+
overflow: "hidden"
|
|
493
|
+
}
|
|
494
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
495
|
+
startFrom: startVideoFrom,
|
|
496
|
+
src: noBackgroundVideoUrl,
|
|
497
|
+
muted: true,
|
|
498
|
+
transparent: true,
|
|
499
|
+
style: {
|
|
500
|
+
height: "100%",
|
|
501
|
+
objectFit: "cover",
|
|
502
|
+
width: videoWidth,
|
|
503
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined
|
|
504
|
+
}
|
|
505
|
+
})))) : null), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
506
|
+
style: {
|
|
507
|
+
zIndex: 10
|
|
508
|
+
}
|
|
509
|
+
}, children));
|
|
510
|
+
};
|
|
511
|
+
export var Keyword = function Keyword(props) {
|
|
512
|
+
var _useTheme = useTheme(),
|
|
513
|
+
primaryColor = _useTheme.primaryColor,
|
|
514
|
+
primaryContrast = _useTheme.primaryContrast,
|
|
515
|
+
accentColor = _useTheme.accentColor;
|
|
516
|
+
var _ref5 = props || {},
|
|
517
|
+
_ref5$disableTransiti = _ref5.disableTransitionSounds,
|
|
518
|
+
disableTransitionSounds = _ref5$disableTransiti === void 0 ? false : _ref5$disableTransiti;
|
|
519
|
+
var _useVideoConfig2 = useVideoConfig(),
|
|
520
|
+
_useVideoConfig2$outp = _useVideoConfig2.output,
|
|
521
|
+
_useVideoConfig2$outp2 = _useVideoConfig2$outp === void 0 ? {
|
|
522
|
+
theme: window.screenplayProps.output.theme
|
|
523
|
+
} : _useVideoConfig2$outp,
|
|
524
|
+
_useVideoConfig2$outp3 = _useVideoConfig2$outp2.theme,
|
|
525
|
+
theme = _useVideoConfig2$outp3 === void 0 ? "default" : _useVideoConfig2$outp3;
|
|
526
|
+
if (props.theme === "depth" || theme === "depth") {
|
|
527
|
+
return /*#__PURE__*/React.createElement(KeyPointOverlayDepth, props, props.children);
|
|
528
|
+
}
|
|
529
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
|
|
530
|
+
src: "https://cdn.zync.ai/assets/static/swoosh.mp3",
|
|
531
|
+
volume: 0.25
|
|
532
|
+
}), /*#__PURE__*/React.createElement(KeywordComponent, _extends({}, props, {
|
|
533
|
+
textBackgroundColor: primaryContrast,
|
|
534
|
+
textColor: primaryColor,
|
|
535
|
+
accentColor: accentColor,
|
|
536
|
+
variant: props.variant,
|
|
537
|
+
durationInFrames: props.durationInFrames
|
|
538
|
+
})));
|
|
539
|
+
};
|