Class VideoEditor
Implements
- VideoEditor
Constructors
constructor
-
new VideoEditor(
options?: {
assets?: VideoEditorAssetStore;
sync?: VideoEditorDocumentSync;
},
): VideoEditorParameters
- options: { assets?: VideoEditorAssetStore; sync?: VideoEditorDocumentSync } = {}
Returns VideoEditor
Properties
Readonly Internal_editor
Readonly_fullscreen
exit: () => Promise<void>;
isFullscreen: Ref<boolean>;
isSupported: boolean;
request: () => Promise<void>;
toggle: () => Promise<void>;
} = ...
_isMobileWorkspace
Readonly_timelineContainer
Readonly_timelineSize
Readonly_viewport
Readonly_viewportContainer
Readonly_viewportSize
Readonly_workspaceContainer
Readonly_workspaceSize
Readonly_zoom
canvas
Readonlydoc
effectRenderer
The webgl-effects Renderer instance
isDisposed
playback
resize
Optional Readonlysync
ReadonlytimelineZoom
Accessors
_showStats
-
get _showStats(): boolean
InternalReturns boolean
-
set _showStats(value: boolean): void
InternalParameters
- value: boolean
Returns void
activeAssetBin
-
get activeAssetBin(): AssetBin
The state of the asset bin ui
Returns AssetBin
-
set activeAssetBin(value: AssetBin): void
The state of the asset bin ui
Parameters
- value: AssetBin
Returns void
canvasZoom
-
get canvasZoom(): number
Returns number
currentTime
-
get currentTime(): number
The current playback time of the video timeline
Returns number
drag
-
get drag(): ClipDragContext
Returns ClipDragContext
effects
-
The webgl-effects that are loaded into the editor
Returns Map<string, VideoEffectAsset>
exportProgress
-
get exportProgress(): number
Progress from 0 to 1 while exporting
Returns number
isMobileWorkspace
-
get isMobileWorkspace(): boolean
Returns boolean
isPaused
-
get isPaused(): boolean
Returns boolean
selection
-
The currently selected video clip on the timeline.
Returns AnyClip | GapSelection | undefined
tracks
-
The audio and video tracks which contain clips
Returns Track[]
viewportSize
-
get viewportSize(): Size
Returns Size
Methods
_transact
[dispose]
-
Returns void
addClip
-
Add a new clip at the end of the specified track.
Parameters
- track: Track
The track the clip will be added to.
- asset: MediaAsset
The media asset attached to the clip.
Returns AnyClip
- track: Track
addTrack
-
Add a new track to the timeline.
Parameters
- trackType: "audio" | "video"
The track the clip will be added to.
Returns Track
- trackType: "audio" | "video"
createMediaAsset
-
Create a new media asset with the given source File or URI
Parameters
- source: string | Blob
A Blob or URI string of the clip media.
Returns Promise<MediaAsset>
- source: string | Blob
dispose
-
Release resources of the video editor and allow it to be garbage collected.
Returns void
export
-
Render and encode the video composition.
Parameters
Optionaloptions: { signal?: AbortSignal }
Returns Promise<Blob>
A promise that resolves to a
Blob.
generateId
-
Returns string
getPartId
-
Parameters
- part: string
Returns string
getTrackForMedia
importJson
-
Adds assets and tracks from the provided JSON object
Parameters
- content: SerializedDocument
Returns void
pause
-
Returns void
pixelsToSeconds
-
Parameters
- offset: number
Returns number
play
-
Returns void
replaceClipAsset
secondsToPixels
-
Parameters
- time: number
Returns number
seekTo
-
Seek to the given time of the video.
Parameters
- time: number
The seek time in seconds.
Returns void
- time: number
select
-
Select the given track item
Parameters
- item: AnyClip | GapSelection | undefined
- seek: boolean = ...
Returns void
The canvas that the video is rendered to