meteor / meteor/mobile-packages

On Android/Chrome using camera failed with : Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture.

Open
#104 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
338
Forks
148
PR merge metrics
No merged PRs in 30d

Description

Hi,

i try to use the camera on smartphone (android + chrome) and since few days i always have :

```
Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture.
```

If i look at the package, the play() action is done on Template rendered, maybe it's the problem because the action is not triggered by user.

To reproduce:
- just add the mdg:camera
- render the template "camera" using {{> camera}} in your layout
- start an nginx as a proxy with SSL (because getUserMedia no more works without SSL)
- start meteor app
- open Chrome on your Android device
- fill the url of your computer
- The video stream is not displayed, but you only have a photo

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with mdg:camera, the “camera” template, an SSL nginx proxy, and Chrome on Android. Inspect where the template invokes HTMLMediaElement.play(), then verify that the camera video stream is displayed rather than only a photo.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.