making it stop when videos are loaded