Add audio-only WebRTC calls
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
9e4f9d55ea
commit
97e197996f
26 changed files with 384 additions and 94 deletions
|
|
@ -37,10 +37,12 @@ internal sealed class AndroidWebRtcMedia : WebRtcNativeMedia
|
|||
protected override async Task StartCoreAsync(WebRtcMediaConfiguration configuration, CancellationToken ct)
|
||||
{
|
||||
var activity = MainActivity.Current ?? throw new InvalidOperationException("Activité Android indisponible.");
|
||||
await PodcastPermissions.EnsureAsync(activity, microphone: true, ct, notifications: false);
|
||||
await PodcastPermissions.EnsureAsync(activity, microphone: true, ct, notifications: false,
|
||||
camera: !configuration.AudioOnly);
|
||||
if (!MainActivity.IsForeground)
|
||||
throw new InvalidOperationException("Revenez dans PostIt pour demarrer l'appel.");
|
||||
await Task.WhenAll(_local.Ready, _remote.Ready).WaitAsync(TimeSpan.FromSeconds(10), ct);
|
||||
if (!configuration.AudioOnly)
|
||||
await Task.WhenAll(_local.Ready, _remote.Ready).WaitAsync(TimeSpan.FromSeconds(10), ct);
|
||||
await SendCommandAsync(StartCommand(configuration), ct);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue