fixing illegalstateexception in video player