WebViewOptions.cs 2.4 KB

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