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);
|
KeyStorage.SavePublicKey(_username, keys.publicKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
hybridWebView.SetInvokeJavaScriptTarget(this);
|
|
||||||
ServerAPI.setupClient();
|
ServerAPI.setupClient();
|
||||||
|
|
||||||
_socket = new RelaySocketClient(_username);
|
_socket = new RelaySocketClient(_username);
|
||||||
@@ -43,6 +42,8 @@ public partial class MainPage : ContentPage
|
|||||||
() => _currentChannelId,
|
() => _currentChannelId,
|
||||||
SafeSendRawToWebView
|
SafeSendRawToWebView
|
||||||
);
|
);
|
||||||
|
|
||||||
|
hybridWebView.SetInvokeJavaScriptTarget(_rtc);
|
||||||
|
|
||||||
_socket.Log += Console.WriteLine;
|
_socket.Log += Console.WriteLine;
|
||||||
_socket.ChannelListReceived += HandleChannelList;
|
_socket.ChannelListReceived += HandleChannelList;
|
||||||
@@ -297,26 +298,6 @@ public partial class MainPage : ContentPage
|
|||||||
SwapView();
|
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)
|
private async void OnHybridWebViewRawMessageReceived(object sender, HybridWebViewRawMessageReceivedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Message == "rtc_page_ready")
|
if (e.Message == "rtc_page_ready")
|
||||||
|
|||||||
Reference in New Issue
Block a user