     frame: @props.frame ? 0
     playbackRate: 1
     frameDimensions: {}
+    inFlipbookMode: false
 
   componentDidMount: ->
     @refs.videoScrubber?.value = 0

      </div>
    </div>


  hiddenPreloadedImages: ->
    # Render this to ensure that all a subject's location images are cached and ready to display.

    @refs.videoPlayer?.playbackRate = @state.playbackRate

  render: ->
    mainDisplay = ''
    if @state.inFlipbookMode
      {type, format, src} = getSubjectLocation @props.subject, @state.frame
      mainDisplay = @renderFrame type, format, src, @state.frame
    else
      mainDisplay = for frame of @props.subject.locations
        {type, format, src} = getSubjectLocation @props.subject, frame
        @renderFrame type, format, src, frame

    tools = switch type
      when 'image'
        if not @state.inFlipbookMode or @props.subject?.locations.length < 2 or subjectHasMixedLocationTypes @props.subject
          null
        else
          <span className="subject-frame-play-controls">
