 
   # set up the metadata elements
   displayMetadata = ->
-    if metadataElement.readyState == 2 and (metaTrack = metadataElement.track)
+    if metadataElement.readyState >= 1 and (metaTrack = metadataElement.track)
       metaTrack.mode = 'hidden'
       i = 0
       times = []

        return
    return

  # after video metadata have been loaded, display chapters and metadat in the
  # interactive area
  $(video).on 'loadedmetadata', ->
    if chaptersElement.readyState >= 1
      displayChapters()
      displayMetadata()
    else


  # set up the chapter elements
  displayChapters = ->
    if chaptersElement.readyState >= 1 and
    (chaptersTrack = chaptersElement.track)
      chaptersTrack.mode = 'hidden'
      i = 0
