1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-01-30 21:53:00 +00:00
comunicmobile/lib/models/call_member.dart

24 lines
519 B
Dart
Raw Normal View History

2020-04-20 14:02:32 +02:00
import 'package:flutter/material.dart';
2021-02-07 17:09:08 +01:00
import 'package:flutter_webrtc/flutter_webrtc.dart';
2020-04-20 14:02:32 +02:00
/// Single call member information
///
/// @author Pierre Hubert
enum MemberStatus { JOINED, READY }
class CallMember {
2020-04-20 15:02:49 +02:00
final int userID;
MemberStatus status;
2020-04-23 13:12:40 +02:00
MediaStream stream;
2020-04-20 14:02:32 +02:00
CallMember({
2020-04-20 15:02:49 +02:00
@required this.userID,
2020-04-20 14:24:35 +02:00
this.status = MemberStatus.JOINED,
2020-04-20 15:02:49 +02:00
}) : assert(userID != null),
2020-04-20 14:02:32 +02:00
assert(status != null);
2020-04-23 13:12:40 +02:00
bool get hasVideoStream =>
stream != null && stream.getVideoTracks().length > 0;
2020-04-20 14:02:32 +02:00
}