WebViewOptions.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright (c) 2022 Vuplex Inc. All rights reserved.
  2. //
  3. // Licensed under the Vuplex Commercial Software Library License, you may
  4. // not use this file except in compliance with the License. You may obtain
  5. // a copy of the License at
  6. //
  7. // https://vuplex.com/commercial-library-license
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. namespace Vuplex.WebView {
  15. /// <summary>
  16. /// Options that can be passed to WebViewPrefab.Instantiate() or
  17. /// SetOptionsForInitialization() to alter the webview that the
  18. /// prefab creates during initialization.
  19. /// </summary>
  20. public struct WebViewOptions {
  21. /// <summary>
  22. /// If set to `true`, makes it so that clicking on the webview doesn't
  23. /// automatically focus it.
  24. /// </summary>
  25. public bool clickWithoutStealingFocus;
  26. /// <summary>
  27. /// Sets whether the fallback video implementation for iOS is disabled.
  28. /// This option is ignored on non-iOS platforms or when Native 2D Mode is enabled.
  29. /// </summary>
  30. public bool disableVideo;
  31. /// <summary>
  32. /// 3D WebView automatically selects which native plugin to use based on
  33. /// the build platform and which plugins are installed in the project.
  34. /// However, if you have multiple plugins installed for a single platform,
  35. /// this option can be used to specify which plugin to use in order to override
  36. /// the default behavior.
  37. /// </summary>
  38. /// <remarks>
  39. /// Currently, Android is the only platform that supports multiple 3D WebView
  40. /// plugins: `WebPluginType.Android` and `WebPluginType.AndroidGecko`. If both
  41. /// plugins are installed in the same project, `WebPluginType.AndroidGecko` will be used by default.
  42. /// However, you can override this to force `WebPluginType.Android` to be used instead by specifying
  43. /// `preferredPlugins = new WebPluginType[] { WebPluginType.Android }`.
  44. /// </remarks>
  45. public WebPluginType[] preferredPlugins;
  46. }
  47. }