@zync/zync-screnplay-player 0.1.234 → 0.1.236

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.
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { AbsoluteFill, Audio, Easing, interpolate, OffthreadVideo, useCurrentFrame, useVideoConfig, Video } from "remotion";
3
3
  import { useOrientationBased } from "../../hooks/useOrientationBased.js";
4
+ import { useTheme } from "../../theme/hooks/useTheme.js";
4
5
  import FaceCenteredVideo from "../utils/FaceCenteredVideo";
5
6
  var ANIMATION_SECONDS = 1.2;
6
7
  var INSET_ASPECT_RATIO = 9 / 16;
@@ -66,7 +67,7 @@ var SourceVideo = function SourceVideo(_ref2) {
66
67
  }
67
68
  });
68
69
  };
69
- var VideoInsetContent = function VideoInsetContent(_ref3) {
70
+ var BrollInsetContent = function BrollInsetContent(_ref3) {
70
71
  var brollUrl = _ref3.brollUrl,
71
72
  children = _ref3.children,
72
73
  disableTransitionSounds = _ref3.disableTransitionSounds,
@@ -74,7 +75,6 @@ var VideoInsetContent = function VideoInsetContent(_ref3) {
74
75
  frameColor = _ref3.frameColor,
75
76
  height = _ref3.height,
76
77
  noBackgroundVideoEffects = _ref3.noBackgroundVideoEffects,
77
- noBackgroundVideoUrl = _ref3.noBackgroundVideoUrl,
78
78
  outputOrientation = _ref3.outputOrientation,
79
79
  sourceVideoOrientation = _ref3.sourceVideoOrientation,
80
80
  startVideoFrom = _ref3.startVideoFrom,
@@ -89,8 +89,8 @@ var VideoInsetContent = function VideoInsetContent(_ref3) {
89
89
  extrapolateLeft: "clamp",
90
90
  extrapolateRight: "clamp"
91
91
  });
92
- var sourceSrc = noBackgroundVideoUrl || videoUrl;
93
- var sourceTransparent = Boolean(noBackgroundVideoUrl);
92
+ var _useTheme = useTheme(),
93
+ accentColor = _useTheme.accentColor;
94
94
  var inset = getInsetMetrics({
95
95
  width: width,
96
96
  height: height,
@@ -123,11 +123,13 @@ var VideoInsetContent = function VideoInsetContent(_ref3) {
123
123
  }) : null, /*#__PURE__*/React.createElement("div", {
124
124
  style: {
125
125
  borderRadius: sourceBorderRadius,
126
+ border: accentColor ? "4px solid ".concat(accentColor) : undefined,
126
127
  boxShadow: progress > 0 ? "0 ".concat(16 * progress, "px ").concat(44 * progress, "px rgba(0, 0, 0, ").concat(0.34 * progress, ")") : undefined,
127
128
  height: sourceHeight,
128
129
  left: sourceLeft,
129
130
  overflow: "hidden",
130
131
  position: "absolute",
132
+ boxSizing: "border-box",
131
133
  top: sourceTop,
132
134
  width: sourceWidth,
133
135
  zIndex: 2
@@ -137,9 +139,9 @@ var VideoInsetContent = function VideoInsetContent(_ref3) {
137
139
  height: sourceHeight,
138
140
  noBackgroundVideoEffects: noBackgroundVideoEffects,
139
141
  sourceVideoOrientation: sourceVideoOrientation,
140
- src: sourceSrc,
142
+ src: videoUrl,
141
143
  startVideoFrom: startVideoFrom,
142
- transparent: sourceTransparent,
144
+ transparent: false,
143
145
  width: sourceWidth
144
146
  })), /*#__PURE__*/React.createElement(AbsoluteFill, {
145
147
  style: {
@@ -147,7 +149,7 @@ var VideoInsetContent = function VideoInsetContent(_ref3) {
147
149
  }
148
150
  }, children)));
149
151
  };
150
- export var VideoInset = function VideoInset(_ref4) {
152
+ export var BrollInset = function BrollInset(_ref4) {
151
153
  var _compositionProps$out, _window, _window$screenplayPro, _window$screenplayPro2;
152
154
  var brollUrl = _ref4.brollUrl,
153
155
  children = _ref4.children,
@@ -156,7 +158,6 @@ export var VideoInset = function VideoInset(_ref4) {
156
158
  faceMetadata = _ref4.faceMetadata,
157
159
  frameColor = _ref4.frameColor,
158
160
  noBackgroundVideoEffects = _ref4.noBackgroundVideoEffects,
159
- noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl,
160
161
  sourceVideoOrientation = _ref4.sourceVideoOrientation,
161
162
  startVideoFrom = _ref4.startVideoFrom,
162
163
  _ref4$useSquareInLand = _ref4.useSquareInLandscape,
@@ -186,14 +187,13 @@ export var VideoInset = function VideoInset(_ref4) {
186
187
  }
187
188
  }, orientationOverride),
188
189
  activeOrientation = _useOrientationBased.activeOrientation;
189
- var content = /*#__PURE__*/React.createElement(VideoInsetContent, {
190
+ var content = /*#__PURE__*/React.createElement(BrollInsetContent, {
190
191
  brollUrl: brollUrl,
191
192
  disableTransitionSounds: disableTransitionSounds,
192
193
  faceMetadata: faceMetadata,
193
194
  frameColor: frameColor,
194
195
  height: height,
195
196
  noBackgroundVideoEffects: noBackgroundVideoEffects,
196
- noBackgroundVideoUrl: noBackgroundVideoUrl,
197
197
  outputOrientation: activeOrientation,
198
198
  sourceVideoOrientation: sourceVideoOrientation,
199
199
  startVideoFrom: startVideoFrom,
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { AbsoluteFill, Audio, Easing, Img, interpolate, OffthreadVideo, useCurrentFrame, useVideoConfig } from "remotion";
3
3
  import { useOrientationBased } from "../../hooks/useOrientationBased.js";
4
+ import { useTheme } from "../../theme/hooks/useTheme.js";
4
5
  import FaceCenteredVideo from "../utils/FaceCenteredVideo";
5
6
  var ANIMATION_SECONDS = 1.2;
6
7
  var INSET_ASPECT_RATIO = 9 / 16;
@@ -66,7 +67,7 @@ var SourceVideo = function SourceVideo(_ref2) {
66
67
  }
67
68
  });
68
69
  };
69
- var ImageInsetContent = function ImageInsetContent(_ref3) {
70
+ var MotionStillInsetContent = function MotionStillInsetContent(_ref3) {
70
71
  var children = _ref3.children,
71
72
  disableTransitionSounds = _ref3.disableTransitionSounds,
72
73
  durationInFrames = _ref3.durationInFrames,
@@ -75,7 +76,6 @@ var ImageInsetContent = function ImageInsetContent(_ref3) {
75
76
  height = _ref3.height,
76
77
  imageUrl = _ref3.imageUrl,
77
78
  noBackgroundVideoEffects = _ref3.noBackgroundVideoEffects,
78
- noBackgroundVideoUrl = _ref3.noBackgroundVideoUrl,
79
79
  outputOrientation = _ref3.outputOrientation,
80
80
  sourceVideoOrientation = _ref3.sourceVideoOrientation,
81
81
  startVideoFrom = _ref3.startVideoFrom,
@@ -90,8 +90,8 @@ var ImageInsetContent = function ImageInsetContent(_ref3) {
90
90
  extrapolateLeft: "clamp",
91
91
  extrapolateRight: "clamp"
92
92
  });
93
- var sourceSrc = noBackgroundVideoUrl || videoUrl;
94
- var sourceTransparent = Boolean(noBackgroundVideoUrl);
93
+ var _useTheme = useTheme(),
94
+ accentColor = _useTheme.accentColor;
95
95
  var inset = getInsetMetrics({
96
96
  width: width,
97
97
  height: height,
@@ -132,11 +132,13 @@ var ImageInsetContent = function ImageInsetContent(_ref3) {
132
132
  }) : null, /*#__PURE__*/React.createElement("div", {
133
133
  style: {
134
134
  borderRadius: sourceBorderRadius,
135
+ border: accentColor ? "4px solid ".concat(accentColor) : undefined,
135
136
  boxShadow: progress > 0 ? "0 ".concat(16 * progress, "px ").concat(44 * progress, "px rgba(0, 0, 0, ").concat(0.34 * progress, ")") : undefined,
136
137
  height: sourceHeight,
137
138
  left: sourceLeft,
138
139
  overflow: "hidden",
139
140
  position: "absolute",
141
+ boxSizing: "border-box",
140
142
  top: sourceTop,
141
143
  width: sourceWidth,
142
144
  zIndex: 2
@@ -146,9 +148,9 @@ var ImageInsetContent = function ImageInsetContent(_ref3) {
146
148
  height: sourceHeight,
147
149
  noBackgroundVideoEffects: noBackgroundVideoEffects,
148
150
  sourceVideoOrientation: sourceVideoOrientation,
149
- src: sourceSrc,
151
+ src: videoUrl,
150
152
  startVideoFrom: startVideoFrom,
151
- transparent: sourceTransparent,
153
+ transparent: false,
152
154
  width: sourceWidth
153
155
  })), /*#__PURE__*/React.createElement(AbsoluteFill, {
154
156
  style: {
@@ -156,7 +158,7 @@ var ImageInsetContent = function ImageInsetContent(_ref3) {
156
158
  }
157
159
  }, children)));
158
160
  };
159
- export var ImageInset = function ImageInset(_ref4) {
161
+ export var MotionStillInset = function MotionStillInset(_ref4) {
160
162
  var _compositionProps$out, _window, _window$screenplayPro, _window$screenplayPro2;
161
163
  var children = _ref4.children,
162
164
  _ref4$disableTransiti = _ref4.disableTransitionSounds,
@@ -166,7 +168,6 @@ export var ImageInset = function ImageInset(_ref4) {
166
168
  frameColor = _ref4.frameColor,
167
169
  imageUrl = _ref4.imageUrl,
168
170
  noBackgroundVideoEffects = _ref4.noBackgroundVideoEffects,
169
- noBackgroundVideoUrl = _ref4.noBackgroundVideoUrl,
170
171
  sourceVideoOrientation = _ref4.sourceVideoOrientation,
171
172
  startVideoFrom = _ref4.startVideoFrom,
172
173
  _ref4$useSquareInLand = _ref4.useSquareInLandscape,
@@ -196,7 +197,7 @@ export var ImageInset = function ImageInset(_ref4) {
196
197
  }
197
198
  }, orientationOverride),
198
199
  activeOrientation = _useOrientationBased.activeOrientation;
199
- var content = /*#__PURE__*/React.createElement(ImageInsetContent, {
200
+ var content = /*#__PURE__*/React.createElement(MotionStillInsetContent, {
200
201
  disableTransitionSounds: disableTransitionSounds,
201
202
  durationInFrames: durationInFrames,
202
203
  faceMetadata: faceMetadata,
@@ -204,7 +205,6 @@ export var ImageInset = function ImageInset(_ref4) {
204
205
  height: height,
205
206
  imageUrl: imageUrl,
206
207
  noBackgroundVideoEffects: noBackgroundVideoEffects,
207
- noBackgroundVideoUrl: noBackgroundVideoUrl,
208
208
  outputOrientation: activeOrientation,
209
209
  sourceVideoOrientation: sourceVideoOrientation,
210
210
  startVideoFrom: startVideoFrom,
@@ -911,7 +911,7 @@ var renderer = new RemotionRenderer({
911
911
  }, {
912
912
  recordingIndex: 1,
913
913
  layout: {
914
- type: "video_inset",
914
+ type: "broll_inset",
915
915
  data: {
916
916
  noBackgroundVideoEffects: {
917
917
  facePop: false,
@@ -1407,7 +1407,7 @@ var renderer = new RemotionRenderer({
1407
1407
  }, {
1408
1408
  recordingIndex: 3,
1409
1409
  layout: {
1410
- type: "image_inset",
1410
+ type: "motion_still_inset",
1411
1411
  data: {
1412
1412
  noBackgroundVideoEffects: {
1413
1413
  facePop: false,
@@ -41,7 +41,7 @@ export var LayoutFactory = /*#__PURE__*/function () {
41
41
  case "broll_split_screen":
42
42
  case "broll_green_screen":
43
43
  case "broll_studio_backdrop":
44
- case "video_inset":
44
+ case "broll_inset":
45
45
  case "key_point_overlay_depth":
46
46
  case "simple_frame":
47
47
  {
@@ -91,7 +91,7 @@ export var LayoutFactory = /*#__PURE__*/function () {
91
91
  case "motion_still":
92
92
  case "motion_still_green_screen":
93
93
  case "motion_still_full_screen":
94
- case "image_inset":
94
+ case "motion_still_inset":
95
95
  case "motion_still_studio_backdrop":
96
96
  {
97
97
  layout = new MotionStillLayout(props).flatten();
@@ -45,8 +45,8 @@ import { DynamicTriangle } from "./components/layouts/DynamicTriangle";
45
45
  import { KeywordStudioBackdrop } from "./components/layouts/KeywordStudioBackdrop";
46
46
  import { MotionStillGreenScreenV2 } from "./components/layouts/MotionStillGreenScreenV2";
47
47
  import { HookVideo } from "./components/layouts/HookVideo";
48
- import { VideoInset } from "./components/layouts/VideoInset";
49
- import { ImageInset } from "./components/layouts/ImageInset";
48
+ import { BrollInset } from "./components/layouts/BrollInset";
49
+ import { MotionStillInset } from "./components/layouts/MotionStillInset";
50
50
 
51
51
  /** Update this so that Remotion knows which component to render when it is passed via screenplay. Ex. "title" will have rendered "Title" component
52
52
  * Here we are mapping directly types and component names. Types are snake_case and components PascalCase.
@@ -80,8 +80,8 @@ export var RegisteredComponents = {
80
80
  KeyPointOverlayDepth: KeyPointOverlayDepth,
81
81
  DynamicTriangle: DynamicTriangle,
82
82
  HookVideo: HookVideo,
83
- VideoInset: VideoInset,
84
- ImageInset: ImageInset,
83
+ BrollInset: BrollInset,
84
+ MotionStillInset: MotionStillInset,
85
85
  //effects
86
86
  BrollFullscreen: BrollFullscreen,
87
87
  PhraseRainbowEffect: PhraseRainbowEffect,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zync/zync-screnplay-player",
3
- "version": "0.1.234",
3
+ "version": "0.1.236",
4
4
  "files": [
5
5
  "dist"
6
6
  ],