Set the target of RTC to _rtc and removed all Pass Through Methods.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user