Skip to main content

@twick/live-player / Exports

@twick/live-player

Table of contents

Variables

Functions

Variables

PLAYER_STATE

Const PLAYER_STATE: Object

Type declaration

NameType
PAUSEDstring
PLAYINGstring
REFRESHstring

Defined in

helpers/constants.ts:2

Functions

LivePlayer

LivePlayer(props): Element

LivePlayer is a React component that wraps around the @revideo/player-react player.

It supports dynamic project variables, external control for playback, time seeking, volume and quality adjustment, and lifecycle callbacks like onPlayerReady and onDurationChange.

Parameters

NameTypeDescription
propsLivePlayerPropsProps to control the player and respond to its state

Returns

Element

A configured player UI component

Defined in

components/live-player.tsx:63


LivePlayerProvider

LivePlayerProvider(«destructured»): Element

Parameters

NameType
«destructured»Object
› childrenReactNode

Returns

Element

Defined in

context/live-player-context.tsx:19


getBaseProject

getBaseProject(videoSize): Object

Generates a base project structure for the Twick Live Player.

This function returns a minimal project configuration object with the specified video dimensions. It's typically used as a starting point for building or loading video compositions.

Parameters

NameTypeDescription
videoSizeObjectAn object containing the width and height of the video.
videoSize.heightnumber-
videoSize.widthnumber-

Returns

Object

A base project object with the specified video dimensions.

NameType
input{ properties: { height: number = videoSize.height; width: number = videoSize.width } }
input.properties{ height: number = videoSize.height; width: number = videoSize.width }
input.properties.heightnumber
input.properties.widthnumber

Defined in

helpers/player.utils.ts:11


useLivePlayerContext

useLivePlayerContext(): LivePlayerContextType

Returns

LivePlayerContextType

Defined in

context/live-player-context.tsx:51