1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.useVideo = void 0;
|
4 | const react_1 = require("react");
|
5 | const CompositionManager_1 = require("./CompositionManager");
|
6 | const useVideo = () => {
|
7 | const context = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
8 | return (0, react_1.useMemo)(() => {
|
9 | var _a;
|
10 | return (_a = context.compositions.find((c) => {
|
11 | return c.id === context.currentComposition;
|
12 | })) !== null && _a !== void 0 ? _a : null;
|
13 | }, [context.compositions, context.currentComposition]);
|
14 | };
|
15 | exports.useVideo = useVideo;
|
16 |
|
\ | No newline at end of file |