     @_enableAll( @enabled )
   _mediaFailed: ->
     console.log('HAudioPlayer media failure:',arguments)
+  _mediaEnded:->
+    @stop() 
+    @playing = false
   die: ->
     @pause()
     ELEM.del(@_audioElementId) if @_audioElementId?

  play: ->
    if @_mediaElement?
      @_mediaElement.setVolume( 1 )
      @_mediaElement.play() 
    @_playStopButton.setLabel(@options.stopLabel) if @_playStopButton?
    @_playPauseButton.setLabel(@options.pauseLabel) if @_playPauseButton?

  skipBack: ->
    @seek()
  idle: ->
    true
  playStop: ->
    if @playing
      @stop()
