@blinkk/degu
    Preparing search index...

    Function whenVideosLoadedInElement

    • Allows you to make sure that all videos are loaded (readyState 4) in a given element 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.
      dom.whenVideosLoadedInElement(element).then(()=> {
      // Play all videos for example.
      dom.playAllVideosInElement(element);
      })

      Parameters

      • element: HTMLElement
      • timeout: number = 10000

        The amount of time in which to give up polling.

      Returns Promise<void>

      Promise