AgoraPipOptions

Configuration options for Agora picture-in-picture mode.

class AgoraPipOptions {
  final bool? autoEnterEnabled;
  final int? aspectRatioX;
  final int? aspectRatioY;
  final int? sourceRectHintLeft;
  final int? sourceRectHintTop;
  final int? sourceRectHintRight;
  final int? sourceRectHintBottom;
  final bool? seamlessResizeEnabled;
  final bool? useExternalStateMonitor;
  final int? externalStateMonitorInterval;
  final int? sourceContentView;
  int? contentView;
  final List<AgoraPipVideoStream>? videoStreams;
  final AgoraPipContentViewLayout? contentViewLayout;
  final int? preferredContentWidth;
  final int? preferredContentHeight;
  final int? controlStyle;
}
Since
Available since v4.6.2.

This class provides platform-specific options to configure picture-in-picture behavior on Android and iOS platforms.

Properties

autoEnterEnabled
Whether to automatically enter picture-in-picture mode. (Android only)
aspectRatioX
Horizontal aspect ratio of the picture-in-picture window. (Android only)
aspectRatioY
Vertical aspect ratio of the picture-in-picture window. (Android only)
sourceRectHintLeft
Left coordinate of the source rectangle hint. Used to specify the initial position of the picture-in-picture window. (Android only)
sourceRectHintTop
Top coordinate of the source rectangle hint. Used to specify the initial position of the picture-in-picture window. (Android only)
sourceRectHintRight
Right coordinate of the source rectangle hint. Used to specify the initial position of the picture-in-picture window. (Android only)
sourceRectHintBottom
Bottom coordinate of the source rectangle hint. Used to specify the initial position of the picture-in-picture window. (Android only)
seamlessResizeEnabled
Whether to enable seamless resizing of the picture-in-picture window. When enabled, the picture-in-picture window resizes smoothly. Default is false. (Android only)
useExternalStateMonitor
Whether to use an external state monitor. When enabled, a dedicated thread is created to monitor the picture-in-picture window state. Use externalStateMonitorInterval to configure the monitoring frequency. Default is false. (Android only)
externalStateMonitorInterval
Interval for external state monitoring in milliseconds. Takes effect only when useExternalStateMonitor is true. Default is 100ms. (Android only)
sourceContentView
Identifier of the source content view. Set to 0 to use the root view as the source. (iOS only)
contentView
Identifier of the content view used for video rendering. Set to 0 to let the SDK manage the view. When set to 0, you must provide video sources via videoStreams. (iOS only)
videoStreams
Video transcoding configuration. Takes effect only when contentView is set to 0. When the SDK manages the view, all video streams are placed in the root view of the picture-in-picture window. (iOS only)
contentViewLayout
Layout configuration for picture-in-picture video streams. Takes effect only when contentView is set to 0. (iOS only)
preferredContentWidth
Preferred width of the picture-in-picture content. (iOS only)
preferredContentHeight
Preferred height of the picture-in-picture content. (iOS only)
controlStyle
Control style of the picture-in-picture window. Available styles:
  • 0: Show all system controls (default)
  • 1: Hide forward and backward buttons
  • 2: Hide play/pause button and progress bar (recommended)
  • 3: Hide all system controls, including close and resume buttons
(iOS only)