@twick/live-player / Exports
@twick/live-player
Table of contents
Variables
Functions
Variables
PLAYER_STATE
• Const
PLAYER_STATE: Object
Type declaration
Name | Type |
---|---|
PAUSED | string |
PLAYING | string |
REFRESH | string |
Defined in
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
Name | Type | Description |
---|---|---|
props | LivePlayerProps | Props to control the player and respond to its state |
Returns
Element
A configured player UI component
Defined in
LivePlayerProvider
▸ LivePlayerProvider(«destructured»
): Element
Parameters
Name | Type |
---|---|
«destructured» | Object |
› children | ReactNode |
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
Name | Type | Description |
---|---|---|
videoSize | Object | An object containing the width and height of the video. |
videoSize.height | number | - |
videoSize.width | number | - |
Returns
Object
A base project object with the specified video dimensions.
Name | Type |
---|---|
input | { properties : { height : number = videoSize.height; width : number = videoSize.width } } |
input.properties | { height : number = videoSize.height; width : number = videoSize.width } |
input.properties.height | number |
input.properties.width | number |
Defined in
useLivePlayerContext
▸ useLivePlayerContext(): LivePlayerContextType
Returns
LivePlayerContextType