Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Global vs Per-View Configuration for HybridWebView #30848

@mattleibow

Description

@mattleibow

Objective

Design the configuration model for HybridWebView playback options—determine what can be set globally versus per-WebView instance.

Scope

  • Identify which options need to be set before view instantiation (e.g., iOS WKWebViewConfiguration).
  • Propose API for global config (static setters) and per-view config (constructor or property).
  • Document limitations and trade-offs for each approach.

Requirements

  • Define the configuration lifecycle (when and how settings are applied).
  • Specify precedence when both global and per-instance settings exist.
  • Include API usage examples for both approaches.
  • Ensure backwards compatibility and migration guidance.

API & Usage Concepts

Proposed API Examples

// Global configuration (static method)
HybridWebView.SetPlaysInline(true);
HybridWebView.SetAutoPlay(true);

// Per-WebView instance configuration
var config = new HybridWebViewConfig { PlaysInline = true, AutoPlay = true };
var webView = new HybridWebView(config);

Platform Note

On iOS, options must be set before WKWebView is constructed:

In iOS, once the webview is constructed as above it is already too late unless we can pass in configuration info like a "HybridWebViewConfig" as an optional argument on construction.

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions