   (->
     playlist = $('#playlist-data').data 'playlist'
     currentTrack = 0
+    trackUpdated = false
     currentPlayer = ''
 
     # Soundcloud Player


      initYoutube: ->
        youtubePlayer.setWidget()
    )()
  )()

  # User presses play
  #   - If there is a paused song in one of the players should play
  #   - If no song has been played yet, the proper player should be loaded
  #       and song played


    # Main public player
    PlayerController.mainPlayer = (->
      console.log 'hello'
      play: ->
        # start() if song has to be loaded in. resume() if it's already loaded
        if trackUpdated
          currentPlayer.start()
        else
          currentPlayer.resume()

      pause: ->
        currentPlayer.pause()

      next: ->
        currentPlayer.next()

      previous: ->
        currentPlayer.previous()

      # play: ->
      #   track = playlist[currentTrack]
      #   getCurrentPlayer().playSong track

      # More for testing purposes
      printPlaylist: ->
