question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

play pause toggle not working

See original GitHub issue

I’ve tried two ways (on android), i guess im just missing something simple :

`            
            case 'music-controls-pause':
                angular.element(document.getElementById('cont')).scope().playBtn().$apply();
                MusicControls.updateIsPlaying(true);
                console.log("pause");
           
                break;

                case 'music-controls-play':
                    angular.element(document.getElementById('cont')).scope().playBtn().$apply();
                    MusicControls.updateIsPlaying(false);///(or this?)//// isPlaying: false,
                    console.log("pause");

                    break;

and other way :

`               case 'music-controls-media-button-play-pause':
                    angular.element(document.getElementById('cont')).scope().playBtn().$apply();
                    if (MusicControls.updateIsPlaying(false)) {
                        MusicControls.updateIsPlaying(true);///(or this?)//// isPlaying: true,
                    }
                    else {
                        MusicControls.updateIsPlaying(false);
                    }
                    break;`

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
CesarOliveiracommented, Aug 22, 2017

I have the same issue here on iOS: ` this.musicControls.subscribe().subscribe(action => {

    function events(action) {
      const message = JSON.parse(action).message;
      switch(message) {
        case 'music-controls-pause':
          this.pause();
          break;
        case 'music-controls-play':
          this.play();
          break;
        default:
          break;
      }
    }

}); `

When the phone is locked and I click in pause nothing happens, any thoughts?

0reactions
BuddyLRenocommented, Nov 21, 2017

Yeah, only @homerours currently has access to publish to NPM. @homerours, could you give access to publish to NPM to @ghenry22 and/or I?

Read more comments on GitHub >

github_iconTop Results From Across the Web

audio play/pause toggle not working in react - Stack Overflow
when I press the play button it plays the music but when I pres it again it starts another session of the music...
Read more >
Play/Pause Toggle Button - Google Groups
For toggles in the callback function either start or stop the audio player dependent on wether it is checked or not. You can...
Read more >
Media Play/Pause Key not working · Issue #415 - GitHub
Pressing this button will still show the on screen display, and the play/pause icon will sometimes toggle, but the music will continue playing....
Read more >
Play/Pause button <SPACE> not working :: Transport Fever 2 ...
Yesterday when i first started playing this game, , worked just fine to pause the game. ... Toggle: Play/Pause button <SPACE> not working....
Read more >
Add a play/pause toggle button on background videos
Background videos can engage site visitors or add a cinematic flair to your site — but they can also be distracting or even...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found