Support avatar video sources for SRTP calls
Use the shared LibVLC audio-video pipeline for camera-free calls on Linux and Android. Add capability signaling, microphone-only Android capture, avatar lifecycle handling and regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
97e197996f
commit
f05dd48ac7
27 changed files with 604 additions and 86 deletions
|
|
@ -37,6 +37,31 @@ public sealed class CallTransportRoutingTests
|
|||
Assert.False(webRtc.Busy);
|
||||
}
|
||||
|
||||
[AvaloniaFact]
|
||||
public async Task Audio_page_keeps_srtp_avatar_call_and_received_video_available_without_camera_controls()
|
||||
{
|
||||
var signaling = new Signaling();
|
||||
await using var lan = new LanCallViewModel(signaling, loadAvatar: (_, _) => Task.FromResult<Bitmap?>(null))
|
||||
{
|
||||
RemoteVideo = new Border()
|
||||
};
|
||||
var chat = new ChatViewModel(settings: new Settings()) { LanCall = lan, IsConnected = true };
|
||||
var page = new CallPage { DataContext = new AudioCallPageViewModel(chat) };
|
||||
var window = new Window { Content = page };
|
||||
try
|
||||
{
|
||||
window.Show();
|
||||
Assert.True(page.FindControl<StackPanel>("LanCallPanel")!.IsVisible);
|
||||
Assert.False(page.FindControl<ComboBox>("LanCamera")!.IsVisible);
|
||||
Assert.False(page.FindControl<Button>("LanVideoInvite")!.IsVisible);
|
||||
Assert.True(page.FindControl<Button>("LanAudioInvite")!.IsEffectivelyVisible);
|
||||
var video = page.FindControl<ContentControl>("LanRemoteVideo")!;
|
||||
Assert.True(video.IsEffectivelyVisible);
|
||||
Assert.Same(lan.RemoteVideo, video.Content);
|
||||
}
|
||||
finally { window.Close(); }
|
||||
}
|
||||
|
||||
[AvaloniaFact]
|
||||
public async Task Audio_page_shows_static_image_and_hides_video_and_srtp_controls()
|
||||
{
|
||||
|
|
@ -204,6 +229,8 @@ public sealed class CallTransportRoutingTests
|
|||
throw new NotSupportedException();
|
||||
public Task<CallSession> InviteLanAsync(string room, string user, CancellationToken ct = default) =>
|
||||
throw new NotSupportedException();
|
||||
public Task<CallSession> InviteLanAudioAsync(string room, string user, CancellationToken ct = default) =>
|
||||
throw new NotSupportedException();
|
||||
public Task AcceptAsync(Guid callId, CancellationToken ct = default) => throw new NotSupportedException();
|
||||
public Task EndAsync(Guid callId, CancellationToken ct = default)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue