Auto stash before merge of "main" and "origin/main"

This commit is contained in:
2026-04-06 20:48:57 -04:00
parent 68a905a292
commit 7af9cd0df8
3 changed files with 25 additions and 23 deletions

View File

@@ -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.