Auto stash before merge of "main" and "origin/main"
This commit is contained in:
@@ -479,15 +479,17 @@ public partial class MainPage : ContentPage
|
||||
|
||||
public async Task AnswerCallback(RtcDescription answer)
|
||||
{
|
||||
string json = JsonSerializer.Serialize(answer);
|
||||
SafeSendRawToWebView("WriteRtcAnswer answered with: " + json);
|
||||
var test = new RtcDescription{type="answer", sdp = "Long\r\n string of data"};
|
||||
test.sdp = test.sdp.Replace("\r\n", "(rn)");
|
||||
// SafeSendRawToWebView("TEST: " + test);
|
||||
answer.sdp = answer.sdp.Replace("\r\n", "(rn)");
|
||||
string json = JsonSerializer.Serialize(test, HybridJSType.Default.RtcDescription);
|
||||
SafeSendRawToWebView("JSON: " + json);
|
||||
|
||||
try
|
||||
{
|
||||
SafeSendRawToWebView("Pre");
|
||||
// await hybridWebView.InvokeJavaScriptAsync("CSharpCallTest", ["value from C#"], [HybridJSTypeString.Default.String]);
|
||||
// SafeSendRawToWebView("Mid");
|
||||
await hybridWebView.InvokeJavaScriptAsync("AnswerCallback", [json], [HybridJSTypeString.Default.String]);
|
||||
SafeSendRawToWebView("End");
|
||||
await hybridWebView.InvokeJavaScriptAsync("AnswerCallbackJS", [answer], [HybridJSType.Default.RtcDescription]);
|
||||
SafeSendRawToWebView("After JS");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -582,16 +584,11 @@ public partial class MainPage : ContentPage
|
||||
});
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(string))]
|
||||
internal partial class HybridJSTypeString : JsonSerializerContext
|
||||
{
|
||||
// This type's attributes specify JSON serialization info to preserve type structure
|
||||
// for trimmed builds.
|
||||
}
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSourceGenerationOptions(WriteIndented = false)]
|
||||
[JsonSerializable(typeof(RtcDescription))]
|
||||
internal partial class HybridJSTypeRtcDescription : JsonSerializerContext
|
||||
[JsonSerializable(typeof(List<RtcSignalMessage>))]
|
||||
[JsonSerializable(typeof(string))]
|
||||
internal partial class HybridJSType : JsonSerializerContext
|
||||
{
|
||||
// This type's attributes specify JSON serialization info to preserve type structure
|
||||
// for trimmed builds.
|
||||
|
||||
Reference in New Issue
Block a user