It seems like this code could still update the currentTime display, even if the duration is undefined.  I don't know if that is worth changing now, though.