Solian/lib/models/call.dart

57 lines
1.2 KiB
Dart
Raw Permalink Normal View History

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';
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;
@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,
});
factory Call.fromJson(Map<String, dynamic> json) => _$CallFromJson(json);
2024-05-18 10:17:16 +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;
}