webrtc / samples

WebRTC Web demos and samples
https://webrtc.github.io/samples
BSD 3-Clause "New" or "Revised" License
13.94k stars 5.71k forks source link

Camera feed is not drawn via WeChat WebView #1565

Closed evanmcarlson closed 2 years ago

evanmcarlson commented 2 years ago

Browser affected

WeChat WebView on iOS 13+ (Version 8.0.25)

Description

None of the getUserMedia demos are working within WeChat, but we have seen many other applications that use getUserMedia successfully work within WeChat. Open https://shrek.imdevsh.com/demo/camera/ within WeChat to see a webpage using getUserMedia that successfully draws the camera feed. Open any of the official getUserMedia demos within WeChat to see a webpages that do not successfully draw the camera feed. Any insight to this issue would be much appreciated!

Steps to reproduce

Open the basic get user media demo within WeChat.

Expected results

When the Open camera button is tapped, it should prompt for camera access and draw the camera feed.

Actual results

When the Open camera button is tapped, it prompts for camera access but does not draw the camera feed.

evanmcarlson commented 2 years ago

We've found that calling play on the video in handleSuccess resolves the issue.

image
evanmcarlson commented 2 years ago

official demo (not working via WeChat) / custom demo (working via WeChat)

fippo commented 2 years ago

That sounds like WeChat WebView has a broken implementation of autoplay for MediaStreams. Not something we can solve