Open brotherdang opened 2 hours ago
AudioSession.instance.then((session) { session.setActive(true); subscription4DeviceRemoved = session.devicesChangedEventStream.listen((event) async { if (ref.read(seriesProvider(seriesID))?.model?.viewEpisode != episode?.index || episode?.unlock == false) return;
var devices = await session.getDevices(); LogUtils.printLog("eventStream 11", "devices.length = ${devices.length}"); context.showToast("音频设备个数${devices.length}");
when I plug in or remove earphone, I can not get weather it is plug in-or-remove.
AudioSession.instance.then((session) { session.setActive(true); subscription4DeviceRemoved = session.devicesChangedEventStream.listen((event) async { if (ref.read(seriesProvider(seriesID))?.model?.viewEpisode != episode?.index || episode?.unlock == false) return;