feat: web/native device consistency management (#243)

* fix: Force audio settings to be consistent.

* chore: applyAudioSettings for onUnpublish.

* revert audio output select for web.

* add RoomHardwareManagementMethods to Room.

* update.

* fix analyze.

* update.

* update.

* chore: Reset sinkId for web when remoteTrack replays.

* rename setAudioOutput to setSinkId for flutter web.

* chore: Make sure AudioElement has `setSinkId` method.
This commit is contained in:
CloudWebRTC
2023-03-07 17:54:06 +08:00
committed by GitHub
parent 70e6589981
commit db2e25d424
12 changed files with 275 additions and 136 deletions
+3
View File
@@ -88,6 +88,7 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
// did publish
await track.onPublish();
await room.applyAudioSpeakerSettings();
[events, room.events].emit(LocalTrackPublishedEvent(
participant: this,
@@ -228,6 +229,7 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
// did unpublish
await track.onUnpublish();
await room.applyAudioSpeakerSettings();
}
if (notify) {
@@ -319,6 +321,7 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
await publication.mute();
}
}
await room.applyAudioSpeakerSettings();
return publication;
} else if (enabled) {
if (source == TrackSource.camera) {