 
           pv.player.api 'play'
 
-        # setup DOM
-        acorn.util.appendCss()
-        $hiddenPlayer = $('<div>').addClass('acorn-player hidden').width(600)
-            .height(400).appendTo('body')
-
         # must be appended to DOM in order to load properly
         runs -> $hiddenPlayer.append pv.render().el
 

        waitsFor (-> loading), 'video loading', 10000

      it 'should announce state changes', ->
        pv = new PlayerView viewOptions()

        # start playing on pv ready
        pv.on 'PlayerView:Ready', -> pv.player.api 'play'

        stateChanged = false
        pv.on 'PlayerView:StateChange', -> stateChanged = true

        # load player view
        acorn.util.appendCss()
        $hiddenPlayer = $('<div>').addClass('acorn-player hidden').width(600)
            .height(400).appendTo('body')
        runs -> $hiddenPlayer.append pv.render().el

        waitsFor (-> stateChanged), 'state change event', 10000


      describe 'video player view api', ->
        pv = undefined
        $hiddenPlayer = undefined

        # froogaloop 'paused' query does not work, so track paused status
        # manually. for details on bug, see:
        #   https://github.com/vimeo/player-api/issues/31
        #   http://stackoverflow.com/questions/14119494/
        paused = true

        beforeEach ->
          pv = new PlayerView viewOptions()

          # set listeners and start playing on pv ready
          pv.on 'PlayerView:Ready', ->

        ), 'player ready', 10000

      it 'should load a vimeo player on render that loads video when played', ->
        loading = false
        # set 'loadProgress' listener and start playing on pv ready
        pv.on 'PlayerView:Ready', ->
