GroupCallParticipantVideo.deserialize constructor
GroupCallParticipantVideo.deserialize(
- BinaryReader reader
Deserialize.
Implementation
factory GroupCallParticipantVideo.deserialize(BinaryReader reader) {
// Read [GroupCallParticipantVideo] fields.
final flags = reader.readInt32();
final paused = (flags & 1) != 0;
final endpoint = reader.readString();
final sourceGroups =
reader.readVectorObject<GroupCallParticipantVideoSourceGroupBase>();
final hasAudioSourceField = (flags & 2) != 0;
final audioSource = hasAudioSourceField ? reader.readInt32() : null;
// Construct [GroupCallParticipantVideo] object.
final returnValue = GroupCallParticipantVideo(
paused: paused,
endpoint: endpoint,
sourceGroups: sourceGroups.items,
audioSource: audioSource,
);
// Now return the deserialized [GroupCallParticipantVideo].
return returnValue;
}