Function: useVideoPlayer()
function useVideoPlayer(source, setup?): VideoPlayer;
Defined in: hooks/useVideoPlayer.ts:30
Creates a VideoPlayer instance and manages its lifecycle.
if initializeOnCreation is true (default), the setup function will be called when the player is started loading source.
if initializeOnCreation is false, the setup function will be called when the player is created. changes made to player made before initializing will be overwritten when initializing.
Parameters
| Parameter | Type | Description |
|---|---|---|
source | | VideoSource | VideoConfig | The source of the video to play |
setup? | (player) => void | A function to setup the player |
Returns
The VideoPlayer instance
We are TheWidlarzGroupPremium support →