2024-09-16 18:14:23 +00:00
|
|
|
import 'package:json_annotation/json_annotation.dart';
|
2024-06-01 12:18:25 +00:00
|
|
|
import 'package:livekit_client/livekit_client.dart';
|
2024-05-18 10:17:16 +00:00
|
|
|
import 'package:solian/models/channel.dart';
|
|
|
|
|
2024-09-07 07:36:06 +00:00
|
|
|
part 'call.g.dart';
|
|
|
|
|
|
|
|
@JsonSerializable()
|
2024-05-18 10:17:16 +00:00
|
|
|
class Call {
|
|
|
|
int id;
|
|
|
|
DateTime createdAt;
|
|
|
|
DateTime updatedAt;
|
|
|
|
DateTime? deletedAt;
|
|
|
|
DateTime? endedAt;
|
|
|
|
String externalId;
|
|
|
|
int founderId;
|
|
|
|
int channelId;
|
2024-09-08 08:03:50 +00:00
|
|
|
@JsonKey(defaultValue: [])
|
|
|
|
List<dynamic>? participants;
|
2024-05-18 10:17:16 +00:00
|
|
|
Channel channel;
|
|
|
|
|
|
|
|
Call({
|
|
|
|
required this.id,
|
|
|
|
required this.createdAt,
|
|
|
|
required this.updatedAt,
|
2024-05-28 16:14:41 +00:00
|
|
|
required this.deletedAt,
|
|
|
|
required this.endedAt,
|
2024-05-18 10:17:16 +00:00
|
|
|
required this.externalId,
|
|
|
|
required this.founderId,
|
|
|
|
required this.channelId,
|
2024-08-02 09:14:23 +00:00
|
|
|
required this.participants,
|
2024-05-18 10:17:16 +00:00
|
|
|
required this.channel,
|
|
|
|
});
|
|
|
|
|
2024-09-07 07:36:06 +00:00
|
|
|
factory Call.fromJson(Map<String, dynamic> json) => _$CallFromJson(json);
|
2024-05-18 10:17:16 +00:00
|
|
|
|
2024-09-07 07:36:06 +00:00
|
|
|
Map<String, dynamic> toJson() => _$CallToJson(this);
|
2024-05-18 10:17:16 +00:00
|
|
|
}
|
2024-06-01 12:18:25 +00:00
|
|
|
|
|
|
|
enum ParticipantStatsType {
|
|
|
|
unknown,
|
|
|
|
localAudioSender,
|
|
|
|
localVideoSender,
|
|
|
|
remoteAudioReceiver,
|
|
|
|
remoteVideoReceiver,
|
|
|
|
}
|
|
|
|
|
|
|
|
class ParticipantTrack {
|
|
|
|
ParticipantTrack(
|
|
|
|
{required this.participant,
|
|
|
|
required this.videoTrack,
|
|
|
|
required this.isScreenShare});
|
2024-08-02 09:14:23 +00:00
|
|
|
|
2024-06-01 12:18:25 +00:00
|
|
|
VideoTrack? videoTrack;
|
|
|
|
Participant participant;
|
|
|
|
bool isScreenShare;
|
|
|
|
}
|