UNPKG

659 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.useVideo = void 0;
4const react_1 = require("react");
5const CompositionManager_1 = require("./CompositionManager");
6const 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};
15exports.useVideo = useVideo;
16//# sourceMappingURL=use-video.js.map
\No newline at end of file