Skip to main content

Interface: VideoMobjectOptions

Defined in: src/mobjects/video/VideoMobject.ts:8

Options for creating a VideoMobject.

Properties​

autoplay?​

optional autoplay: boolean

Defined in: src/mobjects/video/VideoMobject.ts:16

Start playing as soon as data is available. Default: false


center?​

optional center: Vector3Tuple

Defined in: src/mobjects/video/VideoMobject.ts:26

Center position [x, y, z]. Default: [0, 0, 0]


crossOrigin?​

optional crossOrigin: string

Defined in: src/mobjects/video/VideoMobject.ts:32

crossOrigin attribute for the video element. Default: 'anonymous'


doubleSided?​

optional doubleSided: boolean

Defined in: src/mobjects/video/VideoMobject.ts:30

Render both sides of the plane. Default: false


height?​

optional height: number

Defined in: src/mobjects/video/VideoMobject.ts:22

Height of the video in scene units. Default: auto from aspect ratio


loop?​

optional loop: boolean

Defined in: src/mobjects/video/VideoMobject.ts:12

Loop playback when it reaches the end. Default: false


muted?​

optional muted: boolean

Defined in: src/mobjects/video/VideoMobject.ts:14

Mute the audio track. Default: true (needed for browser autoplay policies)


opacity?​

optional opacity: number

Defined in: src/mobjects/video/VideoMobject.ts:28

Opacity from 0 to 1. Default: 1


playbackRate?​

optional playbackRate: number

Defined in: src/mobjects/video/VideoMobject.ts:18

Playback speed multiplier (1 = normal). Default: 1


scaleToFit?​

optional scaleToFit: boolean

Defined in: src/mobjects/video/VideoMobject.ts:24

If both width and height given, fit inside the box preserving aspect. Default: true


src​

src: string

Defined in: src/mobjects/video/VideoMobject.ts:10

Video source URL. Required.


width?​

optional width: number

Defined in: src/mobjects/video/VideoMobject.ts:20

Width of the video in scene units. Default: auto from aspect ratio