On most platforms, 3D WebView is able to play video using the browser engine's built-in video stack. However, on iOS (and in some rare cases on Android—more on that below), 3D WebView is unable to display the browser engine's built-in video. 3D WebView works by rendering web content from the browser engine to a texture that is shown in Unity. Unfortunately on iOS, it's not possible to render the browser engine's hardware-accelerated video content. So, as a workaround, it instead uses its "fallback" video implementation.
The fallback video implementation works by overriding the behavior of the browser's
<video> element to make it so that instead of playing videos through the browser engine's built-in video stack, videos are instead loaded in an external video player and rendered to a separate video texture. 3D WebView's prefabs (WebViewPrefab and CanvasWebViewPrefab) then stitch the video texture into the correct place inside the webview's main texture to make it appear in the correct place in the web page.
- Regular HTML5 video tags and videos on popular sites like YouTube, Vimeo, and Facebook work well, but some 3rd-party JS video widgets do not function as expected.
- The fallback video implementation only supports playing videos from http:// and https:// URLs. So, playing video from blob: URLs or WebRTC is not supported.
When is fallback video used?
- 3D WebView for iOS: the fallback video implementation is always used.
- 3D WebView for Android: the browser's native video stack is used for the vast majority of devices. The fallback video implementation is only used for:
- All other 3D WebView packages use the browser's native video stack instead of the fallback video implementation.