         if let currentItemIndexInQueue = currentItemIndexInQueue where hasNext() {
             //The background task will end when the player will have enough data to play
             beginBackgroundTask()
-            //pause()
 
             let newIndex = currentItemIndexInQueue + 1
             if newIndex < enqueuedItems?.count {

                }
                else {
                    state = .Paused
                }
                endBackgroundTask()
            }

                        }
                        else {
                            state = .Paused
                            player.rate = 0
                        }

                        retryCount = 0
