melonJS
    Preparing search index...

    Function getVideo

    • Get a loaded video (a "video" asset): the <video> element the loader created for it.

      Parameters

      • elt: string

        the asset name

      Returns HTMLVideoElement

      the video element, or null if none is loaded under that name

      await loader.preload([{ name: "intro", type: "video", src: "data/video/intro.mp4" }]);
      const intro = loader.getVideo("intro");
      intro.play();