   createPlayer: ->
     $node = $(@getDOMNode())
     mediaObj = @props.mediaObj
-    @textBox = @createTextBox()
 
     $(document).tooltip
       content: -> $node.prop('title')

    else
      max_end

  componentDidMount: ->
    @createPlayer()

  componentDidUpdate: ->
    @destroyPlayer()
    @createPlayer()

  componentWillUnmount: ->
    @destroyPlayer()

    $("#movietitle").text(mediaObj.title)
    last_line = parseInt(mediaObj.last_line)

    $playerNode = $node.find(".jp-jplayer")
    $playerNode.jPlayer
      solution: "flash, html"
      ready: =>
        $playerNode.jPlayer "setMedia",
          rtmpv: path + mov
          m4v: path+mov
          poster: "assets/rglossa/speech/_6.6-%27T%27_ligo.skev.graa.jpg"
        $playerNode.jPlayer( "play", @getStartTime(mediaObj))

      timeupdate: (event) =>
        ct = event.jPlayer.status.currentTime
        if ct > @getEndTime(mediaObj)
          $playerNode = $node.find(".jp-jplayer")
          $playerNode.jPlayer("play", @getStartTime(mediaObj))
          $playerNode.jPlayer( "pause" )
        else if ct > mediaObj.divs.annotation[@state.currentLine].to
          @setState(currentLine: @state.currentLine+1, restart: false)

#      ended: -> alert("ended!")

      swfPath: ""
      supplied: supplied
