* chore: e2ee. * update. * update. * update. * update. * chore: Use feat/frame-encryption branch of flutter-webrtc. * chore: Add E2EEKEY defines for dart environment, and e2ee switch. * Add encodedInsertableStreams to RTCConfiguration. * update. * feat: Add e2ee indicator for Participant. * feat: add e2ee worker js for flutter web. * dart format. * remove unused file. * fix flutter analyze . * update. * update. * add: indicate for decryption failure, and string key. * remove .lock files. * update. * update. * update e2ee.worker for web. * feat: support setCodecPreferences. * state TrackE2EEStateEvent. * fix wrong import interface from dart_webrtc. * update. * update. * update. * update. * update pubspec.lock. * chore: update protocol and add EncryptionType for Participant. * Update lib/src/e2ee/options.dart Co-authored-by: Théo Monnom <[email protected]> * fix typo. * revert changes for internal import. * Add _cleanUp() for previous room. * Add e2ee supports detection method for native/web. * Remove redundant overriding methods. * dart format. * Add e2ee.worker code and deployment docs. * chore: remove duplicate words. * chore: using Pbkdf2 derive the key. * Update pubspec.yaml * fix e2ee for safari. * fix key length. * update e2ee.worker.dart.js. * fix. * update proto. * update. * chore: add simulate for rachetKey. * update. * chore: key ratchet for flutter web. * update. * update. * update. * chore: key ratchet export for web. * bump version for xframeworks. * update. * chore: some changes for key safety ratcheting. * update. * fix typo. * update. * rename. * magic bytes for web. * bump version for flutter-webrtc. * fix analyzer. --------- Co-authored-by: Théo Monnom <[email protected]>
94 lines
2.9 KiB
Dart
94 lines
2.9 KiB
Dart
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:livekit_client/livekit_client.dart';
|
|
|
|
class ParticipantTrack {
|
|
ParticipantTrack(
|
|
{required this.participant,
|
|
required this.videoTrack,
|
|
required this.isScreenShare});
|
|
VideoTrack? videoTrack;
|
|
Participant participant;
|
|
final bool isScreenShare;
|
|
}
|
|
|
|
class ParticipantInfoWidget extends StatelessWidget {
|
|
//
|
|
final String? title;
|
|
final bool audioAvailable;
|
|
final ConnectionQuality connectionQuality;
|
|
final bool isScreenShare;
|
|
final bool enabledE2EE;
|
|
|
|
const ParticipantInfoWidget({
|
|
this.title,
|
|
this.audioAvailable = true,
|
|
this.connectionQuality = ConnectionQuality.unknown,
|
|
this.isScreenShare = false,
|
|
this.enabledE2EE = false,
|
|
Key? key,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) => Container(
|
|
color: Colors.black.withOpacity(0.3),
|
|
padding: const EdgeInsets.symmetric(
|
|
vertical: 7,
|
|
horizontal: 10,
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
if (title != null)
|
|
Flexible(
|
|
child: Text(
|
|
title!,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
),
|
|
isScreenShare
|
|
? const Padding(
|
|
padding: EdgeInsets.only(left: 5),
|
|
child: Icon(
|
|
EvaIcons.monitor,
|
|
color: Colors.white,
|
|
size: 16,
|
|
),
|
|
)
|
|
: Padding(
|
|
padding: const EdgeInsets.only(left: 5),
|
|
child: Icon(
|
|
audioAvailable ? EvaIcons.mic : EvaIcons.micOff,
|
|
color: audioAvailable ? Colors.white : Colors.red,
|
|
size: 16,
|
|
),
|
|
),
|
|
if (connectionQuality != ConnectionQuality.unknown)
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 5),
|
|
child: Icon(
|
|
connectionQuality == ConnectionQuality.poor
|
|
? EvaIcons.wifiOffOutline
|
|
: EvaIcons.wifi,
|
|
color: {
|
|
ConnectionQuality.excellent: Colors.green,
|
|
ConnectionQuality.good: Colors.orange,
|
|
ConnectionQuality.poor: Colors.red,
|
|
}[connectionQuality],
|
|
size: 16,
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 5),
|
|
child: Icon(
|
|
enabledE2EE ? EvaIcons.lock : EvaIcons.unlock,
|
|
color: enabledE2EE ? Colors.green : Colors.red,
|
|
size: 16,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|