From f9b35f3de8de17e6bede054988a2a35f2a3cfddb Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 2 Mar 2024 23:22:24 +0100 Subject: [PATCH] mobile fix, and port change --- BlazorHybrid/MainPage.xaml.cs | 11 ++++++++++- BlazorHybrid/wwwroot/index.html | 4 ++-- BlazorWASM/Client/Properties/launchSettings.json | 4 ++-- BlazorWASM/Server/Properties/launchSettings.json | 4 ++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/BlazorHybrid/MainPage.xaml.cs b/BlazorHybrid/MainPage.xaml.cs index debb454..2f94ebc 100644 --- a/BlazorHybrid/MainPage.xaml.cs +++ b/BlazorHybrid/MainPage.xaml.cs @@ -1,9 +1,18 @@ -namespace BlazorHybrid +using Microsoft.AspNetCore.Components.WebView.Maui; + +namespace BlazorHybrid { public partial class MainPage : ContentPage { public MainPage() { + BlazorWebViewHandler.BlazorWebViewMapper.AppendToMapping("CustomBlazorWebViewMapper", (handler, view) => + { +#if IOS + var configs = handler.PlatformView.Configuration; + configs.AllowsInlineMediaPlayback = true; +#endif + }); InitializeComponent(); } } diff --git a/BlazorHybrid/wwwroot/index.html b/BlazorHybrid/wwwroot/index.html index cf53e49..2d1badc 100644 --- a/BlazorHybrid/wwwroot/index.html +++ b/BlazorHybrid/wwwroot/index.html @@ -13,7 +13,7 @@ - + @@ -39,7 +39,7 @@ - + diff --git a/BlazorWASM/Client/Properties/launchSettings.json b/BlazorWASM/Client/Properties/launchSettings.json index e202ee1..fb70c18 100644 --- a/BlazorWASM/Client/Properties/launchSettings.json +++ b/BlazorWASM/Client/Properties/launchSettings.json @@ -11,7 +11,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "http://localhost:5153", + "applicationUrl": "http://localhost:5200", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -21,7 +21,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "https://localhost:7185;http://localhost:5153", + "applicationUrl": "https://localhost:7300;http://localhost:5200", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/BlazorWASM/Server/Properties/launchSettings.json b/BlazorWASM/Server/Properties/launchSettings.json index 56ff6db..1d48de7 100644 --- a/BlazorWASM/Server/Properties/launchSettings.json +++ b/BlazorWASM/Server/Properties/launchSettings.json @@ -8,7 +8,7 @@ }, "dotnetRunMessages": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "http://localhost:5153" + "applicationUrl": "http://localhost:5200" }, "https": { "commandName": "Project", @@ -18,7 +18,7 @@ }, "dotnetRunMessages": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "https://localhost:7185;http://localhost:5153" + "applicationUrl": "https://localhost:7300;http://localhost:5200" }, "IIS Express": { "commandName": "IISExpress",