SnapshotConfig

Video snapshot settings.

class SnapshotConfig {
  const SnapshotConfig({this.filePath, this.position});

  @JsonKey(name: 'filePath')
  final String? filePath;

  @JsonKey(name: 'position')
  final VideoModulePosition? position;

  factory SnapshotConfig.fromJson(Map<String, dynamic> json) =>
      _$SnapshotConfigFromJson(json);

  Map<String, dynamic> toJson() => _$SnapshotConfigToJson(this);
}

Properties

filePath
Note: Make sure the directory exists and is writable.
Local path to save the snapshot, including file name and format. For example:
  • Windows: C:\Users\<user_name>\AppData\Local\Agora\<process_name>\example.jpg
  • iOS: /App Sandbox/Library/Caches/example.jpg
  • macOS: ~/Library/Logs/example.jpg
  • Android: /storage/emulated/0/Android/data/<package name>/files/example.jpg
position
The position of the video frame to snapshot within the video pipeline. See VideoModulePosition.