@zync/zync-screnplay-player 0.1.252 → 0.1.253
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/bundle.js +1 -1
- package/dist/bundle.js.LICENSE.txt +24 -0
- package/dist/screenplay/RemotionRenderer/RemotionRenderer.js +9 -1
- package/dist/screenplay/RemotionRenderer/assets/wordObjects/emojiCatalog.json +1 -0
- package/dist/screenplay/RemotionRenderer/components/effects/CaptionWordObjectOverlay.js +36 -4
- package/dist/screenplay/RemotionRenderer/helpers/captionWordObjectGeometry.js +12 -8
- package/dist/screenplay/RemotionRenderer/helpers/captionWordObjects.js +42 -11
- package/dist/screenplay/RemotionRenderer/helpers/emojiCatalog.js +17 -0
- package/dist/screenplay/RemotionRenderer/helpers/loadWordObjectArtwork.js +56 -0
- package/package.json +1 -1
|
@@ -1 +1,25 @@
|
|
|
1
|
+
/*! Fluent Emoji artwork
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) Microsoft Corporation.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE
|
|
23
|
+
*/
|
|
24
|
+
|
|
1
25
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
@@ -9,6 +9,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
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
11
|
import { prepareCaptionWordObjects } from "./helpers/captionWordObjects.js";
|
|
12
|
+
import { getWordObjectArtwork, isCatalogEmoji } from "./helpers/emojiCatalog.js";
|
|
12
13
|
import { applyLogoVisibility } from "./helpers/applyLogoVisibility.js";
|
|
13
14
|
import { screenplaySchema } from "./main/screenplaySchema.js";
|
|
14
15
|
import { LayoutFactory } from "./main/lib/layouts/LayoutFactory.js";
|
|
@@ -164,6 +165,9 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
164
165
|
_screenplayLayout$dat5,
|
|
165
166
|
_screenplayLayout$dat6;
|
|
166
167
|
var trimLeft = (screenplayLayout === null || screenplayLayout === void 0 ? void 0 : (_screenplayLayout$dat = screenplayLayout.data) === null || _screenplayLayout$dat === void 0 ? void 0 : _screenplayLayout$dat.trimLeft) || 0;
|
|
168
|
+
// Only these layouts use the full-canvas face projection below. Other
|
|
169
|
+
// layouts still animate objects without assuming a full-canvas face crop.
|
|
170
|
+
var hasFullFrameVideo = ["simple_frame", "simple_frame_zoom_cut"].includes(screenplayLayout === null || screenplayLayout === void 0 ? void 0 : screenplayLayout.type);
|
|
167
171
|
var segmentOffset = Number(screenPlaySegment === null || screenPlaySegment === void 0 ? void 0 : (_screenPlaySegment$da23 = screenPlaySegment.data) === null || _screenPlaySegment$da23 === void 0 ? void 0 : _screenPlaySegment$da23.offset);
|
|
168
172
|
var from = Number.isFinite(segmentOffset) ? this.fps * (segmentOffset + trimLeft) : 0;
|
|
169
173
|
var transcripts = screenPlaySegment.data.transcript_text;
|
|
@@ -178,7 +182,11 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
178
182
|
from: transcriptFrom,
|
|
179
183
|
durationInFrames: transcriptDurationInFrames,
|
|
180
184
|
punctuations: transcript.punctuations ? transcript.punctuations.map(function (p) {
|
|
185
|
+
var _p$wordObject;
|
|
181
186
|
return _objectSpread(_objectSpread({}, p), {}, {
|
|
187
|
+
// Private URLs are always rebuilt from our catalog, never saved input.
|
|
188
|
+
__wordObjectImageUrl: p.__wordObjectDurationInFrames && isCatalogEmoji((_p$wordObject = p.wordObject) === null || _p$wordObject === void 0 ? void 0 : _p$wordObject.assetId) ? getWordObjectArtwork(p.wordObject.assetId) : undefined,
|
|
189
|
+
__wordObjectImageUnavailable: undefined,
|
|
182
190
|
start: toFrames(_this2.fps * (p.start - trimLeft)),
|
|
183
191
|
end: toFrames(_this2.fps * (p.end - trimLeft))
|
|
184
192
|
});
|
|
@@ -193,7 +201,7 @@ export var RemotionRenderer = /*#__PURE__*/function () {
|
|
|
193
201
|
theme: screenPlaySegment.theme,
|
|
194
202
|
color: screenPlaySegment.data.color,
|
|
195
203
|
wordObjectGeometry: screenplayLayout ? {
|
|
196
|
-
faceMetadata: (_screenplayLayout$dat2 = screenplayLayout.data) === null || _screenplayLayout$dat2 === void 0 ? void 0 : (_screenplayLayout$dat3 = _screenplayLayout$dat2.noBackgroundVideo) === null || _screenplayLayout$dat3 === void 0 ? void 0 : _screenplayLayout$dat3.faceMetadata,
|
|
204
|
+
faceMetadata: hasFullFrameVideo ? (_screenplayLayout$dat2 = screenplayLayout.data) === null || _screenplayLayout$dat2 === void 0 ? void 0 : (_screenplayLayout$dat3 = _screenplayLayout$dat2.noBackgroundVideo) === null || _screenplayLayout$dat3 === void 0 ? void 0 : _screenplayLayout$dat3.faceMetadata : undefined,
|
|
197
205
|
videoZoom: screenplayLayout.type === "simple_frame_zoom_cut" ? 1.2 : ((_screenplayLayout$dat4 = screenplayLayout.data) === null || _screenplayLayout$dat4 === void 0 ? void 0 : (_screenplayLayout$dat5 = _screenplayLayout$dat4.sourceVideo) === null || _screenplayLayout$dat5 === void 0 ? void 0 : _screenplayLayout$dat5.zoom) || 1,
|
|
198
206
|
framePadding: (_screenplayLayout$dat6 = screenplayLayout.data) !== null && _screenplayLayout$dat6 !== void 0 && _screenplayLayout$dat6.frameColor ? 30 : 0
|
|
199
207
|
} : undefined
|