gree / unity-webview

zlib License
2.22k stars 684 forks source link

WebRTC #630

Open qpaozixu opened 3 years ago

qpaozixu commented 3 years ago

When I load my web which use webRTC protocol with this WebView all the screen is black but I can connect the web use other browser like google, Safari.

Thanks for any help!

KojiNakamaru commented 3 years ago

For Android, you can enable camera/microphone by UNITYWEBVIEW_ANDROID_ENABLE_CAMERA and UNITYWEBVIEW_ANDROID_ENABLE_MICROPHONE: https://github.com/gree/unity-webview/tree/149530a73ba71908e3be31025b6d241ab3b7f84f#cameraaudio-permissionfeature For iOS, iOS 14+ may support webRTC on WKWebView (at least iOS 13+ didn't support it).

qpaozixu commented 3 years ago

Hi, thanks for your answer! It work well now, unity browser can work on my web which use webRtc(web need do something), but I meet new problem. Browser can see video, but when I load browser view as MTLTexture and convert to texture2D for unity , texture can't see video but other web item is well.....

KojiNakamaru commented 3 years ago

Unfortunately on mobile devices, this plugin supports only overlaying native WebView/WKWebView views over Unity's rendering view. It cannot produce off-screen images for textures.