2 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

View File

@@ -32,12 +32,7 @@ public partial class MainPage : ContentPage
KeyStorage.SavePublicKey(_username, keys.publicKey);
}
hybridWebView.SetInvokeJavaScriptTarget(this);
// hybridWebView.SetInvokeJavaScriptTarget(new RtcBridgeService());
//TODO: Need to not have parameters in constructor, protected flags on vars instead of private should make everything accessible
ServerAPI.setupClient();
_socket = new RelaySocketClient(_username);
_rtc = new RtcBridgeService(
@@ -47,6 +42,8 @@ public partial class MainPage : ContentPage
() => _currentChannelId,
SafeSendRawToWebView
);
hybridWebView.SetInvokeJavaScriptTarget(_rtc);
_socket.Log += Console.WriteLine;
_socket.ChannelListReceived += HandleChannelList;
@@ -300,26 +297,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)
{