onPipStateChanged

Callback for picture-in-picture state changes.

onPipStateChanged: (state: AgoraPipState, error: string | null) => void;
Since
Available since v4.6.2.

This callback is triggered by the SDK when the picture-in-picture state changes.

Parameters

state
The new picture-in-picture state. See AgoraPipState.
error
Returns error information if the state change fails; otherwise returns null.