Adds loop option to music player which will push the song to the end of the queue instead of removing it.
Checks for queue containing atleast one song because in the event there is only one song in queue and it is playing, if user calls dequeue on index 0, the .push(.shift()) will add an undefined object to the array, which we do not want.
154
Adds loop option to music player which will push the song to the end of the queue instead of removing it. Checks for queue containing atleast one song because in the event there is only one song in queue and it is playing, if user calls dequeue on index 0, the .push(.shift()) will add an undefined object to the array, which we do not want.