@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,183 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AbsoluteFill, OffthreadVideo, Audio, Easing, useVideoConfig } from "remotion";
|
|
3
|
+
import { CHROME_PADDING } from "../../config.js";
|
|
4
|
+
import { useTimeInterpolate } from "../../hooks/useTimeInterpolate.js";
|
|
5
|
+
import FaceCenteredVideo from "../utils/FaceCenteredVideo";
|
|
6
|
+
import PausableImg from "../utils/PausableImg";
|
|
7
|
+
import { useVirtualBackground } from "../../hooks/useVirtualBackground";
|
|
8
|
+
import { VirtualBackground } from "../backgrounds/VirtualBackground";
|
|
9
|
+
export var SimpleFrame = function SimpleFrame(_ref) {
|
|
10
|
+
var videoUrl = _ref.videoUrl,
|
|
11
|
+
startVideoFrom = _ref.startVideoFrom,
|
|
12
|
+
muted = _ref.muted,
|
|
13
|
+
frameColor = _ref.frameColor,
|
|
14
|
+
logoUrl = _ref.logoUrl,
|
|
15
|
+
videoZoom = _ref.videoZoom,
|
|
16
|
+
faceMetadata = _ref.faceMetadata,
|
|
17
|
+
children = _ref.children,
|
|
18
|
+
_ref$disableTransitio = _ref.disableTransitionSounds,
|
|
19
|
+
disableTransitionSounds = _ref$disableTransitio === void 0 ? false : _ref$disableTransitio,
|
|
20
|
+
noBackgroundVideoEffects = _ref.noBackgroundVideoEffects,
|
|
21
|
+
noBackgroundVideoUrl = _ref.noBackgroundVideoUrl;
|
|
22
|
+
var _useVideoConfig = useVideoConfig(),
|
|
23
|
+
width = _useVideoConfig.width,
|
|
24
|
+
height = _useVideoConfig.height;
|
|
25
|
+
|
|
26
|
+
// Determine if we should show a virtual background image (orientation-aware)
|
|
27
|
+
var _useVirtualBackground = useVirtualBackground(),
|
|
28
|
+
isVirtual = _useVirtualBackground.isVirtual,
|
|
29
|
+
virtualBgUrl = _useVirtualBackground.url;
|
|
30
|
+
var showVirtual = isVirtual && !!noBackgroundVideoUrl;
|
|
31
|
+
var videoZoomInterpolated = useTimeInterpolate([0, 0.5], [1, videoZoom || 1], {
|
|
32
|
+
extrapolateRight: "clamp",
|
|
33
|
+
extrapolateLeft: "clamp",
|
|
34
|
+
easing: Easing["in"](Easing.quad)
|
|
35
|
+
});
|
|
36
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
|
|
37
|
+
src: "https://cdn.zync.ai/assets/static/swoosh.mp3",
|
|
38
|
+
volume: 0.25
|
|
39
|
+
}), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
40
|
+
style: {
|
|
41
|
+
backgroundColor: frameColor || "transparent",
|
|
42
|
+
padding: frameColor ? CHROME_PADDING : 0,
|
|
43
|
+
isolation: "isolate",
|
|
44
|
+
width: width,
|
|
45
|
+
height: height
|
|
46
|
+
}
|
|
47
|
+
}, faceMetadata ? /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
style: {
|
|
49
|
+
width: "100%",
|
|
50
|
+
height: "100%",
|
|
51
|
+
overflow: "hidden",
|
|
52
|
+
borderRadius: "30px",
|
|
53
|
+
// Disable dimming for virtual backgrounds
|
|
54
|
+
filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined,
|
|
55
|
+
transform: videoZoom > 1 ? "scale(".concat(videoZoomInterpolated, ")") : undefined
|
|
56
|
+
}
|
|
57
|
+
}, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
58
|
+
src: videoUrl,
|
|
59
|
+
startFrom: startVideoFrom,
|
|
60
|
+
containerWidth: width,
|
|
61
|
+
containerHeight: height,
|
|
62
|
+
faceMetadata: faceMetadata,
|
|
63
|
+
useAveragePosition: true,
|
|
64
|
+
centerHorizontally: false,
|
|
65
|
+
muted: muted
|
|
66
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
style: {
|
|
68
|
+
overflow: "hidden",
|
|
69
|
+
borderRadius: "30px",
|
|
70
|
+
width: "100%",
|
|
71
|
+
height: "100%",
|
|
72
|
+
// Disable dimming for virtual backgrounds
|
|
73
|
+
filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
76
|
+
startFrom: startVideoFrom,
|
|
77
|
+
src: videoUrl,
|
|
78
|
+
muted: muted,
|
|
79
|
+
style: {
|
|
80
|
+
position: "relative",
|
|
81
|
+
top: "50%",
|
|
82
|
+
height: "100%",
|
|
83
|
+
objectFit: "cover",
|
|
84
|
+
width: "100%",
|
|
85
|
+
borderRadius: "30px",
|
|
86
|
+
transform: videoZoom ? "translateY(-50%) scale(".concat(videoZoomInterpolated, ")") : undefined
|
|
87
|
+
}
|
|
88
|
+
})), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
89
|
+
style: {
|
|
90
|
+
margin: frameColor ? CHROME_PADDING : 0,
|
|
91
|
+
width: frameColor ? width - CHROME_PADDING * 2 : width,
|
|
92
|
+
height: frameColor ? height - CHROME_PADDING * 2 : height,
|
|
93
|
+
transform: videoZoom > 1 ? "scale(".concat(videoZoomInterpolated, ")") : undefined
|
|
94
|
+
}
|
|
95
|
+
}, showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackground, {
|
|
96
|
+
url: virtualBgUrl
|
|
97
|
+
}) : null), !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundBlur && noBackgroundVideoUrl ? /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
98
|
+
style: {
|
|
99
|
+
width: width,
|
|
100
|
+
height: height,
|
|
101
|
+
backdropFilter: "blur(10px)",
|
|
102
|
+
zIndex: 1
|
|
103
|
+
}
|
|
104
|
+
}) : 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, {
|
|
105
|
+
style: {
|
|
106
|
+
padding: frameColor ? CHROME_PADDING : 0,
|
|
107
|
+
isolation: "isolate",
|
|
108
|
+
width: width,
|
|
109
|
+
height: height,
|
|
110
|
+
zIndex: 9
|
|
111
|
+
}
|
|
112
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
style: {
|
|
114
|
+
width: "100%",
|
|
115
|
+
height: "100%",
|
|
116
|
+
overflow: "hidden",
|
|
117
|
+
borderRadius: "30px",
|
|
118
|
+
transform: videoZoom > 1 ? "scale(".concat(videoZoomInterpolated, ")") : undefined
|
|
119
|
+
}
|
|
120
|
+
}, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
121
|
+
src: noBackgroundVideoUrl,
|
|
122
|
+
startFrom: startVideoFrom,
|
|
123
|
+
containerWidth: width,
|
|
124
|
+
containerHeight: height,
|
|
125
|
+
faceMetadata: faceMetadata,
|
|
126
|
+
useAveragePosition: true,
|
|
127
|
+
centerHorizontally: false,
|
|
128
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects,
|
|
129
|
+
muted: true,
|
|
130
|
+
transparent: true
|
|
131
|
+
}))) : 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, {
|
|
132
|
+
style: {
|
|
133
|
+
backgroundColor: "transparent",
|
|
134
|
+
padding: frameColor ? CHROME_PADDING : 0,
|
|
135
|
+
isolation: "isolate",
|
|
136
|
+
width: width,
|
|
137
|
+
height: height,
|
|
138
|
+
zIndex: 9
|
|
139
|
+
}
|
|
140
|
+
}, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
141
|
+
style: {
|
|
142
|
+
overflow: "hidden",
|
|
143
|
+
borderRadius: "30px",
|
|
144
|
+
width: "100%",
|
|
145
|
+
height: "100%"
|
|
146
|
+
}
|
|
147
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
148
|
+
startFrom: startVideoFrom,
|
|
149
|
+
src: noBackgroundVideoUrl,
|
|
150
|
+
muted: true,
|
|
151
|
+
transparent: true,
|
|
152
|
+
style: {
|
|
153
|
+
position: "relative",
|
|
154
|
+
top: "50%",
|
|
155
|
+
height: "100%",
|
|
156
|
+
objectFit: "cover",
|
|
157
|
+
width: "100%",
|
|
158
|
+
borderRadius: "30px",
|
|
159
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined,
|
|
160
|
+
transform: videoZoom ? "translateY(-50%) scale(".concat(videoZoomInterpolated, ")") : undefined
|
|
161
|
+
}
|
|
162
|
+
}))) : null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
163
|
+
style: {
|
|
164
|
+
zIndex: 10
|
|
165
|
+
}
|
|
166
|
+
}, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
style: {
|
|
168
|
+
position: "fixed",
|
|
169
|
+
left: frameColor ? CHROME_PADDING : 25,
|
|
170
|
+
top: frameColor ? CHROME_PADDING : 25,
|
|
171
|
+
padding: 20,
|
|
172
|
+
zIndex: 11
|
|
173
|
+
}
|
|
174
|
+
}, /*#__PURE__*/React.createElement(PausableImg, {
|
|
175
|
+
delayRenderTimeoutInMilliseconds: 61000,
|
|
176
|
+
style: {
|
|
177
|
+
width: "225px",
|
|
178
|
+
maxHeight: "auto",
|
|
179
|
+
objectFit: "contain"
|
|
180
|
+
},
|
|
181
|
+
src: logoUrl
|
|
182
|
+
})) : null));
|
|
183
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AbsoluteFill, Img, OffthreadVideo, Audio, Easing, Sequence, useVideoConfig } from "remotion";
|
|
3
|
+
import { CHROME_PADDING } from "../../config.js";
|
|
4
|
+
import { useTimeInterpolate } from "../../hooks/useTimeInterpolate.js";
|
|
5
|
+
import FaceCenteredVideo from "../utils/FaceCenteredVideo";
|
|
6
|
+
import PausableImg from "../utils/PausableImg";
|
|
7
|
+
import { BlurOverlay } from "../utils/BlurOverlay";
|
|
8
|
+
import { useVirtualBackground } from "../../hooks/useVirtualBackground";
|
|
9
|
+
import { VirtualBackgroundUnderlay } from "../backgrounds/VirtualBackgroundUnderlay";
|
|
10
|
+
var BROLL_TIME_IN_FRAMES = 180;
|
|
11
|
+
export var SimpleFrameBroll = function SimpleFrameBroll(_ref) {
|
|
12
|
+
var videoUrl = _ref.videoUrl,
|
|
13
|
+
startVideoFrom = _ref.startVideoFrom,
|
|
14
|
+
durationInFrames = _ref.durationInFrames,
|
|
15
|
+
muted = _ref.muted,
|
|
16
|
+
frameColor = _ref.frameColor,
|
|
17
|
+
logoUrl = _ref.logoUrl,
|
|
18
|
+
videoZoom = _ref.videoZoom,
|
|
19
|
+
brollUrl = _ref.brollUrl,
|
|
20
|
+
children = _ref.children,
|
|
21
|
+
sourceVideoOrientation = _ref.sourceVideoOrientation,
|
|
22
|
+
_ref$disableTransitio = _ref.disableTransitionSounds,
|
|
23
|
+
disableTransitionSounds = _ref$disableTransitio === void 0 ? false : _ref$disableTransitio,
|
|
24
|
+
faceMetadata = _ref.faceMetadata,
|
|
25
|
+
noBackgroundVideoEffects = _ref.noBackgroundVideoEffects,
|
|
26
|
+
noBackgroundVideoUrl = _ref.noBackgroundVideoUrl;
|
|
27
|
+
var videoZoomInterpolated = useTimeInterpolate([0, 0.5], [1, videoZoom || 1], {
|
|
28
|
+
extrapolateRight: "clamp",
|
|
29
|
+
extrapolateLeft: "clamp",
|
|
30
|
+
easing: Easing["in"](Easing.quad)
|
|
31
|
+
});
|
|
32
|
+
var startFrame = durationInFrames / 2 - BROLL_TIME_IN_FRAMES / 2;
|
|
33
|
+
var _useVideoConfig = useVideoConfig(),
|
|
34
|
+
width = _useVideoConfig.width,
|
|
35
|
+
height = _useVideoConfig.height;
|
|
36
|
+
|
|
37
|
+
// Virtual background activation (only when we have a no-background overlay)
|
|
38
|
+
var _useVirtualBackground = useVirtualBackground(),
|
|
39
|
+
isVirtual = _useVirtualBackground.isVirtual,
|
|
40
|
+
virtualBgUrl = _useVirtualBackground.url;
|
|
41
|
+
var showVirtual = isVirtual && !!noBackgroundVideoUrl;
|
|
42
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disableTransitionSounds && /*#__PURE__*/React.createElement(Audio, {
|
|
43
|
+
src: "https://cdn.zync.ai/assets/static/swoosh.mp3",
|
|
44
|
+
volume: 0.25
|
|
45
|
+
}), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
46
|
+
style: {
|
|
47
|
+
backgroundColor: frameColor || "transparent",
|
|
48
|
+
padding: frameColor ? CHROME_PADDING : 0,
|
|
49
|
+
isolation: "isolate"
|
|
50
|
+
}
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
style: {
|
|
53
|
+
overflow: "hidden",
|
|
54
|
+
borderRadius: "30px",
|
|
55
|
+
width: "100%",
|
|
56
|
+
height: "100%"
|
|
57
|
+
}
|
|
58
|
+
}, faceMetadata ? /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
59
|
+
startFrom: startVideoFrom,
|
|
60
|
+
src: videoUrl,
|
|
61
|
+
faceMetadata: faceMetadata,
|
|
62
|
+
containerWidth: width,
|
|
63
|
+
containerHeight: height,
|
|
64
|
+
useAveragePosition: true,
|
|
65
|
+
centerHorizontally: false,
|
|
66
|
+
style: {
|
|
67
|
+
filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined
|
|
68
|
+
}
|
|
69
|
+
}) : /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
70
|
+
startFrom: startVideoFrom,
|
|
71
|
+
src: videoUrl,
|
|
72
|
+
muted: muted,
|
|
73
|
+
style: {
|
|
74
|
+
height: "100%",
|
|
75
|
+
objectFit: "cover",
|
|
76
|
+
width: "100%",
|
|
77
|
+
borderRadius: "30px",
|
|
78
|
+
objectPosition: sourceVideoOrientation === "portrait" ? "0% 30%" : undefined,
|
|
79
|
+
filter: !showVirtual && noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.backgroundDim && noBackgroundVideoUrl ? "brightness(0.7)" : undefined,
|
|
80
|
+
transform: videoZoom ? "scale(".concat(videoZoomInterpolated, ")") : undefined
|
|
81
|
+
}
|
|
82
|
+
})), showVirtual && virtualBgUrl ? /*#__PURE__*/React.createElement(VirtualBackgroundUnderlay, {
|
|
83
|
+
url: virtualBgUrl,
|
|
84
|
+
top: CHROME_PADDING,
|
|
85
|
+
left: CHROME_PADDING,
|
|
86
|
+
width: width - CHROME_PADDING * 2,
|
|
87
|
+
height: height - CHROME_PADDING * 2,
|
|
88
|
+
borderRadius: "30px",
|
|
89
|
+
zIndex: 2
|
|
90
|
+
}) : null, /*#__PURE__*/React.createElement(BlurOverlay, {
|
|
91
|
+
show: !showVirtual && (noBackgroundVideoEffects === null || noBackgroundVideoEffects === void 0 ? void 0 : noBackgroundVideoEffects.backgroundBlur) && noBackgroundVideoUrl,
|
|
92
|
+
width: width,
|
|
93
|
+
height: height,
|
|
94
|
+
zIndex: 1
|
|
95
|
+
}), 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, {
|
|
96
|
+
style: {
|
|
97
|
+
padding: frameColor ? CHROME_PADDING : 0,
|
|
98
|
+
isolation: "isolate",
|
|
99
|
+
width: width - CHROME_PADDING,
|
|
100
|
+
height: height,
|
|
101
|
+
zIndex: 9,
|
|
102
|
+
overflow: "hidden"
|
|
103
|
+
}
|
|
104
|
+
}, /*#__PURE__*/React.createElement(FaceCenteredVideo, {
|
|
105
|
+
src: noBackgroundVideoUrl,
|
|
106
|
+
startFrom: startVideoFrom,
|
|
107
|
+
containerWidth: width,
|
|
108
|
+
containerHeight: height,
|
|
109
|
+
faceMetadata: faceMetadata,
|
|
110
|
+
useAveragePosition: true,
|
|
111
|
+
centerHorizontally: false,
|
|
112
|
+
noBackgroundVideoEffects: noBackgroundVideoEffects,
|
|
113
|
+
transparent: true,
|
|
114
|
+
muted: true
|
|
115
|
+
})) : 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, {
|
|
116
|
+
style: {
|
|
117
|
+
backgroundColor: "transparent",
|
|
118
|
+
padding: frameColor ? CHROME_PADDING : 0,
|
|
119
|
+
isolation: "isolate",
|
|
120
|
+
width: width,
|
|
121
|
+
height: height,
|
|
122
|
+
overflow: "hidden",
|
|
123
|
+
zIndex: 9
|
|
124
|
+
}
|
|
125
|
+
}, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
126
|
+
style: {
|
|
127
|
+
overflow: "hidden",
|
|
128
|
+
borderRadius: "30px",
|
|
129
|
+
width: "100%",
|
|
130
|
+
height: "100%",
|
|
131
|
+
zIndex: 11
|
|
132
|
+
}
|
|
133
|
+
}, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
134
|
+
startFrom: startVideoFrom,
|
|
135
|
+
src: noBackgroundVideoUrl,
|
|
136
|
+
muted: true,
|
|
137
|
+
transparent: true,
|
|
138
|
+
style: {
|
|
139
|
+
position: "relative",
|
|
140
|
+
top: "50%",
|
|
141
|
+
height: "100%",
|
|
142
|
+
objectFit: "cover",
|
|
143
|
+
width: "100%",
|
|
144
|
+
borderRadius: "30px",
|
|
145
|
+
filter: noBackgroundVideoEffects !== null && noBackgroundVideoEffects !== void 0 && noBackgroundVideoEffects.facePop ? "brightness(1.1) contrast(1.15) saturate(1.05)" : undefined,
|
|
146
|
+
transform: videoZoom ? "translateY(-50%) scale(".concat(videoZoomInterpolated, ")") : "translateY(-50%)"
|
|
147
|
+
}
|
|
148
|
+
}))) : null, durationInFrames > BROLL_TIME_IN_FRAMES && brollUrl ? /*#__PURE__*/React.createElement(Sequence, {
|
|
149
|
+
from: startFrame,
|
|
150
|
+
durationInFrames: BROLL_TIME_IN_FRAMES
|
|
151
|
+
}, /*#__PURE__*/React.createElement(AbsoluteFill, null, /*#__PURE__*/React.createElement(OffthreadVideo, {
|
|
152
|
+
src: brollUrl,
|
|
153
|
+
style: {
|
|
154
|
+
zIndex: 10,
|
|
155
|
+
width: "100%",
|
|
156
|
+
height: "100%",
|
|
157
|
+
objectFit: "cover"
|
|
158
|
+
},
|
|
159
|
+
muted: true
|
|
160
|
+
}))) : null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
161
|
+
style: {
|
|
162
|
+
zIndex: 10
|
|
163
|
+
}
|
|
164
|
+
}, children), logoUrl ? /*#__PURE__*/React.createElement("div", {
|
|
165
|
+
style: {
|
|
166
|
+
position: "fixed",
|
|
167
|
+
left: frameColor ? CHROME_PADDING : 25,
|
|
168
|
+
top: frameColor ? CHROME_PADDING : 25,
|
|
169
|
+
padding: 20,
|
|
170
|
+
zIndex: 11
|
|
171
|
+
}
|
|
172
|
+
}, /*#__PURE__*/React.createElement(PausableImg, {
|
|
173
|
+
delayRenderTimeoutInMilliseconds: 61000,
|
|
174
|
+
style: {
|
|
175
|
+
width: "225px",
|
|
176
|
+
maxHeight: "auto",
|
|
177
|
+
objectFit: "contain"
|
|
178
|
+
},
|
|
179
|
+
src: logoUrl
|
|
180
|
+
})) : null));
|
|
181
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Sentence } from "../effects/Sentence";
|
|
4
|
+
import { SimpleFrame } from "./SimpleFrame";
|
|
5
|
+
import { useVideoConfig } from "remotion";
|
|
6
|
+
import { KeyPointOverlayDepth } from "./KeyPointOverlayDepth";
|
|
7
|
+
export var SimpleFrameSentence = function SimpleFrameSentence(props) {
|
|
8
|
+
if (props.theme === "depth") {
|
|
9
|
+
return /*#__PURE__*/React.createElement(KeyPointOverlayDepth, _extends({
|
|
10
|
+
sentence: props.sentenceText
|
|
11
|
+
}, props));
|
|
12
|
+
}
|
|
13
|
+
return /*#__PURE__*/React.createElement(SimpleFrame, props, /*#__PURE__*/React.createElement(Sentence, {
|
|
14
|
+
theme: props.theme,
|
|
15
|
+
sentence: props.sentenceText
|
|
16
|
+
}), props.children);
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var _excluded = ["children"];
|
|
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 _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { SimpleFrame } from "./SimpleFrame";
|
|
7
|
+
export var SimpleFrameZoomCut = function SimpleFrameZoomCut(_ref) {
|
|
8
|
+
var children = _ref.children,
|
|
9
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
+
return /*#__PURE__*/React.createElement(SimpleFrame, _extends({}, props, {
|
|
11
|
+
videoZoom: 1.2
|
|
12
|
+
}), children);
|
|
13
|
+
};
|