Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brave mobile: play() can only be initiated by a user gesture. #532

Open
Luc45 opened this issue Nov 25, 2023 · 0 comments
Open

Brave mobile: play() can only be initiated by a user gesture. #532

Luc45 opened this issue Nov 25, 2023 · 0 comments
Labels
Bug: Needs Confirmation 🧐 Bugs that are reported, but needs to be confirmed and replicated.

Comments

@Luc45
Copy link

Luc45 commented Nov 25, 2023

Issue Description

When triggering play/pause functionality on audio elements controlled by Amplitude.js within the Brave mobile browser, a DOMException is thrown with the message "play() can only be initiated by a user gesture." This issue is specific to the Brave mobile browser, where direct user interaction with play/pause controls is not recognized as a valid user gesture, leading to a failure to toggle playback as expected.

Expected Behavior

Audio should toggle between playing and pausing when the user interacts with Amplitude.js controls in Brave mobile.

Steps To Reproduce

  1. Initialize Amplitude.js with an audio player interface on a webpage.
  2. Confirm that Amplitude.js has been correctly initialized with play/pause controls linked to audio elements.
  3. Interact with the play/pause button on a mobile device running the Brave browser.
  4. Instead of toggling playback, a DOMException error appears in the browser console.

AmplitudeJS Version

5.3.2

Browser Information

https://www.whatsmybrowser.org/b/ITDGT

Link To Where Your Issue Can Be Reproduced

https://nova-acropole.org.br/podcast

Anything else?

No response

@Luc45 Luc45 added the Bug: Needs Confirmation 🧐 Bugs that are reported, but needs to be confirmed and replicated. label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Needs Confirmation 🧐 Bugs that are reported, but needs to be confirmed and replicated.
Projects
None yet
Development

No branches or pull requests

1 participant