How to use the react-native-music-control/index.ios.js.setNowPlaying 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 yuche / gouqi / src / components / player.tsx View on Github external
onLoad = (track: ITrack) => ({ duration }: { duration: number }) => {
    // this.props.changeStatus('PLAYING')
    this.props.setCurrentTime(0)
    this.props.setSlideTime(0)
    this.props.setDuration(duration)
    MusicControl.setNowPlaying({
      title: track.name,
      artwork: track.album.picUrl,
      artist: track.artists[0].name,
      duration
    })
  }