React-native-track-player: 1.2.0

Created on 2 Jul 2019  路  7Comments  路  Source: react-native-kit/react-native-track-player

maybe worth making this change a breaking change? bump to 2.0.0? just had this install with a ^ selector in package.json on a < 0.60.0 project.

Most helpful comment

Alright! Should we also use it to implement a few API changes?

Here's a list of changes I can think of:

Split Metadata Functionality

Already being discussed in #634

Improve Queue Functionality

In some cases, the queue is a pain to work with, this should improve it a lot. This has been one of the most requested features.

  • Make the track id optional. Instead, we'll replace it for the track index.
  • load(track) - Loads a track directly without using the queue, so we can stop being opinionated about it too.
  • shuffle() - Shuffles the queue
  • move(index, toIndex) - Moves a track from a position to another
  • setRepeatMode(mode) - Updates the repeat mode

    • REPEAT_NONE: Doesn't repeat

    • REPEAT_TRACK: Repeats the current track only

    • REPEAT_QUEUE: Repeats the whole queue

Redesign the Rating API

We should rethink it to cover both iOS and Android use-cases.

  • Add a bookmark button
  • Add thumbs up / thumbs down buttons
  • Add a heart (or only thumbs up) button
  • Add star-based rating?
  • Add percentage-based rating?
  • Allow changing the buttons label (i18n)

Miscellaneous changes

  • Change duration/position values to milliseconds instead of seconds. It should definitely help integrating the module as all other music players are also based on milliseconds.
  • Move DASH/HLS/SmoothStreaming integration into three "addon" modules that can be maintained separately.

@dcvz What do you think?

Edit: RN 0.60 has been released today

All 7 comments

@Guichaguri I would agree with this. Let's make v2 bring in Android X support.

Alright! Should we also use it to implement a few API changes?

Here's a list of changes I can think of:

Split Metadata Functionality

Already being discussed in #634

Improve Queue Functionality

In some cases, the queue is a pain to work with, this should improve it a lot. This has been one of the most requested features.

  • Make the track id optional. Instead, we'll replace it for the track index.
  • load(track) - Loads a track directly without using the queue, so we can stop being opinionated about it too.
  • shuffle() - Shuffles the queue
  • move(index, toIndex) - Moves a track from a position to another
  • setRepeatMode(mode) - Updates the repeat mode

    • REPEAT_NONE: Doesn't repeat

    • REPEAT_TRACK: Repeats the current track only

    • REPEAT_QUEUE: Repeats the whole queue

Redesign the Rating API

We should rethink it to cover both iOS and Android use-cases.

  • Add a bookmark button
  • Add thumbs up / thumbs down buttons
  • Add a heart (or only thumbs up) button
  • Add star-based rating?
  • Add percentage-based rating?
  • Allow changing the buttons label (i18n)

Miscellaneous changes

  • Change duration/position values to milliseconds instead of seconds. It should definitely help integrating the module as all other music players are also based on milliseconds.
  • Move DASH/HLS/SmoothStreaming integration into three "addon" modules that can be maintained separately.

@dcvz What do you think?

Edit: RN 0.60 has been released today

I like a lot of these suggestions @Guichaguri -- let's start a new issue and discuss the roadmap to 2.0.0 there :)

@Guichaguri, cache on iOS too :)

Chromecast please!

Prevent event statusQueueEnded fired on startup or even on add a track to play on Android, should be good

Please let's continue conversations on the v2 issue.

Was this page helpful?
0 / 5 - 0 ratings