 
         avQueuePlayer.removeAllItems();
         playerTracks.removeAll();
+        trackIndex = 0
 
         pluginResult = CDVPluginResult(
             status: CDVCommandStatus_OK

        output["album"] = data["album"].stringValue
        output["cover"] = data["cover"].stringValue
        output["url"] = url
        
        switch item.status {
        case .readyToPlay:
        // Player item is ready to play.
            output["status"] = 1
        case .failed:
        // Player item failed. See error.
            output["status"] = 2
        case .unknown:
            // Player item is not yet ready.

            avQueuePlayer.play();
        }

        playerTracks[data["url"].stringValue] = data

        pluginResult = CDVPluginResult(
            status: CDVCommandStatus_OK
