Comments (3)
@Eilon Can you consider inviting other developers help maintain this repo that have contributed already? It seems like you're not giving this repo enough attention.
from mauihybridwebview.
@Eilon Can you consider inviting other developers help maintain this repo that have contributed already? It seems like you're not giving this repo enough attention.
I've been working on the official version here: #70
So for that reason my time hasn't been as focused here. Having said that, I'm certainly willing to work with people on features, fixes, and PRs within this repo for features that are good candidates to be in the official version.
from mauihybridwebview.
@Eilon Can you consider inviting other developers help maintain this repo that have contributed already? It seems like you're not giving this repo enough attention.
I've been working on the official version here: #70
So for that reason my time hasn't been as focused here. Having said that, I'm certainly willing to work with people on features, fixes, and PRs within this repo for features that are good candidates to be in the official version.
Congratulations on being officially included. Please keep in mind the issue reported in this thread, and if nothing else, please don't break this method without providing us an alternative.
Thanks again.
#if IOS || MACCATALYST
HybridWebView.HybridWebViewHandler.PlatformViewFactory = (handler) => {
var config = new WKWebViewConfiguration();
//====================================================
//CUSTOM CONFIG
config.AllowsAirPlayForMediaPlayback = true;
config.AllowsInlineMediaPlayback = true;
config.AllowsPictureInPictureMediaPlayback = true;
config.MediaTypesRequiringUserActionForPlayback = WebKit.WKAudiovisualMediaTypes.None;
//simple enough can just redundancy this one:
Action<Uri, string> MessageReceivedAction = delegate (Uri uri, string message) { // to replace https://github.com/Eilon/MauiHybridWebView/blob/3ca801076a1e3fbe3b8922b2429524df20def6a4/HybridWebView/Platforms/iOS/HybridWebViewHandler.iOS.cs#L40
((HybridWebView.HybridWebView)handler.VirtualView).OnMessageReceived(message);
};
//https://stackoverflow.com/a/39076814/10305478
object CreatePrivateClassInstance(string typeName, object[] parameters) {
Type type = AppDomain.CurrentDomain.GetAssemblies().
SelectMany(assembly => assembly.GetTypes()).FirstOrDefault(t => t.Name == typeName);
return type.GetConstructors()[0].Invoke(parameters);
}
IWKScriptMessageHandler webViewScriptMessageHandler = (IWKScriptMessageHandler)CreatePrivateClassInstance("WebViewScriptMessageHandler", [MessageReceivedAction]);
config.UserContentController.AddScriptMessageHandler(webViewScriptMessageHandler, "webwindowinterop");
IWKUrlSchemeHandler? wKUrlSchemeHandler = (IWKUrlSchemeHandler?)CreatePrivateClassInstance("SchemeHandler", [handler as HybridWebViewHandler]);
config.SetUrlSchemeHandler(wKUrlSchemeHandler, urlScheme: "app");
//============================================
//default programming built in
//config.UserContentController.AddScriptMessageHandler(new WebViewScriptMessageHandler(MessageReceived), "webwindowinterop");
//config.SetUrlSchemeHandler(new SchemeHandler(this), urlScheme: "app");
// Legacy Developer Extras setting.
var enableWebDevTools = ((HybridWebView.HybridWebView)(handler as HybridWebViewHandler).VirtualView).EnableWebDevTools;
config.Preferences.SetValueForKey(NSObject.FromObject(enableWebDevTools), new NSString("developerExtrasEnabled"));
var platformView = new MauiWKWebView(RectangleF.Empty, handler as HybridWebViewHandler, config);
if (OperatingSystem.IsMacCatalystVersionAtLeast(major: 13, minor: 3) ||
OperatingSystem.IsIOSVersionAtLeast(major: 16, minor: 4)) {
// Enable Developer Extras for Catalyst/iOS builds for 16.4+
platformView.SetValueForKey(NSObject.FromObject(enableWebDevTools), new NSString("inspectable"));
}
return platformView;
};
#endif
from mauihybridwebview.
Related Issues (20)
- Update project to require .NET 8
- Release latest version to nuget HOT 3
- allow passing of object and null from HybridWebView.SendInvokeMessageToDotNet("CallMeFromScript", ["msg from js", 987]); HOT 2
- Everyone switch to rbrundritt's repo HOT 6
- Fix possible hang in Proxy code for Android HOT 1
- Other proxy code cleanup tasks
- Typescript definitions HOT 2
- 0.0.0.0 referer causing issues HOT 2
- Enhancement Request: Support for Desktop Refresh without 404 Errors HOT 1
- "Link" trimming mode on Android removing/deactivating/breaking certain functions in my HTML/Javascript HybridWebView project?
- keyboard does not shown on textboxes HOT 5
- reload inside the control HOT 3
- Nothing happens when parameter contains escaped character HOT 1
- please create a option for HTTP or HTTPS url base HOT 3
- Future plans of HybridWebView ? HOT 3
- MauiHybridWebView causes Android app to crash with R8 enabled - Any fix to make it R8 compatible? Bug project included to demonstrate. HOT 1
- HybridWebView ArgumentNullException when using HtmlWebViewSource instead of file HOT 4
- JSInterop performance vs Blazorwebview HOT 1
- HybridWebView is official in .NET MAUI 9! 🥳 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mauihybridwebview.