You should find another method to wait ready state of video player. You do not know that 4 seconds will be enough. 
Try to write something like [wait_for_mathjax](https://github.com/edx/edx-platform/blob/master/common/djangoapps/terrain/ui_helpers.py#L128).