 
     # Update timer fields.
     $.each $('.timer'), (idx, timer) ->
-      console.log('timer:', timer)
       $timer = $(timer)
       $timer.val(videoTime)
 


    videoTime = getVideoTime(this.currentTime)

    console.log('$player.bookmarked:', $player.bookmarked)
    if $player.bookmarked == undefined
      if $player.hasClass('episode')
        url = '/episodes/'
      else
        url = '/dvds/'

      $.get(url + $player.data().id + '.json').then (data) ->
          self.currentTime = data.playback_time;
          self.play()
    else
      self.play()

  # Play and pause on space bar.
  $('.player').on 'keyup', (e) ->


  # Seek to bookmark and play video.
  $('.bookmarks-select').on 'change', (e) ->
    $selected_bookmark = $($(this).find(':selected'))

    if $selected_bookmark.data().dvd?
      $player = $("*[data-dvd='#{$selected_bookmark.data().dvd}']")[0]
    else if $selected_bookmark.data().episode?
      $player = $("*[data-episode='#{$selected_bookmark.data().episode}']")[0]

    $player.currentTime = $selected_bookmark.data().time
    $($player).unbind('play')
    $player.play()


  #
