ZegoPIP class APIs

Main class for managing Picture-in-Picture (PIP) functionality.

This class provides a singleton instance that handles all PIP-related operations including initialization, enabling/disabling PIP mode, and managing background PIP.

Example usage:

// Initialize PIP
await ZegoPIP().init(
  expressConfig: ZegoPIPExpressConfig(
    create: ZegoPIPExpressCreateConfig(
      appID: 1234567890,
      appSign: 'your_app_sign',
    ),
    room: ZegoPIPExpressRoomConfig(
      roomID: 'test_room_id',
      userID: 'test_user_id',
      userName: 'test_user_name',
    ),
  ),
);

// Enable PIP mode
final status = await ZegoPIP().enable();

Constructors

ZegoPIP.new()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
private ZegoPipPrivate
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version String
Current version of the PIP plugin.
no setter

Methods

cancelBackground() Future<void>
Actively cancel background PIP mode.
enable() Future<PiPStatus>
Actively enable PIP mode.
enableWhenBackground() Future<PiPStatus>
Enable PIP mode when the app goes to background.
init({ZegoPIPConfig config = const ZegoPIPConfig(), ZegoPIPExpressConfig? expressConfig}) Future<bool>
Initialize the PIP functionality.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
uninit() Future<void>
Deinitialize the PIP functionality.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

shared ZegoPIP
final