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

getPlayerState is inaccurate if the play button was not manually triggered #452

Closed
jacobraccuia opened this issue Sep 9, 2020 · 1 comment
Assignees
Labels
Bug: Confirmed 🐛 Bugs that have been replicated and need to be addressed.

Comments

@jacobraccuia
Copy link

Amplitude.getPlayerState() returns the wrong play status

I would expect this method to return whether the player is currently playing // paused, etc. I am trying to find a good way to detect what's happening on the page. This method only returns playing when the playbutton is pressed. Clicking Next/Previous does not change the state.
Environment

https://www.whatsmybrowser.org/b/1Y8UG

Amplitude.js Version: "5.2.0"

Steps to reproduce the issue

  1. check Amplitude.getPlayerState()
  2. click next button (track automatically plays)
  3. check Amplitude.getPlayerState()

What is expected?

Amplitude.getPlayerState() returns play if audio is playing, not whether or not it was manually triggered. In the demo, it should loop "paused" or "stopped" until the player is playing. check console log to see that it still returns "paused" if the audio IS playing.

Link to where issue can be reproduced

https://codepen.io/jacob-raccuia/pen/oNxqYgP

Additional details / screenshots

@jacobraccuia jacobraccuia added the Bug: Needs Confirmation 🧐 Bugs that are reported, but needs to be confirmed and replicated. label Sep 9, 2020
@jaydrogers
Copy link
Member

Your bug reports are awesome! Thanks for providing examples. We'll dive into these soon!

@danpastori danpastori added Bug: Confirmed 🐛 Bugs that have been replicated and need to be addressed. and removed Bug: Needs Confirmation 🧐 Bugs that are reported, but needs to be confirmed and replicated. labels Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Confirmed 🐛 Bugs that have been replicated and need to be addressed.
Projects
None yet
Development

No branches or pull requests

3 participants