Allows you to make sure that all videos are loaded (readyState 4) before executing callback.
Note that this method executes polling in the background to check for video state so use carefully. Defaults to timeout after 10000ms
// Wait for all videos to be loaded.const videos = [videoElement1, videoElement2];dom.whenVideosLoaded(videos).then(()=> { //}) Copy
// Wait for all videos to be loaded.const videos = [videoElement1, videoElement2];dom.whenVideosLoaded(videos).then(()=> { //})
The amount of time in which to give up polling.
Promise
Allows you to make sure that all videos are loaded (readyState 4) before executing callback.
Note that this method executes polling in the background to check for video state so use carefully. Defaults to timeout after 10000ms