-
Notifications
You must be signed in to change notification settings - Fork 50
Description
**Stencil version: @stencil/core@3.4.0
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://chat.stenciljs.com
Current behavior:
When using the camera inside Telegram WebView, the <video> element displays a black screen instead of the camera feed. This behavior is specific to the WebView environment and does not occur in standard browsers. The issue seems related to modern autoplay policies in WebView, which block videos from playing unless they are muted.
Expected behavior:
The camera feed should be displayed properly in the <video> element without any issues in Telegram WebView.
Steps to reproduce:
- Open the app inside Telegram WebView.
- Start accessing the camera stream.
- The
<video>element will show a black screen instead of the camera feed.
Related code:
<video autoplay playsinline></video>To fix the issue, adding the muted attribute to the <video> element resolves the problem:
<video autoplay playsinline muted></video>Other information:
This issue occurs specifically in Telegram WebView. Adding the muted attribute allows the video stream to play correctly. This behavior could be related to WebView's autoplay restrictions that prevent unmuted videos from playing automatically.
Pull Request:
I plan to submit a pull request with the proposed fix that adds the muted attribute to the <video> element in the appropriate components.