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
+10
View File
@@ -15,6 +15,16 @@ class LocalAudioTrack extends LocalTrack
@override
covariant AudioCaptureOptions currentOptions;
Future<void> setDeviceId(String deviceId) async {
if (currentOptions.deviceId == deviceId) {
return;
}
currentOptions = currentOptions.copyWith(deviceId: deviceId);
if (!muted) {
await restartTrack();
}
}
// private constructor
@internal
LocalAudioTrack(