How to use the react-native-music-control.STATE_PAUSED function in react-native-music-control

To help you get started, we’ve selected a few react-native-music-control examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flarocca / react-native-music-player-service / __tests__ / src / MusicPlayerService.Tests.js View on Github external
.then(() => {
      expect(MusicControl.updatePlayback).toHaveBeenCalledTimes(1);
      expect(MusicControl.updatePlayback).toHaveBeenCalledWith({ state: MusicControl.STATE_PAUSED, elapsedTime });
    });
});
github flarocca / react-native-music-player-service / __tests__ / src / MusicPlayerService.Tests.js View on Github external
.then(() => {
      expect(MusicControl.updatePlayback).toHaveBeenCalledTimes(1);
      expect(MusicControl.updatePlayback).toHaveBeenCalledWith({ state: MusicControl.STATE_PAUSED, elapsedTime });
    });
});
github sonnylazuardi / bibleify-mobile / old / src / screens / Passage / PassageScreen.js View on Github external
() => {
        if (this.state.paused) {
          MusicControl.updatePlayback({
            state: MusicControl.STATE_PAUSED
          });
        } else {
          MusicControl.updatePlayback({
            state: MusicControl.STATE_PLAYING
          });
        }
      }
    );
github flarocca / react-native-music-player-service / src / MusicPlayerService.js View on Github external
stop(): void {
    if (this._trackPlaying) {
      this._trackPlaying.stop();
      this._releaseTrack();

      if (this.enableSetNowPlaying) {
        this._updatePlayback(MusicControl.STATE_PAUSED);
      }

      if (this._onStop) {
        this._onStop();
      }
    }
  }
github var77 / react-native-youtube-player / src / containers / MiniPlayer.js View on Github external
togglePlay(status) {
    this.props.setPlaying(status);
    MusicControl.updatePlayback({
      state: status? MusicControl.STATE_PLAYING: MusicControl.STATE_PAUSED,
      elapsedTime: this.state.currentTime
    })
  }