Rolamix / cordova-plugin-playlist

🎶 A Cordova plugin for Android and iOS with native support for audio playlists, background support, and lock screen controls 🎶
MIT License
32 stars 33 forks source link

playlist count from N to 1 , TRACK_CHANGED's data.hasPrevious =1 and data.hasNext = 1 #23

Open boboxiaodd opened 5 years ago

boboxiaodd commented 5 years ago

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

var playlist = [{ ... },{...}] player.setPlaylistItems(null,null,playlist);

playlist = [{...}] player.setPlaylistItems(null,null,playlist);

when fire the first TRACK_CHANGED event , data.currentItem == {} then, the second TRACK_CHANGED event fire, data.currentItem is current, but data.hasPrevious =1 and data.hasNext = 1

Platform and Version (eg. Android 5.0 or iOS 9.2.1) iOS 12

(Android) What device vendor (e.g. Samsung, HTC, Sony...) iPhone 7 Plus

Cordova CLI version and cordova platform version

cordova --version                                    # e.g.  the Newest
cordova platform version android                     # e.g. the Newest

Plugin version

cordova plugin version | grep phonegap-plugin-push   # e.g. the Newest

Sample Push Data Payload

Sample Code that illustrates the problem

Logs taken while reproducing problem