Create android & web plugins (#15)

* create android & web plugins

* apply `flutter format .`
This commit is contained in:
Hiroshi Horie
2021-10-02 15:20:41 +09:00
committed by GitHub
parent 1a87bcf860
commit 48e03b84cb
43 changed files with 1200 additions and 356 deletions
+6 -3
View File
@@ -65,7 +65,8 @@ class RemoteParticipant extends Participant {
logger.fine('addSubscribedMediaTrack() pub is null, will wait...');
// Wait for the metadata to arrive
final event = await events.waitFor<TrackPublishedEvent>(
filter: (event) => event.participant == this && event.publication.sid == trackSid,
filter: (event) =>
event.participant == this && event.publication.sid == trackSid,
duration: Timeouts.publish,
onTimeout: () => throw TrackSubscriptionExceptionEvent(
participant: this,
@@ -78,7 +79,8 @@ class RemoteParticipant extends Participant {
}
// Check if track type is supported, throw if not.
if (![lk_models.TrackType.AUDIO, lk_models.TrackType.VIDEO].contains(pub.kind)) {
if (![lk_models.TrackType.AUDIO, lk_models.TrackType.VIDEO]
.contains(pub.kind)) {
throw TrackSubscriptionExceptionEvent(
participant: this,
sid: trackSid,
@@ -145,7 +147,8 @@ class RemoteParticipant extends Participant {
// unpublish any track that is not in the info
final validSids = info.tracks.map((e) => e.sid);
final removeSids = trackPublications.keys.where((e) => !validSids.contains(e)).toSet();
final removeSids =
trackPublications.keys.where((e) => !validSids.contains(e)).toSet();
for (final sid in removeSids) {
await unpublishTrack(sid, notify: true);
}