Metadata

Media metadata.

@JsonSerializable(explicitToJson: true, includeIfNull: false)
class Metadata {
  const Metadata(
      {this.channelId, this.uid, this.size, this.buffer, this.timeStampMs});

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

  @JsonKey(name: 'uid')
  final int? uid;

  @JsonKey(name: 'size')
  final int? size;

  @JsonKey(name: 'buffer', ignore: true)
  final Uint8List? buffer;

  @JsonKey(name: 'timeStampMs')
  final int? timeStampMs;

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

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

Properties

channelId
Channel name.
uid
User ID.
  • For receivers: the ID of the remote user who sent this Metadata.
  • For senders: ignore this field.
size
The buffer size of the received or sent Metadata.
buffer
The buffer address of the received Metadata.
timeStampMs
The timestamp when the Metadata is sent, in milliseconds.