Create android & web plugins (#15)
* create android & web plugins * apply `flutter format .`
This commit is contained in:
@@ -89,7 +89,8 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
||||
|
||||
void _toggleCamera() async {
|
||||
//
|
||||
final track = participant.videoTracks.firstOrNull?.track as LocalVideoTrack?;
|
||||
final track =
|
||||
participant.videoTracks.firstOrNull?.track as LocalVideoTrack?;
|
||||
if (track == null) return;
|
||||
|
||||
try {
|
||||
@@ -113,7 +114,8 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
||||
}
|
||||
|
||||
try {
|
||||
final screenTrack = await LocalVideoTrack.createScreenTrack(); // Defaults to camera
|
||||
final screenTrack =
|
||||
await LocalVideoTrack.createScreenTrack(); // Defaults to camera
|
||||
await widget.room.localParticipant.publishVideoTrack(
|
||||
screenTrack,
|
||||
);
|
||||
@@ -177,7 +179,9 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
||||
icon: const Icon(EvaIcons.videoOff),
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(position == CameraPosition.back ? EvaIcons.camera : EvaIcons.person),
|
||||
icon: Icon(position == CameraPosition.back
|
||||
? EvaIcons.camera
|
||||
: EvaIcons.person),
|
||||
onPressed: () => _toggleCamera(),
|
||||
),
|
||||
IconButton(
|
||||
|
||||
@@ -50,7 +50,8 @@ class _ParticipantWidgetState extends State<ParticipantWidget> {
|
||||
// register for change so Flutter will re-build the widget upon change
|
||||
void _onParticipantChanged() {
|
||||
//
|
||||
final firstAudio = widget.participant.audioTracks.firstWhereOrNull((pub) => pub.subscribed);
|
||||
final firstAudio = widget.participant.audioTracks
|
||||
.firstWhereOrNull((pub) => pub.subscribed);
|
||||
final firstVideo = widget.participant.videoTracks
|
||||
.firstWhereOrNull((pub) => !pub.isScreenShare && pub.subscribed);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user