3 Commits

Author SHA1 Message Date
87ade75f1d Merge remote-tracking branch 'origin/RTC-Rewrite' into RTC-Rewrite
# Conflicts:
#	RelayClient/MainPage.xaml.cs
2026-04-29 09:11:58 -04:00
798652cb4d Set the target of RTC to _rtc and removed all Pass Through Methods. 2026-04-29 09:10:49 -04:00
6a650a282b fixed spacing and added todo 2026-04-27 14:32:40 -04:00
2 changed files with 4 additions and 27 deletions

View File

@@ -32,7 +32,6 @@ public partial class MainPage : ContentPage
KeyStorage.SavePublicKey(_username, keys.publicKey);
}
hybridWebView.SetInvokeJavaScriptTarget(this);
ServerAPI.setupClient();
_socket = new RelaySocketClient(_username);
@@ -44,6 +43,8 @@ public partial class MainPage : ContentPage
SafeSendRawToWebView
);
hybridWebView.SetInvokeJavaScriptTarget(_rtc);
_socket.Log += Console.WriteLine;
_socket.ChannelListReceived += HandleChannelList;
_socket.EncryptedChatReceived += HandleEncryptedChat;
@@ -297,26 +298,6 @@ public partial class MainPage : ContentPage
SwapView();
}
public Task JoinRtcChannel()
{
return _rtc.JoinRtcChannel();
}
public void LeaveRtcChannel()
{
_rtc.LeaveRtcChannel();
}
public void SendRtcSignal(string json)
{
_rtc.SendRtcSignal(json);
}
public Task<string> GetRtcParticipants()
{
return _rtc.GetRtcParticipants();
}
private async void OnHybridWebViewRawMessageReceived(object sender, HybridWebViewRawMessageReceivedEventArgs e)
{
if (e.Message == "rtc_page_ready")

View File

@@ -13,12 +13,8 @@ public sealed class RtcBridgeService
private readonly Func<string?> _getCurrentChannelId;
private readonly Action<string> _sendRawToWebView;
public RtcBridgeService(
string username,
RelaySocketClient socket,
HybridWebView hybridWebView,
Func<string?> getCurrentChannelId,
Action<string> sendRawToWebView)
public RtcBridgeService(string username, RelaySocketClient socket, HybridWebView hybridWebView,
Func<string?> getCurrentChannelId, Action<string> sendRawToWebView)
{
_username = username;
_socket = socket;