     loading: true
     playing: false
     frame: @props.frame ? 0
+  
+  componentDidMount: ->
+    @refs.videoPlayer?.getDOMNode().addEventListener 'canplaythrough', @handleLoad
 
   render: ->
     {type, format, src} = getSubjectLocation @props.subject, @state.frame


  handleLoad: (e) ->
    @setState loading: false
    @props.onLoad? arguments...

      when 'image'
        <img className="subject" src={src} style={SUBJECT_STYLE} onLoad={@handleLoad} />
      when 'video'
        <video ref="videoPlayer" src={src} type={"#{type}/#{format}"} controls>
          Your browser does not support the video format. Please upgrade your browser.
        </video>

