diff --git a/RelayClient/MainPage.xaml.cs b/RelayClient/MainPage.xaml.cs index 202b4dc..75fa83f 100644 --- a/RelayClient/MainPage.xaml.cs +++ b/RelayClient/MainPage.xaml.cs @@ -33,7 +33,11 @@ public partial class MainPage : ContentPage } 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( @@ -296,7 +300,7 @@ public partial class MainPage : ContentPage { SwapView(); } - + public Task JoinRtcChannel() { return _rtc.JoinRtcChannel(); diff --git a/RelayClient/Services/RtcBridgeService.cs b/RelayClient/Services/RtcBridgeService.cs index 7c3f3e2..83dacb0 100644 --- a/RelayClient/Services/RtcBridgeService.cs +++ b/RelayClient/Services/RtcBridgeService.cs @@ -13,12 +13,8 @@ public sealed class RtcBridgeService private readonly Func _getCurrentChannelId; private readonly Action _sendRawToWebView; - public RtcBridgeService( - string username, - RelaySocketClient socket, - HybridWebView hybridWebView, - Func getCurrentChannelId, - Action sendRawToWebView) + public RtcBridgeService(string username, RelaySocketClient socket, HybridWebView hybridWebView, + Func getCurrentChannelId, Action sendRawToWebView) { _username = username; _socket = socket;