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

Play/pause status #525

Open
lebanggit opened this issue Jan 5, 2023 · 0 comments
Open

Play/pause status #525

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

Comments

@lebanggit
Copy link

Issue Description

Play button does not change status if call via API or pause/play via device control.

Expected Behavior

// Fix for Amplitude errors - not change play button after media pause/play via control center of device
audioElement.addEventListener('pause', (event) => {
document.getElementById('play-pause').classList.remove('amplitude-playing');
document.getElementById('play-pause').classList.add('amplitude-paused');

        document.getElementById('playlist-play-pause').classList.remove('amplitude-playing');
        document.getElementById('playlist-play-pause').classList.add('amplitude-paused');
        
    });
    audioElement.addEventListener('playing', (event) => {
        document.getElementById('play-pause').classList.add('amplitude-playing');
        document.getElementById('play-pause').classList.remove('amplitude-paused');

        document.getElementById('playlist-play-pause').classList.add('amplitude-playing');
        document.getElementById('playlist-play-pause').classList.remove('amplitude-paused');
    });

Steps To Reproduce

Lets try fix in core

AmplitudeJS Version

5.3.2

Browser Information

No response

Link To Where Your Issue Can Be Reproduced

No response

Anything else?

No response

@lebanggit lebanggit added the Bug: Needs Confirmation 🧐 Bugs that are reported, but needs to be confirmed and replicated. label Jan 5, 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