@remotion/promo-pages 4.0.458 → 4.0.460
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/Homepage.js +362 -257
- package/dist/design.js +204 -143
- package/dist/experts.js +201 -140
- package/dist/homepage/Pricing.js +204 -143
- package/dist/prompts/PromptsGallery.js +208 -147
- package/dist/prompts/PromptsShow.js +240 -179
- package/dist/prompts/PromptsSubmit.js +240 -179
- package/dist/team.js +204 -143
- package/dist/template-modal-content.js +213 -152
- package/dist/templates.js +205 -143
- package/package.json +13 -13
|
@@ -45,7 +45,7 @@ __export(exports_vidstack_CZgUA94N, {
|
|
|
45
45
|
useSignal: () => useSignal,
|
|
46
46
|
useReactScope: () => useReactScope,
|
|
47
47
|
useReactContext: () => useReactContext,
|
|
48
|
-
useContext: () =>
|
|
48
|
+
useContext: () => useContext44,
|
|
49
49
|
uppercaseFirstChar: () => uppercaseFirstChar,
|
|
50
50
|
untrack: () => untrack,
|
|
51
51
|
toggleClass: () => toggleClass,
|
|
@@ -92,7 +92,7 @@ __export(exports_vidstack_CZgUA94N, {
|
|
|
92
92
|
createScope: () => createScope,
|
|
93
93
|
createReactComponent: () => createReactComponent,
|
|
94
94
|
createDisposalBin: () => createDisposalBin,
|
|
95
|
-
createContext: () =>
|
|
95
|
+
createContext: () => createContext33,
|
|
96
96
|
computed: () => computed,
|
|
97
97
|
composeRefs: () => composeRefs3,
|
|
98
98
|
chromecast: () => chromecast,
|
|
@@ -612,14 +612,14 @@ function unwrapDeep(fn) {
|
|
|
612
612
|
value = value.call(this);
|
|
613
613
|
return value;
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function createContext33(provide) {
|
|
616
616
|
return { id: Symbol(), provide };
|
|
617
617
|
}
|
|
618
618
|
function provideContext(context, value, scope = getScope()) {
|
|
619
619
|
const hasProvidedValue = !isUndefined(value);
|
|
620
620
|
setContext(context.id, hasProvidedValue ? value : context.provide?.(), scope);
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function useContext44(context) {
|
|
623
623
|
const value = getContext(context.id);
|
|
624
624
|
return value;
|
|
625
625
|
}
|
|
@@ -679,7 +679,7 @@ class State {
|
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
function useState41(state) {
|
|
682
|
-
return
|
|
682
|
+
return useContext44(state);
|
|
683
683
|
}
|
|
684
684
|
function camelToKebabCase(str) {
|
|
685
685
|
return str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -7061,7 +7061,7 @@ function boundTime(time, store) {
|
|
|
7061
7061
|
return Math.min(Math.max(store.seekableStart() + 0.1, clippedTime), store.seekableEnd() - 0.1);
|
|
7062
7062
|
}
|
|
7063
7063
|
function useMediaContext() {
|
|
7064
|
-
return
|
|
7064
|
+
return useContext44(mediaContext);
|
|
7065
7065
|
}
|
|
7066
7066
|
|
|
7067
7067
|
class MediaRemoteControl {
|
|
@@ -10487,7 +10487,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
10487
10487
|
"started",
|
|
10488
10488
|
"userBehindLiveEdge"
|
|
10489
10489
|
]);
|
|
10490
|
-
mediaContext =
|
|
10490
|
+
mediaContext = createContext33();
|
|
10491
10491
|
ADD = Symbol(0);
|
|
10492
10492
|
REMOVE = Symbol(0);
|
|
10493
10493
|
RESET = Symbol(0);
|
|
@@ -13889,7 +13889,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
13889
13889
|
this.#showTimerId = -1;
|
|
13890
13890
|
}
|
|
13891
13891
|
};
|
|
13892
|
-
tooltipContext =
|
|
13892
|
+
tooltipContext = createContext33();
|
|
13893
13893
|
Tooltip = class Tooltip extends Component {
|
|
13894
13894
|
static props = {
|
|
13895
13895
|
showDelay: 700
|
|
@@ -13976,7 +13976,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
13976
13976
|
if (!this.connectScope)
|
|
13977
13977
|
return;
|
|
13978
13978
|
this.#attach();
|
|
13979
|
-
const tooltip =
|
|
13979
|
+
const tooltip = useContext44(tooltipContext);
|
|
13980
13980
|
onDispose(() => {
|
|
13981
13981
|
const button = this.#getButton();
|
|
13982
13982
|
button && tooltip.detachTrigger(button);
|
|
@@ -13984,7 +13984,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
13984
13984
|
}));
|
|
13985
13985
|
}
|
|
13986
13986
|
#attach() {
|
|
13987
|
-
const button = this.#getButton(), tooltip =
|
|
13987
|
+
const button = this.#getButton(), tooltip = useContext44(tooltipContext);
|
|
13988
13988
|
button && tooltip.attachTrigger(button);
|
|
13989
13989
|
}
|
|
13990
13990
|
#getButton() {
|
|
@@ -14017,7 +14017,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14017
14017
|
}
|
|
14018
14018
|
onConnect(el) {
|
|
14019
14019
|
this.#attach(el);
|
|
14020
|
-
const tooltip =
|
|
14020
|
+
const tooltip = useContext44(tooltipContext);
|
|
14021
14021
|
onDispose(() => tooltip.detachContent(el));
|
|
14022
14022
|
onDispose(requestScopedAnimationFrame(() => {
|
|
14023
14023
|
if (!this.connectScope)
|
|
@@ -14026,11 +14026,11 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14026
14026
|
}));
|
|
14027
14027
|
}
|
|
14028
14028
|
#attach(el) {
|
|
14029
|
-
const tooltip =
|
|
14029
|
+
const tooltip = useContext44(tooltipContext);
|
|
14030
14030
|
tooltip.attachContent(el);
|
|
14031
14031
|
}
|
|
14032
14032
|
#watchPlacement() {
|
|
14033
|
-
const { showing } =
|
|
14033
|
+
const { showing } = useContext44(tooltipContext);
|
|
14034
14034
|
if (!showing())
|
|
14035
14035
|
return;
|
|
14036
14036
|
const { placement, offset: mainOffset, alignOffset } = this.$props;
|
|
@@ -14041,7 +14041,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14041
14041
|
});
|
|
14042
14042
|
}
|
|
14043
14043
|
#getTrigger() {
|
|
14044
|
-
return
|
|
14044
|
+
return useContext44(tooltipContext).trigger();
|
|
14045
14045
|
}
|
|
14046
14046
|
};
|
|
14047
14047
|
ToggleButtonController = class ToggleButtonController extends ViewController {
|
|
@@ -14514,8 +14514,8 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14514
14514
|
this.#observer = undefined;
|
|
14515
14515
|
}
|
|
14516
14516
|
};
|
|
14517
|
-
sliderContext =
|
|
14518
|
-
sliderObserverContext =
|
|
14517
|
+
sliderContext = createContext33();
|
|
14518
|
+
sliderObserverContext = createContext33();
|
|
14519
14519
|
SliderKeyDirection = {
|
|
14520
14520
|
Left: -1,
|
|
14521
14521
|
ArrowLeft: -1,
|
|
@@ -14537,7 +14537,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14537
14537
|
}
|
|
14538
14538
|
onSetup() {
|
|
14539
14539
|
if (hasProvidedContext(sliderObserverContext)) {
|
|
14540
|
-
this.#observer =
|
|
14540
|
+
this.#observer = useContext44(sliderObserverContext);
|
|
14541
14541
|
}
|
|
14542
14542
|
}
|
|
14543
14543
|
onConnect(el) {
|
|
@@ -14746,7 +14746,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14746
14746
|
this.#updatePointerValue(this.#getPointerValue(event2), event2);
|
|
14747
14747
|
}, 20, { leading: true });
|
|
14748
14748
|
};
|
|
14749
|
-
sliderValueFormatContext =
|
|
14749
|
+
sliderValueFormatContext = createContext33(() => ({}));
|
|
14750
14750
|
SliderController = class SliderController extends ViewController {
|
|
14751
14751
|
static props = {
|
|
14752
14752
|
hidden: false,
|
|
@@ -15153,7 +15153,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15153
15153
|
#slider;
|
|
15154
15154
|
onSetup() {
|
|
15155
15155
|
this.#slider = useState41(Slider.state);
|
|
15156
|
-
this.#format =
|
|
15156
|
+
this.#format = useContext44(sliderValueFormatContext);
|
|
15157
15157
|
this.#text = computed(this.getValueText.bind(this));
|
|
15158
15158
|
}
|
|
15159
15159
|
getValueText() {
|
|
@@ -15192,7 +15192,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15192
15192
|
};
|
|
15193
15193
|
#slider;
|
|
15194
15194
|
onSetup() {
|
|
15195
|
-
this.#slider =
|
|
15195
|
+
this.#slider = useContext44(sliderContext);
|
|
15196
15196
|
const { active } = useState41(Slider.state);
|
|
15197
15197
|
this.setAttributes({
|
|
15198
15198
|
"data-visible": active
|
|
@@ -15620,7 +15620,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15620
15620
|
}
|
|
15621
15621
|
}
|
|
15622
15622
|
#watchPreviewing() {
|
|
15623
|
-
const player = this.#media.player.el, { preview } =
|
|
15623
|
+
const player = this.#media.player.el, { preview } = useContext44(sliderContext);
|
|
15624
15624
|
player && preview() && setAttribute(player, "data-preview", this.$state.active());
|
|
15625
15625
|
}
|
|
15626
15626
|
#seeking(time, event2) {
|
|
@@ -15974,7 +15974,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15974
15974
|
prop(sliderchapters__proto, "activeCue");
|
|
15975
15975
|
prop(sliderchapters__proto, "activePointerCue");
|
|
15976
15976
|
method(sliderchapters__proto, "setRefs");
|
|
15977
|
-
menuContext =
|
|
15977
|
+
menuContext = createContext33();
|
|
15978
15978
|
FOCUSABLE_ELEMENTS_SELECTOR = /* @__PURE__ */ [
|
|
15979
15979
|
"a[href]",
|
|
15980
15980
|
"[tabindex]",
|
|
@@ -16058,7 +16058,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16058
16058
|
closeMenu: this.close.bind(this)
|
|
16059
16059
|
});
|
|
16060
16060
|
if (hasProvidedContext(menuContext)) {
|
|
16061
|
-
this.#parentMenu =
|
|
16061
|
+
this.#parentMenu = useContext44(menuContext);
|
|
16062
16062
|
}
|
|
16063
16063
|
this.#observeSliders();
|
|
16064
16064
|
this.setAttributes({
|
|
@@ -16103,7 +16103,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16103
16103
|
this.#transitionCallbacks.clear();
|
|
16104
16104
|
}
|
|
16105
16105
|
#observeSliders() {
|
|
16106
|
-
let sliderActiveTimer = -1, parentSliderObserver = hasProvidedContext(sliderObserverContext) ?
|
|
16106
|
+
let sliderActiveTimer = -1, parentSliderObserver = hasProvidedContext(sliderObserverContext) ? useContext44(sliderObserverContext) : null;
|
|
16107
16107
|
provideContext(sliderObserverContext, {
|
|
16108
16108
|
onDragStart: () => {
|
|
16109
16109
|
parentSliderObserver?.onDragStart?.();
|
|
@@ -16430,7 +16430,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16430
16430
|
new FocusVisibleController;
|
|
16431
16431
|
}
|
|
16432
16432
|
onSetup() {
|
|
16433
|
-
this.#menu =
|
|
16433
|
+
this.#menu = useContext44(menuContext);
|
|
16434
16434
|
}
|
|
16435
16435
|
onAttach(el) {
|
|
16436
16436
|
this.#menu.attachMenuButton(this);
|
|
@@ -16529,7 +16529,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16529
16529
|
return selector ? document.querySelector(selector) : document.body;
|
|
16530
16530
|
}
|
|
16531
16531
|
};
|
|
16532
|
-
menuPortalContext =
|
|
16532
|
+
menuPortalContext = createContext33();
|
|
16533
16533
|
MenuItems = class MenuItems extends Component {
|
|
16534
16534
|
static props = {
|
|
16535
16535
|
placement: null,
|
|
@@ -16546,10 +16546,10 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16546
16546
|
});
|
|
16547
16547
|
}
|
|
16548
16548
|
onAttach(el) {
|
|
16549
|
-
this.#menu =
|
|
16549
|
+
this.#menu = useContext44(menuContext);
|
|
16550
16550
|
this.#menu.attachMenuItems(this);
|
|
16551
16551
|
if (hasProvidedContext(menuPortalContext)) {
|
|
16552
|
-
const portal =
|
|
16552
|
+
const portal = useContext44(menuPortalContext);
|
|
16553
16553
|
if (portal) {
|
|
16554
16554
|
provideContext(menuPortalContext, null);
|
|
16555
16555
|
portal.attach(el);
|
|
@@ -16591,7 +16591,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16591
16591
|
return this.#menu.button();
|
|
16592
16592
|
}
|
|
16593
16593
|
};
|
|
16594
|
-
radioControllerContext =
|
|
16594
|
+
radioControllerContext = createContext33();
|
|
16595
16595
|
RadioGroupController = class RadioGroupController extends ViewController {
|
|
16596
16596
|
#group = /* @__PURE__ */ new Set;
|
|
16597
16597
|
#value = signal("");
|
|
@@ -16724,12 +16724,12 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16724
16724
|
}
|
|
16725
16725
|
#onDisconnect() {
|
|
16726
16726
|
scoped(() => {
|
|
16727
|
-
const group =
|
|
16727
|
+
const group = useContext44(radioControllerContext);
|
|
16728
16728
|
group.remove(this.#controller);
|
|
16729
16729
|
}, this.connectScope);
|
|
16730
16730
|
}
|
|
16731
16731
|
#addToGroup() {
|
|
16732
|
-
const group =
|
|
16732
|
+
const group = useContext44(radioControllerContext);
|
|
16733
16733
|
group.add(this.#controller);
|
|
16734
16734
|
}
|
|
16735
16735
|
#watchValue() {
|
|
@@ -18712,7 +18712,7 @@ var getDefaultConfig = () => {
|
|
|
18712
18712
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
18713
18713
|
|
|
18714
18714
|
// ../design/dist/esm/index.mjs
|
|
18715
|
-
import React33, { useEffect as
|
|
18715
|
+
import React33, { useEffect as useEffect20, useMemo as useMemo38, useState as useState23 } from "react";
|
|
18716
18716
|
|
|
18717
18717
|
// ../paths/dist/esm/index.mjs
|
|
18718
18718
|
var cutLInstruction = ({
|
|
@@ -23107,6 +23107,7 @@ import { createContext as createContext14 } from "react";
|
|
|
23107
23107
|
import React12, { useCallback as useCallback5, useMemo as useMemo14, useRef as useRef6, useState as useState4 } from "react";
|
|
23108
23108
|
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
23109
23109
|
import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext15, useMemo as useMemo15 } from "react";
|
|
23110
|
+
import { createContext as createContext15 } from "react";
|
|
23110
23111
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
23111
23112
|
import {
|
|
23112
23113
|
forwardRef as forwardRef4,
|
|
@@ -23120,7 +23121,7 @@ import React15, { useCallback as useCallback6, useImperativeHandle, useRef as us
|
|
|
23120
23121
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
23121
23122
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
23122
23123
|
import {
|
|
23123
|
-
createContext as
|
|
23124
|
+
createContext as createContext16,
|
|
23124
23125
|
forwardRef as forwardRef5,
|
|
23125
23126
|
useCallback as useCallback7,
|
|
23126
23127
|
useContext as useContext17,
|
|
@@ -23132,7 +23133,7 @@ import {
|
|
|
23132
23133
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
23133
23134
|
import { useContext as useContext18, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
|
|
23134
23135
|
import {
|
|
23135
|
-
createContext as
|
|
23136
|
+
createContext as createContext17,
|
|
23136
23137
|
useCallback as useCallback8,
|
|
23137
23138
|
useImperativeHandle as useImperativeHandle3,
|
|
23138
23139
|
useLayoutEffect as useLayoutEffect4,
|
|
@@ -23142,17 +23143,17 @@ import {
|
|
|
23142
23143
|
} from "react";
|
|
23143
23144
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
23144
23145
|
import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext30 } from "react";
|
|
23145
|
-
import React17, { createContext as
|
|
23146
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
23146
23147
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
23147
23148
|
import { useContext as useContext19 } from "react";
|
|
23148
|
-
import { createContext as
|
|
23149
|
+
import { createContext as createContext19, useEffect as useEffect7, useState as useState11 } from "react";
|
|
23149
23150
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
23150
|
-
import { createContext as
|
|
23151
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
23151
23152
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
23152
23153
|
import React23, {
|
|
23153
23154
|
forwardRef as forwardRef6,
|
|
23154
23155
|
useContext as useContext28,
|
|
23155
|
-
useEffect as
|
|
23156
|
+
useEffect as useEffect14,
|
|
23156
23157
|
useImperativeHandle as useImperativeHandle4,
|
|
23157
23158
|
useMemo as useMemo28,
|
|
23158
23159
|
useRef as useRef18,
|
|
@@ -23160,7 +23161,7 @@ import React23, {
|
|
|
23160
23161
|
} from "react";
|
|
23161
23162
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
|
|
23162
23163
|
import React20, {
|
|
23163
|
-
createContext as
|
|
23164
|
+
createContext as createContext21,
|
|
23164
23165
|
createRef as createRef2,
|
|
23165
23166
|
useCallback as useCallback9,
|
|
23166
23167
|
useContext as useContext20,
|
|
@@ -23168,15 +23169,15 @@ import React20, {
|
|
|
23168
23169
|
useRef as useRef11,
|
|
23169
23170
|
useState as useState12
|
|
23170
23171
|
} from "react";
|
|
23171
|
-
import {
|
|
23172
|
+
import { useMemo as useMemo21 } from "react";
|
|
23172
23173
|
import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
23173
23174
|
import { useRef as useRef12 } from "react";
|
|
23174
|
-
import { useContext as useContext23, useEffect as
|
|
23175
|
+
import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
|
|
23175
23176
|
import { useContext as useContext22 } from "react";
|
|
23176
23177
|
import {
|
|
23177
23178
|
useCallback as useCallback12,
|
|
23178
23179
|
useContext as useContext26,
|
|
23179
|
-
useEffect as
|
|
23180
|
+
useEffect as useEffect12,
|
|
23180
23181
|
useLayoutEffect as useLayoutEffect8,
|
|
23181
23182
|
useRef as useRef17
|
|
23182
23183
|
} from "react";
|
|
@@ -23185,7 +23186,7 @@ import { useContext as useContext25, useMemo as useMemo25 } from "react";
|
|
|
23185
23186
|
import React21, {
|
|
23186
23187
|
useCallback as useCallback10,
|
|
23187
23188
|
useContext as useContext24,
|
|
23188
|
-
useEffect as
|
|
23189
|
+
useEffect as useEffect9,
|
|
23189
23190
|
useLayoutEffect as useLayoutEffect7,
|
|
23190
23191
|
useMemo as useMemo24,
|
|
23191
23192
|
useRef as useRef14,
|
|
@@ -23193,15 +23194,15 @@ import React21, {
|
|
|
23193
23194
|
} from "react";
|
|
23194
23195
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
23195
23196
|
import React22 from "react";
|
|
23196
|
-
import { useEffect as
|
|
23197
|
-
import { useEffect as
|
|
23198
|
-
import { useEffect as
|
|
23199
|
-
import { createContext as
|
|
23197
|
+
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
23198
|
+
import { useEffect as useEffect11, useRef as useRef16 } from "react";
|
|
23199
|
+
import { useEffect as useEffect13 } from "react";
|
|
23200
|
+
import { createContext as createContext22, useContext as useContext27, useMemo as useMemo27 } from "react";
|
|
23200
23201
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
23201
23202
|
import {
|
|
23202
23203
|
forwardRef as forwardRef7,
|
|
23203
23204
|
useContext as useContext29,
|
|
23204
|
-
useEffect as
|
|
23205
|
+
useEffect as useEffect15,
|
|
23205
23206
|
useImperativeHandle as useImperativeHandle5,
|
|
23206
23207
|
useLayoutEffect as useLayoutEffect9,
|
|
23207
23208
|
useMemo as useMemo29,
|
|
@@ -23232,17 +23233,16 @@ import {
|
|
|
23232
23233
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
23233
23234
|
import React29 from "react";
|
|
23234
23235
|
import { useMemo as useMemo322 } from "react";
|
|
23235
|
-
import { createContext as
|
|
23236
|
+
import { createContext as createContext23, useContext as useContext32, useMemo as useMemo31 } from "react";
|
|
23236
23237
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
23237
23238
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
23238
23239
|
import React31 from "react";
|
|
23239
|
-
import React32, { createContext as
|
|
23240
|
-
import { useContext as useContext33 } from "react";
|
|
23240
|
+
import React32, { createContext as createContext24 } from "react";
|
|
23241
23241
|
import { useCallback as useCallback18 } from "react";
|
|
23242
23242
|
import {
|
|
23243
23243
|
useCallback as useCallback17,
|
|
23244
|
-
useContext as
|
|
23245
|
-
useEffect as
|
|
23244
|
+
useContext as useContext33,
|
|
23245
|
+
useEffect as useEffect16,
|
|
23246
23246
|
useLayoutEffect as useLayoutEffect11,
|
|
23247
23247
|
useMemo as useMemo33,
|
|
23248
23248
|
useState as useState20
|
|
@@ -23250,29 +23250,29 @@ import {
|
|
|
23250
23250
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
23251
23251
|
import React34, {
|
|
23252
23252
|
forwardRef as forwardRef10,
|
|
23253
|
-
useContext as
|
|
23254
|
-
useEffect as
|
|
23253
|
+
useContext as useContext34,
|
|
23254
|
+
useEffect as useEffect18,
|
|
23255
23255
|
useImperativeHandle as useImperativeHandle8,
|
|
23256
23256
|
useMemo as useMemo34,
|
|
23257
23257
|
useRef as useRef22,
|
|
23258
23258
|
useState as useState21
|
|
23259
23259
|
} from "react";
|
|
23260
|
-
import { useEffect as
|
|
23260
|
+
import { useEffect as useEffect17 } from "react";
|
|
23261
23261
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
23262
23262
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
23263
23263
|
import React36, { useMemo as useMemo35 } from "react";
|
|
23264
23264
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
23265
23265
|
import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
|
|
23266
23266
|
import React37 from "react";
|
|
23267
|
-
import React38, { createContext as
|
|
23267
|
+
import React38, { createContext as createContext25 } from "react";
|
|
23268
23268
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
23269
23269
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
23270
23270
|
import React40 from "react";
|
|
23271
|
-
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as
|
|
23271
|
+
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext36 } from "react";
|
|
23272
23272
|
import {
|
|
23273
23273
|
forwardRef as forwardRef12,
|
|
23274
|
-
useContext as
|
|
23275
|
-
useEffect as
|
|
23274
|
+
useContext as useContext35,
|
|
23275
|
+
useEffect as useEffect19,
|
|
23276
23276
|
useImperativeHandle as useImperativeHandle9,
|
|
23277
23277
|
useLayoutEffect as useLayoutEffect12,
|
|
23278
23278
|
useMemo as useMemo37,
|
|
@@ -24809,7 +24809,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
24809
24809
|
var addSequenceStackTraces = (component) => {
|
|
24810
24810
|
componentsToAddStacksTo.push(component);
|
|
24811
24811
|
};
|
|
24812
|
-
var VERSION = "4.0.
|
|
24812
|
+
var VERSION = "4.0.460";
|
|
24813
24813
|
var checkMultipleRemotionVersions = () => {
|
|
24814
24814
|
if (typeof globalThis === "undefined") {
|
|
24815
24815
|
return;
|
|
@@ -25028,6 +25028,9 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
25028
25028
|
default: "none"
|
|
25029
25029
|
}
|
|
25030
25030
|
};
|
|
25031
|
+
var nodePathToString = (nodePath) => {
|
|
25032
|
+
return nodePath.join(".");
|
|
25033
|
+
};
|
|
25031
25034
|
var SequenceManager = React12.createContext({
|
|
25032
25035
|
registerSequence: () => {
|
|
25033
25036
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -25043,19 +25046,48 @@ var SequenceVisibilityToggleContext = React12.createContext({
|
|
|
25043
25046
|
throw new Error("SequenceVisibilityToggle not initialized");
|
|
25044
25047
|
}
|
|
25045
25048
|
});
|
|
25046
|
-
var
|
|
25047
|
-
|
|
25049
|
+
var getCodeValues = (codeValues, nodePath) => {
|
|
25050
|
+
const status = codeValues[nodePathToString(nodePath)];
|
|
25051
|
+
if (!status) {
|
|
25052
|
+
return;
|
|
25053
|
+
}
|
|
25054
|
+
if (!status.canUpdate) {
|
|
25055
|
+
return;
|
|
25056
|
+
}
|
|
25057
|
+
return status.props;
|
|
25058
|
+
};
|
|
25059
|
+
var getIsJsxInMapCallback = (codeValues, nodePath) => {
|
|
25060
|
+
const status = codeValues[nodePathToString(nodePath)];
|
|
25061
|
+
if (!status) {
|
|
25062
|
+
return false;
|
|
25063
|
+
}
|
|
25064
|
+
if (!status.canUpdate) {
|
|
25065
|
+
return false;
|
|
25066
|
+
}
|
|
25067
|
+
return status.jsxInMapCallback;
|
|
25068
|
+
};
|
|
25069
|
+
var VisualModeGettersContext = React12.createContext({
|
|
25070
|
+
getDragOverrides: () => {
|
|
25071
|
+
throw new Error("VisualModeGettersContext not initialized");
|
|
25072
|
+
},
|
|
25073
|
+
getCodeValues: () => {
|
|
25074
|
+
throw new Error("VisualModeGettersContext not initialized");
|
|
25075
|
+
},
|
|
25076
|
+
getIsJsxInMapCallback: () => {
|
|
25077
|
+
throw new Error("VisualModeGettersContext not initialized");
|
|
25078
|
+
},
|
|
25079
|
+
visualModeEnabled: false
|
|
25080
|
+
});
|
|
25081
|
+
var VisualModeSettersContext = React12.createContext({
|
|
25048
25082
|
setDragOverrides: () => {
|
|
25049
|
-
throw new Error("
|
|
25083
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
25050
25084
|
},
|
|
25051
25085
|
clearDragOverrides: () => {
|
|
25052
|
-
throw new Error("
|
|
25086
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
25053
25087
|
},
|
|
25054
|
-
codeValues: {},
|
|
25055
25088
|
setCodeValues: () => {
|
|
25056
|
-
throw new Error("
|
|
25057
|
-
}
|
|
25058
|
-
visualModeEnabled: false
|
|
25089
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
25090
|
+
}
|
|
25059
25091
|
});
|
|
25060
25092
|
var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
25061
25093
|
const [sequences, setSequences] = useState4([]);
|
|
@@ -25064,39 +25096,33 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
|
25064
25096
|
const controlOverridesRef = useRef6(dragOverrides);
|
|
25065
25097
|
controlOverridesRef.current = dragOverrides;
|
|
25066
25098
|
const [codeValues, setCodeValuesMapState] = useState4({});
|
|
25067
|
-
const setDragOverrides = useCallback5((
|
|
25099
|
+
const setDragOverrides = useCallback5((nodePath, key, value) => {
|
|
25068
25100
|
setControlOverrides((prev) => ({
|
|
25069
25101
|
...prev,
|
|
25070
|
-
[
|
|
25071
|
-
...prev[
|
|
25102
|
+
[nodePathToString(nodePath)]: {
|
|
25103
|
+
...prev[nodePathToString(nodePath)],
|
|
25072
25104
|
[key]: value
|
|
25073
25105
|
}
|
|
25074
25106
|
}));
|
|
25075
25107
|
}, []);
|
|
25076
|
-
const clearDragOverrides = useCallback5((
|
|
25108
|
+
const clearDragOverrides = useCallback5((nodePath) => {
|
|
25077
25109
|
setControlOverrides((prev) => {
|
|
25078
|
-
|
|
25110
|
+
const key = nodePathToString(nodePath);
|
|
25111
|
+
if (!prev[key]) {
|
|
25079
25112
|
return prev;
|
|
25080
25113
|
}
|
|
25081
25114
|
const next = { ...prev };
|
|
25082
|
-
delete next[
|
|
25115
|
+
delete next[key];
|
|
25083
25116
|
return next;
|
|
25084
25117
|
});
|
|
25085
25118
|
}, []);
|
|
25086
|
-
const setCodeValues = useCallback5((
|
|
25119
|
+
const setCodeValues = useCallback5((nodePath, values) => {
|
|
25087
25120
|
setCodeValuesMapState((prev) => {
|
|
25088
|
-
|
|
25121
|
+
const key = nodePathToString(nodePath);
|
|
25122
|
+
if (prev[key] === values) {
|
|
25089
25123
|
return prev;
|
|
25090
25124
|
}
|
|
25091
|
-
|
|
25092
|
-
if (!(sequenceId in prev)) {
|
|
25093
|
-
return prev;
|
|
25094
|
-
}
|
|
25095
|
-
const next = { ...prev };
|
|
25096
|
-
delete next[sequenceId];
|
|
25097
|
-
return next;
|
|
25098
|
-
}
|
|
25099
|
-
return { ...prev, [sequenceId]: values };
|
|
25125
|
+
return { ...prev, [key]: values };
|
|
25100
25126
|
});
|
|
25101
25127
|
}, []);
|
|
25102
25128
|
const registerSequence = useCallback5((seq) => {
|
|
@@ -25120,30 +25146,31 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
|
25120
25146
|
setHidden
|
|
25121
25147
|
};
|
|
25122
25148
|
}, [hidden]);
|
|
25123
|
-
const
|
|
25149
|
+
const gettersContext = useMemo14(() => {
|
|
25124
25150
|
return {
|
|
25125
25151
|
visualModeEnabled,
|
|
25126
|
-
dragOverrides,
|
|
25152
|
+
getDragOverrides: (nodePath) => dragOverrides[nodePathToString(nodePath)] ?? {},
|
|
25153
|
+
getCodeValues: (nodePath) => getCodeValues(codeValues, nodePath),
|
|
25154
|
+
getIsJsxInMapCallback: (nodePath) => getIsJsxInMapCallback(codeValues, nodePath)
|
|
25155
|
+
};
|
|
25156
|
+
}, [visualModeEnabled, dragOverrides, codeValues]);
|
|
25157
|
+
const settersContext = useMemo14(() => {
|
|
25158
|
+
return {
|
|
25127
25159
|
setDragOverrides,
|
|
25128
25160
|
clearDragOverrides,
|
|
25129
|
-
codeValues,
|
|
25130
25161
|
setCodeValues
|
|
25131
25162
|
};
|
|
25132
|
-
}, [
|
|
25133
|
-
visualModeEnabled,
|
|
25134
|
-
dragOverrides,
|
|
25135
|
-
setDragOverrides,
|
|
25136
|
-
clearDragOverrides,
|
|
25137
|
-
codeValues,
|
|
25138
|
-
setCodeValues
|
|
25139
|
-
]);
|
|
25163
|
+
}, [setDragOverrides, clearDragOverrides, setCodeValues]);
|
|
25140
25164
|
return /* @__PURE__ */ jsx112(SequenceManager.Provider, {
|
|
25141
25165
|
value: sequenceContext,
|
|
25142
25166
|
children: /* @__PURE__ */ jsx112(SequenceVisibilityToggleContext.Provider, {
|
|
25143
25167
|
value: hiddenContext,
|
|
25144
|
-
children: /* @__PURE__ */ jsx112(
|
|
25145
|
-
value:
|
|
25146
|
-
children
|
|
25168
|
+
children: /* @__PURE__ */ jsx112(VisualModeGettersContext.Provider, {
|
|
25169
|
+
value: gettersContext,
|
|
25170
|
+
children: /* @__PURE__ */ jsx112(VisualModeSettersContext.Provider, {
|
|
25171
|
+
value: settersContext,
|
|
25172
|
+
children
|
|
25173
|
+
})
|
|
25147
25174
|
})
|
|
25148
25175
|
})
|
|
25149
25176
|
});
|
|
@@ -25188,6 +25215,14 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
25188
25215
|
}
|
|
25189
25216
|
return out;
|
|
25190
25217
|
};
|
|
25218
|
+
var OverrideIdsToNodePathsGettersContext = createContext15({
|
|
25219
|
+
overrideIdToNodePathMappings: {}
|
|
25220
|
+
});
|
|
25221
|
+
var OverrideIdsToNodePathsSettersContext = createContext15({
|
|
25222
|
+
setOverrideIdToNodePath: () => {
|
|
25223
|
+
throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
|
|
25224
|
+
}
|
|
25225
|
+
});
|
|
25191
25226
|
var getEffectiveVisualModeValue = ({
|
|
25192
25227
|
codeValue,
|
|
25193
25228
|
runtimeValue,
|
|
@@ -25292,6 +25327,7 @@ var mergeValues = ({
|
|
|
25292
25327
|
}
|
|
25293
25328
|
return merged;
|
|
25294
25329
|
};
|
|
25330
|
+
var stackToOverrideMap = {};
|
|
25295
25331
|
var wrapInSchema = (Component, schema) => {
|
|
25296
25332
|
if (typeof process === "undefined" || !process.env?.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
|
|
25297
25333
|
return Component;
|
|
@@ -25300,7 +25336,8 @@ var wrapInSchema = (Component, schema) => {
|
|
|
25300
25336
|
const flatKeys = Object.keys(flatSchema);
|
|
25301
25337
|
const Wrapped = forwardRef2((props, ref) => {
|
|
25302
25338
|
const env = useRemotionEnvironment();
|
|
25303
|
-
const { visualModeEnabled,
|
|
25339
|
+
const { visualModeEnabled, getDragOverrides, getCodeValues: getCodeValues2 } = useContext15(VisualModeGettersContext);
|
|
25340
|
+
const nodePathMapping = useContext15(OverrideIdsToNodePathsGettersContext);
|
|
25304
25341
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !visualModeEnabled) {
|
|
25305
25342
|
return React13.createElement(Component, {
|
|
25306
25343
|
...props,
|
|
@@ -25314,7 +25351,20 @@ var wrapInSchema = (Component, schema) => {
|
|
|
25314
25351
|
ref
|
|
25315
25352
|
});
|
|
25316
25353
|
}
|
|
25317
|
-
const [overrideId] = useState5(() =>
|
|
25354
|
+
const [overrideId] = useState5(() => {
|
|
25355
|
+
const { stack } = props;
|
|
25356
|
+
if (!stack) {
|
|
25357
|
+
return String(Math.random());
|
|
25358
|
+
}
|
|
25359
|
+
const existingOverrideId = stackToOverrideMap[stack];
|
|
25360
|
+
if (existingOverrideId) {
|
|
25361
|
+
return existingOverrideId;
|
|
25362
|
+
}
|
|
25363
|
+
const newOverrideId = String(Math.random());
|
|
25364
|
+
stackToOverrideMap[stack] = newOverrideId;
|
|
25365
|
+
return newOverrideId;
|
|
25366
|
+
});
|
|
25367
|
+
const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
25318
25368
|
const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
|
|
25319
25369
|
const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
|
|
25320
25370
|
const controls = useMemo15(() => {
|
|
@@ -25328,10 +25378,15 @@ var wrapInSchema = (Component, schema) => {
|
|
|
25328
25378
|
return computeEffectiveSchemaValuesDotNotation({
|
|
25329
25379
|
schema,
|
|
25330
25380
|
currentValue: currentRuntimeValueDotNotation,
|
|
25331
|
-
overrideValues:
|
|
25332
|
-
propStatus:
|
|
25381
|
+
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
25382
|
+
propStatus: nodePath === null ? undefined : getCodeValues2(nodePath)
|
|
25333
25383
|
});
|
|
25334
|
-
}, [
|
|
25384
|
+
}, [
|
|
25385
|
+
currentRuntimeValueDotNotation,
|
|
25386
|
+
getDragOverrides,
|
|
25387
|
+
nodePath,
|
|
25388
|
+
getCodeValues2
|
|
25389
|
+
]);
|
|
25335
25390
|
const activeKeys = selectActiveKeys(schema, valuesDotNotation);
|
|
25336
25391
|
const mergedProps = mergeValues({
|
|
25337
25392
|
props,
|
|
@@ -25995,7 +26050,7 @@ var defaultOnPaint = ({
|
|
|
25995
26050
|
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
25996
26051
|
element.style.transform = transform.toString();
|
|
25997
26052
|
};
|
|
25998
|
-
var HtmlInCanvasAncestorContext =
|
|
26053
|
+
var HtmlInCanvasAncestorContext = createContext16(false);
|
|
25999
26054
|
var HtmlInCanvasInner = forwardRef5(({
|
|
26000
26055
|
width,
|
|
26001
26056
|
height,
|
|
@@ -26212,7 +26267,7 @@ var validateRenderAsset = (artifact) => {
|
|
|
26212
26267
|
}
|
|
26213
26268
|
validateContent(artifact.content);
|
|
26214
26269
|
};
|
|
26215
|
-
var RenderAssetManager =
|
|
26270
|
+
var RenderAssetManager = createContext17({
|
|
26216
26271
|
registerRenderAsset: () => {
|
|
26217
26272
|
return;
|
|
26218
26273
|
},
|
|
@@ -26350,7 +26405,7 @@ var calculateMediaDuration = ({
|
|
|
26350
26405
|
const actualDuration = duration / playbackRate;
|
|
26351
26406
|
return Math.floor(actualDuration);
|
|
26352
26407
|
};
|
|
26353
|
-
var LoopContext =
|
|
26408
|
+
var LoopContext = createContext18(null);
|
|
26354
26409
|
var useLoop = () => {
|
|
26355
26410
|
return React17.useContext(LoopContext);
|
|
26356
26411
|
};
|
|
@@ -26421,7 +26476,7 @@ var playbackLogging = ({
|
|
|
26421
26476
|
const tags = [mountTime ? Date.now() - mountTime + "ms " : null, tag].filter(Boolean).join(" ");
|
|
26422
26477
|
Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
|
|
26423
26478
|
};
|
|
26424
|
-
var PreloadContext =
|
|
26479
|
+
var PreloadContext = createContext19({});
|
|
26425
26480
|
var preloads = {};
|
|
26426
26481
|
var updaters = [];
|
|
26427
26482
|
var setPreloads = (updater) => {
|
|
@@ -26742,7 +26797,7 @@ var durationReducer = (state, action) => {
|
|
|
26742
26797
|
return state;
|
|
26743
26798
|
}
|
|
26744
26799
|
};
|
|
26745
|
-
var DurationsContext =
|
|
26800
|
+
var DurationsContext = createContext20({
|
|
26746
26801
|
durations: {},
|
|
26747
26802
|
setDurations: () => {
|
|
26748
26803
|
throw new Error("context missing");
|
|
@@ -26908,11 +26963,6 @@ var useSingletonAudioContext = ({
|
|
|
26908
26963
|
gainNode
|
|
26909
26964
|
};
|
|
26910
26965
|
}, [logLevel, latencyHint, env.isRendering, audioEnabled]);
|
|
26911
|
-
useEffect8(() => {
|
|
26912
|
-
return () => {
|
|
26913
|
-
context?.audioContext?.close();
|
|
26914
|
-
};
|
|
26915
|
-
}, [context]);
|
|
26916
26966
|
return context;
|
|
26917
26967
|
};
|
|
26918
26968
|
var waitUntilActuallyResumed = (audioContext, logLevel) => {
|
|
@@ -26961,8 +27011,8 @@ var didPropChange = (key, newProp, prevProp) => {
|
|
|
26961
27011
|
}
|
|
26962
27012
|
return true;
|
|
26963
27013
|
};
|
|
26964
|
-
var SharedAudioContext =
|
|
26965
|
-
var SharedAudioTagsContext =
|
|
27014
|
+
var SharedAudioContext = createContext21(null);
|
|
27015
|
+
var SharedAudioTagsContext = createContext21(null);
|
|
26966
27016
|
var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled }) => {
|
|
26967
27017
|
const logLevel = useLogLevel();
|
|
26968
27018
|
const ctxAndGain = useSingletonAudioContext({
|
|
@@ -27007,8 +27057,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27007
27057
|
if (!ctxAndGain) {
|
|
27008
27058
|
throw new Error("Audio context not found");
|
|
27009
27059
|
}
|
|
27060
|
+
const saveForLater = ctxAndGain.audioContext.state === "suspended" && !isResuming.current;
|
|
27010
27061
|
if (duration > 0) {
|
|
27011
|
-
if (
|
|
27062
|
+
if (saveForLater) {
|
|
27012
27063
|
nodesToResume.current.set(node, {
|
|
27013
27064
|
scheduledTime,
|
|
27014
27065
|
offset,
|
|
@@ -27026,7 +27077,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27026
27077
|
const prev = prevEndTimes.current;
|
|
27027
27078
|
const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
|
|
27028
27079
|
const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
|
|
27029
|
-
Log.verbose({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s", scheduledMismatch ? "color: red; font-weight: bold" : "", scheduledTime.toFixed(4), "", scheduledEndTime.toFixed(4), mediaMismatch ? "color: red; font-weight: bold" : "", mediaTime.toFixed(4), "", mediaEndTime.toFixed(4), duration < 0 ? "color: red; font-weight: bold" : timeDiff < 0 ? "color: red; font-weight: bold" : "color: blue; font-weight: bold", duration < 0 ? "missed " + Math.abs(offset).toFixed(2) + "s" : Math.abs(timeDiff).toFixed(2) + (timeDiff < 0 ? " delay" : " ahead"), "", "current=" + currentTime.toFixed(4), "offset=" + offset.toFixed(4), "latency=" + latency.toFixed(4), "state=" + ctxAndGain.audioContext.state, originalUnloopedMediaTimestamp !== mediaTime ? "original_ts=" + originalUnloopedMediaTimestamp.toFixed(4) : "");
|
|
27080
|
+
Log.verbose({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s %s %s", scheduledMismatch ? "color: red; font-weight: bold" : "", scheduledTime.toFixed(4), "", scheduledEndTime.toFixed(4), mediaMismatch ? "color: red; font-weight: bold" : "", mediaTime.toFixed(4), "", mediaEndTime.toFixed(4), duration < 0 ? "color: red; font-weight: bold" : timeDiff < 0 ? "color: red; font-weight: bold" : "color: blue; font-weight: bold", duration < 0 ? "missed " + Math.abs(offset).toFixed(2) + "s" : Math.abs(timeDiff).toFixed(2) + (timeDiff < 0 ? " delay" : " ahead"), "", "current=" + currentTime.toFixed(4), "actualcurrent=" + ctxAndGain.audioContext.currentTime.toFixed(4), "offset=" + offset.toFixed(4), "latency=" + latency.toFixed(4), "state=" + ctxAndGain.audioContext.state, originalUnloopedMediaTimestamp !== mediaTime ? "original_ts=" + originalUnloopedMediaTimestamp.toFixed(4) : "", "action=" + (saveForLater ? "schedule" : "start"), "");
|
|
27030
27081
|
prev.scheduledEndTime = scheduledEndTime;
|
|
27031
27082
|
prev.mediaEndTime = mediaEndTime;
|
|
27032
27083
|
return duration > 0 ? {
|
|
@@ -27046,6 +27097,13 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27046
27097
|
return Promise.resolve();
|
|
27047
27098
|
}
|
|
27048
27099
|
audioContextIsPlayingEventually.current = true;
|
|
27100
|
+
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
27101
|
+
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
27102
|
+
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
27103
|
+
nodesToResume.current.forEach((r2, node) => {
|
|
27104
|
+
node.start(r2.scheduledTime, r2.offset, r2.duration);
|
|
27105
|
+
});
|
|
27106
|
+
nodesToResume.current.clear();
|
|
27049
27107
|
const resumePromise = ctxAndGain.audioContext.resume();
|
|
27050
27108
|
isResuming.current = new Promise((resolve) => {
|
|
27051
27109
|
waitUntilActuallyResumed(ctxAndGain.audioContext, logLevel).then(resolve);
|
|
@@ -27056,11 +27114,6 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27056
27114
|
}).finally(() => {
|
|
27057
27115
|
isResuming.current = null;
|
|
27058
27116
|
});
|
|
27059
|
-
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
27060
|
-
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
27061
|
-
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
27062
|
-
nodesToResume.current.forEach((r2, node) => node.start(r2.scheduledTime, r2.offset, r2.duration));
|
|
27063
|
-
nodesToResume.current.clear();
|
|
27064
27117
|
return resumePromise.catch(() => {});
|
|
27065
27118
|
}, [ctxAndGain, logLevel]);
|
|
27066
27119
|
const getIsResumingAudioContext = useCallback9(() => {
|
|
@@ -27643,7 +27696,7 @@ var useBasicMediaInTimeline = ({
|
|
|
27643
27696
|
});
|
|
27644
27697
|
}).join(",");
|
|
27645
27698
|
}, [duration, mediaStartsAt, volume, mediaVolume]);
|
|
27646
|
-
|
|
27699
|
+
useEffect8(() => {
|
|
27647
27700
|
if (typeof volume === "number" && volume !== initialVolume) {
|
|
27648
27701
|
warnOnce2(`Remotion: The ${mediaType} with src ${src} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/audio/volume`);
|
|
27649
27702
|
}
|
|
@@ -27706,7 +27759,7 @@ var useImageInTimeline = ({
|
|
|
27706
27759
|
loop: false
|
|
27707
27760
|
});
|
|
27708
27761
|
const { isStudio } = useRemotionEnvironment();
|
|
27709
|
-
|
|
27762
|
+
useEffect8(() => {
|
|
27710
27763
|
if (!src) {
|
|
27711
27764
|
throw new Error("No src passed");
|
|
27712
27765
|
}
|
|
@@ -27789,7 +27842,7 @@ var useMediaInTimeline = ({
|
|
|
27789
27842
|
loop: false
|
|
27790
27843
|
});
|
|
27791
27844
|
const { isStudio } = useRemotionEnvironment();
|
|
27792
|
-
|
|
27845
|
+
useEffect8(() => {
|
|
27793
27846
|
if (!src) {
|
|
27794
27847
|
throw new Error("No src passed");
|
|
27795
27848
|
}
|
|
@@ -27862,9 +27915,14 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
27862
27915
|
}
|
|
27863
27916
|
};
|
|
27864
27917
|
}
|
|
27918
|
+
let unblocked = false;
|
|
27865
27919
|
setBlocks((b) => [...b, block]);
|
|
27866
27920
|
return {
|
|
27867
27921
|
unblock: () => {
|
|
27922
|
+
if (unblocked) {
|
|
27923
|
+
return;
|
|
27924
|
+
}
|
|
27925
|
+
unblocked = true;
|
|
27868
27926
|
setBlocks((b) => {
|
|
27869
27927
|
const newArr = b.filter((bx) => bx !== block);
|
|
27870
27928
|
if (newArr.length === b.length) {
|
|
@@ -27891,7 +27949,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
27891
27949
|
}
|
|
27892
27950
|
};
|
|
27893
27951
|
}, []);
|
|
27894
|
-
|
|
27952
|
+
useEffect9(() => {
|
|
27895
27953
|
if (rendering) {
|
|
27896
27954
|
return;
|
|
27897
27955
|
}
|
|
@@ -27936,7 +27994,7 @@ var BufferingProvider = ({ children }) => {
|
|
|
27936
27994
|
};
|
|
27937
27995
|
var useIsPlayerBuffering = (bufferManager) => {
|
|
27938
27996
|
const [isBuffering, setIsBuffering] = useState14(bufferManager.buffering.current);
|
|
27939
|
-
|
|
27997
|
+
useEffect9(() => {
|
|
27940
27998
|
const onBuffer = () => {
|
|
27941
27999
|
setIsBuffering(true);
|
|
27942
28000
|
};
|
|
@@ -27958,18 +28016,30 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
27958
28016
|
};
|
|
27959
28017
|
var useBufferState = () => {
|
|
27960
28018
|
const buffer = useContext25(BufferingContextReact);
|
|
28019
|
+
const logLevel = useLogLevel();
|
|
27961
28020
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
27962
28021
|
return useMemo25(() => ({
|
|
27963
28022
|
delayPlayback: () => {
|
|
27964
28023
|
if (!addBlock) {
|
|
27965
28024
|
throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");
|
|
27966
28025
|
}
|
|
28026
|
+
Log.trace({ logLevel, tag: "[buffer-state]" }, "Adding buffer handle", new Error().stack);
|
|
27967
28027
|
const { unblock } = addBlock({
|
|
27968
28028
|
id: String(Math.random())
|
|
27969
28029
|
});
|
|
27970
|
-
|
|
28030
|
+
let unblocked = false;
|
|
28031
|
+
return {
|
|
28032
|
+
unblock: () => {
|
|
28033
|
+
if (unblocked) {
|
|
28034
|
+
return;
|
|
28035
|
+
}
|
|
28036
|
+
unblocked = true;
|
|
28037
|
+
Log.trace({ logLevel, tag: "[buffer-state]" }, "Removing buffer handle");
|
|
28038
|
+
unblock();
|
|
28039
|
+
}
|
|
28040
|
+
};
|
|
27971
28041
|
}
|
|
27972
|
-
}), [addBlock]);
|
|
28042
|
+
}), [addBlock, logLevel]);
|
|
27973
28043
|
};
|
|
27974
28044
|
var isSafariWebkit = () => {
|
|
27975
28045
|
const isSafari2 = /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);
|
|
@@ -28105,7 +28175,7 @@ var useMediaBuffering = ({
|
|
|
28105
28175
|
}) => {
|
|
28106
28176
|
const buffer = useBufferState();
|
|
28107
28177
|
const [isBuffering, setIsBuffering] = useState15(false);
|
|
28108
|
-
|
|
28178
|
+
useEffect10(() => {
|
|
28109
28179
|
let cleanupFns = [];
|
|
28110
28180
|
const { current } = element;
|
|
28111
28181
|
if (!current) {
|
|
@@ -28238,7 +28308,7 @@ var useRequestVideoCallbackTime = ({
|
|
|
28238
28308
|
onVariableFpsVideoDetected
|
|
28239
28309
|
}) => {
|
|
28240
28310
|
const currentTime = useRef16(null);
|
|
28241
|
-
|
|
28311
|
+
useEffect11(() => {
|
|
28242
28312
|
const { current } = mediaRef;
|
|
28243
28313
|
if (current) {
|
|
28244
28314
|
currentTime.current = {
|
|
@@ -28524,7 +28594,7 @@ var useMediaPlayback = ({
|
|
|
28524
28594
|
return acceptableTimeshift ?? defaultAcceptableTimeshift;
|
|
28525
28595
|
})();
|
|
28526
28596
|
const isPlayerBuffering = useIsPlayerBuffering(buffering);
|
|
28527
|
-
|
|
28597
|
+
useEffect12(() => {
|
|
28528
28598
|
if (mediaRef.current?.paused) {
|
|
28529
28599
|
return;
|
|
28530
28600
|
}
|
|
@@ -28569,7 +28639,7 @@ var useMediaPlayback = ({
|
|
|
28569
28639
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
28570
28640
|
}
|
|
28571
28641
|
}, [mediaRef, playbackRate]);
|
|
28572
|
-
|
|
28642
|
+
useEffect12(() => {
|
|
28573
28643
|
const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
|
|
28574
28644
|
if (!mediaRef.current) {
|
|
28575
28645
|
throw new Error(`No ${mediaType} ref found`);
|
|
@@ -28698,7 +28768,7 @@ var useMediaTag = ({
|
|
|
28698
28768
|
const logLevel = useLogLevel();
|
|
28699
28769
|
const mountTime = useMountTime();
|
|
28700
28770
|
const env = useRemotionEnvironment();
|
|
28701
|
-
|
|
28771
|
+
useEffect13(() => {
|
|
28702
28772
|
const tag = {
|
|
28703
28773
|
id,
|
|
28704
28774
|
play: (reason) => {
|
|
@@ -28737,11 +28807,11 @@ var useMediaTag = ({
|
|
|
28737
28807
|
env.isPlayer
|
|
28738
28808
|
]);
|
|
28739
28809
|
};
|
|
28740
|
-
var MediaVolumeContext =
|
|
28810
|
+
var MediaVolumeContext = createContext22({
|
|
28741
28811
|
mediaMuted: false,
|
|
28742
28812
|
mediaVolume: 1
|
|
28743
28813
|
});
|
|
28744
|
-
var SetMediaVolumeContext =
|
|
28814
|
+
var SetMediaVolumeContext = createContext22({
|
|
28745
28815
|
setMediaMuted: () => {
|
|
28746
28816
|
throw new Error("default");
|
|
28747
28817
|
},
|
|
@@ -28917,7 +28987,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
28917
28987
|
}, [audioRef]);
|
|
28918
28988
|
const currentOnDurationCallback = useRef18(onDuration);
|
|
28919
28989
|
currentOnDurationCallback.current = onDuration;
|
|
28920
|
-
|
|
28990
|
+
useEffect14(() => {
|
|
28921
28991
|
const { current } = audioRef;
|
|
28922
28992
|
if (!current) {
|
|
28923
28993
|
return;
|
|
@@ -28986,7 +29056,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
28986
29056
|
useImperativeHandle5(ref, () => {
|
|
28987
29057
|
return audioRef.current;
|
|
28988
29058
|
}, []);
|
|
28989
|
-
|
|
29059
|
+
useEffect15(() => {
|
|
28990
29060
|
if (!props.src) {
|
|
28991
29061
|
throw new Error("No src passed");
|
|
28992
29062
|
}
|
|
@@ -29575,7 +29645,7 @@ var waitForRoot = (fn) => {
|
|
|
29575
29645
|
listeners = listeners.filter((l) => l !== fn);
|
|
29576
29646
|
};
|
|
29577
29647
|
};
|
|
29578
|
-
var MediaEnabledContext =
|
|
29648
|
+
var MediaEnabledContext = createContext23(null);
|
|
29579
29649
|
var useVideoEnabled = () => {
|
|
29580
29650
|
const context = useContext32(MediaEnabledContext);
|
|
29581
29651
|
if (!context) {
|
|
@@ -29857,7 +29927,7 @@ var setupEnvVariables = () => {
|
|
|
29857
29927
|
});
|
|
29858
29928
|
};
|
|
29859
29929
|
var CurrentScaleContext = React32.createContext(null);
|
|
29860
|
-
var PreviewSizeContext =
|
|
29930
|
+
var PreviewSizeContext = createContext24({
|
|
29861
29931
|
setSize: () => {
|
|
29862
29932
|
return;
|
|
29863
29933
|
},
|
|
@@ -29880,14 +29950,6 @@ var calculateScale = ({
|
|
|
29880
29950
|
}
|
|
29881
29951
|
return Number(previewSize);
|
|
29882
29952
|
};
|
|
29883
|
-
var useSequenceControlOverride = (key) => {
|
|
29884
|
-
const seqContext = useContext33(SequenceContext);
|
|
29885
|
-
const { dragOverrides: overrides } = useContext33(VisualModeOverridesContext);
|
|
29886
|
-
if (!seqContext) {
|
|
29887
|
-
return;
|
|
29888
|
-
}
|
|
29889
|
-
return overrides[seqContext.id]?.[key];
|
|
29890
|
-
};
|
|
29891
29953
|
var getOffthreadVideoSource = ({
|
|
29892
29954
|
src,
|
|
29893
29955
|
transparent,
|
|
@@ -29919,9 +29981,9 @@ var OffthreadVideoForRendering = ({
|
|
|
29919
29981
|
const frame = useCurrentFrame();
|
|
29920
29982
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
29921
29983
|
const videoConfig = useUnsafeVideoConfig();
|
|
29922
|
-
const sequenceContext =
|
|
29984
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
29923
29985
|
const mediaStartsAt = useMediaStartsAt();
|
|
29924
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
29986
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext33(RenderAssetManager);
|
|
29925
29987
|
if (!src) {
|
|
29926
29988
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
29927
29989
|
}
|
|
@@ -29940,7 +30002,7 @@ var OffthreadVideoForRendering = ({
|
|
|
29940
30002
|
mediaVolume: 1
|
|
29941
30003
|
});
|
|
29942
30004
|
warnAboutTooHighVolume(volume);
|
|
29943
|
-
|
|
30005
|
+
useEffect16(() => {
|
|
29944
30006
|
if (!src) {
|
|
29945
30007
|
throw new Error("No src passed");
|
|
29946
30008
|
}
|
|
@@ -30101,7 +30163,7 @@ var useEmitVideoFrame = ({
|
|
|
30101
30163
|
ref,
|
|
30102
30164
|
onVideoFrame
|
|
30103
30165
|
}) => {
|
|
30104
|
-
|
|
30166
|
+
useEffect17(() => {
|
|
30105
30167
|
const { current } = ref;
|
|
30106
30168
|
if (!current) {
|
|
30107
30169
|
return;
|
|
@@ -30133,7 +30195,7 @@ class MediaPlaybackError extends Error {
|
|
|
30133
30195
|
}
|
|
30134
30196
|
}
|
|
30135
30197
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
30136
|
-
const context =
|
|
30198
|
+
const context = useContext34(SharedAudioContext);
|
|
30137
30199
|
if (!context) {
|
|
30138
30200
|
throw new Error("SharedAudioContext not found");
|
|
30139
30201
|
}
|
|
@@ -30189,8 +30251,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30189
30251
|
}
|
|
30190
30252
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
30191
30253
|
const { fps, durationInFrames } = useVideoConfig();
|
|
30192
|
-
const parentSequence =
|
|
30193
|
-
const { hidden } =
|
|
30254
|
+
const parentSequence = useContext34(SequenceContext);
|
|
30255
|
+
const { hidden } = useContext34(SequenceVisibilityToggleContext);
|
|
30194
30256
|
const logLevel = useLogLevel();
|
|
30195
30257
|
const mountTime = useMountTime();
|
|
30196
30258
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -30265,7 +30327,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30265
30327
|
tag: "video",
|
|
30266
30328
|
mountTime
|
|
30267
30329
|
}));
|
|
30268
|
-
|
|
30330
|
+
useEffect18(() => {
|
|
30269
30331
|
const { current } = videoRef;
|
|
30270
30332
|
if (!current) {
|
|
30271
30333
|
return;
|
|
@@ -30308,7 +30370,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30308
30370
|
const currentOnDurationCallback = useRef22(onDuration);
|
|
30309
30371
|
currentOnDurationCallback.current = onDuration;
|
|
30310
30372
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
30311
|
-
|
|
30373
|
+
useEffect18(() => {
|
|
30312
30374
|
const { current } = videoRef;
|
|
30313
30375
|
if (!current) {
|
|
30314
30376
|
return;
|
|
@@ -30325,7 +30387,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30325
30387
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
30326
30388
|
};
|
|
30327
30389
|
}, [src]);
|
|
30328
|
-
|
|
30390
|
+
useEffect18(() => {
|
|
30329
30391
|
const { current } = videoRef;
|
|
30330
30392
|
if (!current) {
|
|
30331
30393
|
return;
|
|
@@ -30614,7 +30676,8 @@ var Internals = {
|
|
|
30614
30676
|
VideoForPreview,
|
|
30615
30677
|
CompositionManager,
|
|
30616
30678
|
CompositionSetters,
|
|
30617
|
-
|
|
30679
|
+
VisualModeGettersContext,
|
|
30680
|
+
VisualModeSettersContext,
|
|
30618
30681
|
SequenceManager,
|
|
30619
30682
|
SequenceStackTracesUpdateContext,
|
|
30620
30683
|
SequenceVisibilityToggleContext,
|
|
@@ -30623,7 +30686,6 @@ var Internals = {
|
|
|
30623
30686
|
sequenceStyleSchema,
|
|
30624
30687
|
flattenActiveSchema,
|
|
30625
30688
|
getFlatSchemaWithAllKeys,
|
|
30626
|
-
useSequenceControlOverride,
|
|
30627
30689
|
RemotionRootContexts,
|
|
30628
30690
|
CompositionManagerProvider,
|
|
30629
30691
|
useVideo,
|
|
@@ -30716,7 +30778,9 @@ var Internals = {
|
|
|
30716
30778
|
useMemoizedEffects,
|
|
30717
30779
|
defineEffect,
|
|
30718
30780
|
createDescriptor,
|
|
30719
|
-
computeEffectiveSchemaValuesDotNotation
|
|
30781
|
+
computeEffectiveSchemaValuesDotNotation,
|
|
30782
|
+
OverrideIdsToNodePathsGettersContext,
|
|
30783
|
+
OverrideIdsToNodePathsSettersContext
|
|
30720
30784
|
};
|
|
30721
30785
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
30722
30786
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -30754,7 +30818,7 @@ var flattenChildren = (children) => {
|
|
|
30754
30818
|
return flatChildren;
|
|
30755
30819
|
}, []);
|
|
30756
30820
|
};
|
|
30757
|
-
var IsInsideSeriesContext =
|
|
30821
|
+
var IsInsideSeriesContext = createContext25(false);
|
|
30758
30822
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
30759
30823
|
return /* @__PURE__ */ jsx34(IsInsideSeriesContext.Provider, {
|
|
30760
30824
|
value: true,
|
|
@@ -30796,9 +30860,6 @@ var SeriesInner = (props2) => {
|
|
|
30796
30860
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
|
|
30797
30861
|
}
|
|
30798
30862
|
const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
|
|
30799
|
-
if (!castedChild?.props.children) {
|
|
30800
|
-
throw new TypeError(`A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);
|
|
30801
|
-
}
|
|
30802
30863
|
const durationInFramesProp = castedChild.props.durationInFrames;
|
|
30803
30864
|
const {
|
|
30804
30865
|
durationInFrames,
|
|
@@ -31314,13 +31375,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
31314
31375
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
31315
31376
|
const videoConfig = useUnsafeVideoConfig();
|
|
31316
31377
|
const videoRef = useRef23(null);
|
|
31317
|
-
const sequenceContext =
|
|
31378
|
+
const sequenceContext = useContext35(SequenceContext);
|
|
31318
31379
|
const mediaStartsAt = useMediaStartsAt();
|
|
31319
31380
|
const environment = useRemotionEnvironment();
|
|
31320
31381
|
const logLevel = useLogLevel();
|
|
31321
31382
|
const mountTime = useMountTime();
|
|
31322
31383
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
31323
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
31384
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
|
|
31324
31385
|
const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
31325
31386
|
props2.src,
|
|
31326
31387
|
sequenceContext?.cumulatedFrom,
|
|
@@ -31336,7 +31397,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
31336
31397
|
mediaVolume: 1
|
|
31337
31398
|
});
|
|
31338
31399
|
warnAboutTooHighVolume(volume);
|
|
31339
|
-
|
|
31400
|
+
useEffect19(() => {
|
|
31340
31401
|
if (!props2.src) {
|
|
31341
31402
|
throw new Error("No src passed");
|
|
31342
31403
|
}
|
|
@@ -31379,7 +31440,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
31379
31440
|
useImperativeHandle9(ref, () => {
|
|
31380
31441
|
return videoRef.current;
|
|
31381
31442
|
}, []);
|
|
31382
|
-
|
|
31443
|
+
useEffect19(() => {
|
|
31383
31444
|
if (!window.remotion_videoEnabled) {
|
|
31384
31445
|
return;
|
|
31385
31446
|
}
|
|
@@ -31530,7 +31591,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
31530
31591
|
if (environment.isClientSideRendering) {
|
|
31531
31592
|
throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
31532
31593
|
}
|
|
31533
|
-
const { durations, setDurations } =
|
|
31594
|
+
const { durations, setDurations } = useContext36(DurationsContext);
|
|
31534
31595
|
if (typeof ref === "string") {
|
|
31535
31596
|
throw new Error("string refs are not supported");
|
|
31536
31597
|
}
|
|
@@ -31900,7 +31961,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
31900
31961
|
isActive: false
|
|
31901
31962
|
});
|
|
31902
31963
|
const eventTarget = useMemo38(() => new EventTarget, []);
|
|
31903
|
-
|
|
31964
|
+
useEffect20(() => {
|
|
31904
31965
|
if (disabled) {
|
|
31905
31966
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
31906
31967
|
} else {
|
|
@@ -32047,7 +32108,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
32047
32108
|
var lastCoordinates = null;
|
|
32048
32109
|
var useMousePosition = (ref) => {
|
|
32049
32110
|
const [angle, setAngle] = useState23(getAngle(ref.current, lastCoordinates));
|
|
32050
|
-
|
|
32111
|
+
useEffect20(() => {
|
|
32051
32112
|
const element = ref.current;
|
|
32052
32113
|
if (!element) {
|
|
32053
32114
|
return;
|
|
@@ -38346,7 +38407,7 @@ var Triangle2 = (props) => {
|
|
|
38346
38407
|
};
|
|
38347
38408
|
|
|
38348
38409
|
// src/components/prompts/PromptsSubmit.tsx
|
|
38349
|
-
import { useCallback as useCallback35, useEffect as
|
|
38410
|
+
import { useCallback as useCallback35, useEffect as useEffect47, useRef as useRef45, useState as useState47 } from "react";
|
|
38350
38411
|
|
|
38351
38412
|
// src/components/prompts/config.ts
|
|
38352
38413
|
var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
|
|
@@ -39225,7 +39286,7 @@ class AudioGainRadioGroup extends Component {
|
|
|
39225
39286
|
onSetup() {
|
|
39226
39287
|
this.#media = useMediaContext();
|
|
39227
39288
|
if (hasProvidedContext(menuContext)) {
|
|
39228
|
-
this.#menu =
|
|
39289
|
+
this.#menu = useContext44(menuContext);
|
|
39229
39290
|
}
|
|
39230
39291
|
}
|
|
39231
39292
|
onConnect(el) {
|
|
@@ -40615,7 +40676,7 @@ var DefaultKeyboardDisplay = React61.forwardRef(({ icons: Icons, ...props }, for
|
|
|
40615
40676
|
});
|
|
40616
40677
|
DefaultKeyboardDisplay.displayName = "DefaultKeyboardDisplay";
|
|
40617
40678
|
function getText() {
|
|
40618
|
-
const { $state } =
|
|
40679
|
+
const { $state } = useContext44(mediaContext), action = $state.lastKeyboardAction()?.action, audioGain = $state.audioGain() ?? 1;
|
|
40619
40680
|
switch (action) {
|
|
40620
40681
|
case "toggleMuted":
|
|
40621
40682
|
return $state.muted() ? "0%" : getVolumeText($state.volume(), audioGain);
|
|
@@ -40630,7 +40691,7 @@ function getVolumeText(volume, gain) {
|
|
|
40630
40691
|
return `${Math.round(volume * gain * 100)}%`;
|
|
40631
40692
|
}
|
|
40632
40693
|
function getIcon(Icons) {
|
|
40633
|
-
const { $state } =
|
|
40694
|
+
const { $state } = useContext44(mediaContext), action = $state.lastKeyboardAction()?.action;
|
|
40634
40695
|
switch (action) {
|
|
40635
40696
|
case "togglePaused":
|
|
40636
40697
|
return !$state.paused() ? Icons.Play : Icons.Pause;
|
|
@@ -40915,7 +40976,7 @@ var PromptsSubmitPage = () => {
|
|
|
40915
40976
|
});
|
|
40916
40977
|
const [isDragging, setIsDragging] = useState47(false);
|
|
40917
40978
|
const pollRef = useRef45(null);
|
|
40918
|
-
|
|
40979
|
+
useEffect47(() => {
|
|
40919
40980
|
return () => {
|
|
40920
40981
|
if (pollRef.current)
|
|
40921
40982
|
clearInterval(pollRef.current);
|