Skip to content

🎥 Make videos programmatically with React

controls in demo

Jonny Burger247a924fa691
diff --git a/packages/docs/components/demos/index.tsx b/packages/docs/components/demos/index.tsx
index f6b5d758ab..70d81d163c 100644
--- a/packages/docs/components/demos/index.tsx
+++ b/packages/docs/components/demos/index.tsx
@@ -169,6 +169,7 @@ export const Demo: React.FC<{
}}
inputProps={{...state, darkMode: colorMode === 'dark'}}
autoPlay={demo.autoPlay}
+ controls={demo.controls}
loop
/>
<div className={styles.containerrow}>
diff --git a/packages/docs/components/demos/types.ts b/packages/docs/components/demos/types.ts
index a8c89b913a..2cb7925798 100644
--- a/packages/docs/components/demos/types.ts
+++ b/packages/docs/components/demos/types.ts
@@ -72,6 +72,7 @@ export type DemoType = {
durationInFrames: number;
options: Option[];
autoPlay: boolean;
+ controls: boolean;
};
export const rectDemo: DemoType = {
@@ -82,6 +83,7 @@ export const rectDemo: DemoType = {
fps: 30,
id: 'rect',
autoPlay: false,
+ controls: false,
options: [
{
default: 200,
@@ -136,6 +138,7 @@ export const triangleDemo: DemoType = {
fps: 30,
id: 'triangle',
autoPlay: false,
+ controls: false,
options: [
{
default: 200,
@@ -188,6 +191,7 @@ export const circleDemo: DemoType = {
fps: 30,
id: 'circle',
autoPlay: false,
+ controls: false,
options: [
{
default: 200,
@@ -209,6 +213,7 @@ export const heartDemo: DemoType = {
fps: 30,
id: 'heart',
autoPlay: false,
+ controls: false,
options: [
{
default: 300,
@@ -264,6 +269,7 @@ export const heartDemo: DemoType = {
export const translateDemo: DemoType = {
comp: TranslateDemo,
autoPlay: false,
+ controls: false,
compHeight: 400,
compWidth: 1280,
durationInFrames: 150,
@@ -294,6 +300,7 @@ export const translateDemo: DemoType = {
export const skewDemo: DemoType = {
comp: SkewDemo,
autoPlay: false,
+ controls: false,
compHeight: 400,
compWidth: 1280,
durationInFrames: 150,
@@ -315,6 +322,7 @@ export const skewDemo: DemoType = {
export const scaleDemo: DemoType = {
comp: ScaleDemo,
autoPlay: false,
+ controls: false,
compHeight: 400,
compWidth: 1280,
durationInFrames: 150,
@@ -336,6 +344,7 @@ export const scaleDemo: DemoType = {
export const opacityDemo: DemoType = {
comp: OpacityDemo,
autoPlay: false,
+ controls: false,
compHeight: 400,
compWidth: 1280,
durationInFrames: 150,
@@ -357,6 +366,7 @@ export const opacityDemo: DemoType = {
export const rotateDemo: DemoType = {
comp: RotateDemo,
autoPlay: false,
+ controls: false,
compHeight: 400,
compWidth: 1280,
durationInFrames: 150,
@@ -383,6 +393,7 @@ export const pieDemo: DemoType = {
fps: 30,
id: 'pie',
autoPlay: false,
+ controls: false,
options: [
{
default: 200,
@@ -440,6 +451,7 @@ export const ellipseDemo: DemoType = {
fps: 30,
id: 'ellipse',
autoPlay: false,
+ controls: false,
options: [
{
default: 150,
@@ -469,6 +481,7 @@ export const polygonDemo: DemoType = {
fps: 30,
id: 'polygon',
autoPlay: false,
+ controls: false,
options: [
{
default: 3,
@@ -517,6 +530,7 @@ export const starDemo: DemoType = {
fps: 30,
id: 'star',
autoPlay: false,
+ controls: false,
options: [
{
default: 100,
@@ -574,6 +588,7 @@ export const noiseDemo: DemoType = {
fps: 30,
id: 'noise',
autoPlay: true,
+ controls: false,
options: [
{
default: 0.01,
@@ -613,6 +628,7 @@ export const fadePresentationDemo: DemoType = {
fps: 30,
id: 'fade',
autoPlay: true,
+ controls: false,
options: [],
};
@@ -624,6 +640,7 @@ export const slidePresentationDemo: DemoType = {
fps: 30,
id: 'slide',
autoPlay: true,
+ controls: false,
options: [
{
type: 'enum',
@@ -642,6 +659,7 @@ export const flipPresentationDemo: DemoType = {
fps: 30,
id: 'flip',
autoPlay: true,
+ controls: false,
options: [
{
type: 'enum',
@@ -661,6 +679,7 @@ export const nonePresentationDemo: DemoType = {
fps: 30,
id: 'none',
autoPlay: true,
+ controls: false,
options: [],
};
@@ -672,6 +691,7 @@ export const slidePresentationDemoLongThreshold: DemoType = {
fps: 30,
id: 'slide-long-duration-rest',
autoPlay: true,
+ controls: false,
options: [],
};
@@ -683,6 +703,7 @@ export const wipePresentationDemo: DemoType = {
fps: 30,
id: 'wipe',
autoPlay: true,
+ controls: false,
options: [
{
type: 'enum',
@@ -711,6 +732,7 @@ export const roundedTextBoxDemo: DemoType = {
fps: 30,
id: 'rounded-text-box',
autoPlay: true,
+ controls: false,
options: [
{
type: 'enum',
@@ -764,6 +786,7 @@ export const clockWipePresentationDemo: DemoType = {
fps: 30,
id: 'clock-wipe',
autoPlay: true,
+ controls: false,
options: [],
};
@@ -775,6 +798,7 @@ export const irisPresentationDemo: DemoType = {
fps: 30,
id: 'iris',
autoPlay: true,
+ controls: false,
options: [],
};
@@ -786,6 +810,7 @@ export const cubePresentationDemo: DemoType = {
fps: 30,
id: 'cube',
autoPlay: true,
+ controls: false,
options: [
{
type: 'enum',
@@ -805,6 +830,7 @@ export const customPresentationDemo: DemoType = {
fps: 30,
id: 'custom-presentation',
autoPlay: true,
+ controls: false,
options: [],
};
@@ -816,6 +842,7 @@ export const customTimingDemo: DemoType = {
fps: 30,
id: 'custom-timing',
autoPlay: true,
+ controls: false,
options: [],
};
@@ -827,6 +854,7 @@ export const animationMathDemo: DemoType = {
fps: 30,
id: 'animation-math',
autoPlay: true,
+ controls: false,
options: [],
};
@@ -838,6 +866,7 @@ export const springDemo: DemoType = {
fps: 30,
id: 'spring',
autoPlay: true,
+ controls: false,
options: [
{
name: 'damping',
@@ -898,6 +927,7 @@ export const shaderDemo: DemoType = {
fps: 30,
id: 'shader',
autoPlay: true,
+ controls: false,
options: [],
};
@@ -909,6 +939,7 @@ export const springDampingDemo: DemoType = {
fps: 30,
id: 'spring-damping',
autoPlay: true,
+ controls: false,
options: [
{
name: 'damping',
@@ -930,6 +961,7 @@ export const lightLeakDemo: DemoType = {
fps: 30,
id: 'light-leak',
autoPlay: true,
+ controls: true,
options: [
{
name: 'seed',
@@ -960,6 +992,7 @@ export const transitionSeriesTransitionDemo: DemoType = {
fps: 30,
id: 'transition-series-transition',
autoPlay: true,
+ controls: false,
options: [
{
name: 'presentation',
@@ -988,6 +1021,7 @@ export const transitionSeriesOverlayDemo: DemoType = {
fps: 30,
id: 'transition-series-overlay',
autoPlay: true,
+ controls: true,
options: [
{
name: 'overlayDuration',
@@ -1018,6 +1052,7 @@ export const transitionSeriesEnterExitDemo: DemoType = {
fps: 30,
id: 'transition-series-enter-exit',
autoPlay: true,
+ controls: false,
options: [
{
name: 'presentation',