Skip to main content
Version: v7 Alpha

Function: useEvent()

function useEvent<T>(
player,
event,
callback): void;

Defined in: hooks/useEvent.ts:25

Attaches an event listener to a VideoPlayer instance for a specified event.

Type Parameters

Type Parameter
T extends Events

Parameters

ParameterTypeDescription
playerVideoPlayerThe player to attach the event to
eventTThe name of the event to attach the callback to
callback(...args) => voidThe callback for the event

Returns

void

We are TheWidlarzGroupPremium support →