Ios Stream Audio

merge-requests/131/head
Aamir Muhammad 3 years ago
parent 16ea3b7c66
commit 83b8691a31

@ -1202,9 +1202,26 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
void startRecoding() async {
PermissionStatus status = await Permission.microphone.request();
if (status.isDenied == true) {
if (status.isDenied) {
startRecoding();
} else if (status.isGranted) {
sRecoding();
} else {
startRecoding();
}
}
// else {
// isVoiceMsg = true;
// recorderController.reset();
// await recorderController.record(path);
// _recodeDuration = 0;
// _startTimer();
// isRecoding = !isRecoding;
// notifyListeners();
// }
void sRecoding() async {
isVoiceMsg = true;
recorderController.reset();
await recorderController.record(path);
@ -1213,7 +1230,6 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
isRecoding = !isRecoding;
notifyListeners();
}
}
Future<void> _startTimer() async {
_timer?.cancel();

Loading…
Cancel
Save