Banuba WebAR JavaScript API Reference
    Preparing search index...

    Class Video

    Player input from video

    Supports the same mime-types as video.src

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Creates Video input from the given Url

      Parameters

      • source: string
      • Optionaloptions: Partial<Pick<HTMLVideoElement, "loop">>

      Returns Video

      const video = new Video("https://www.youtube.com/watch?v=sv4EWcMs3xE")
      
    • Creates Video input from the given Blob

      Parameters

      • source: Blob
      • Optionaloptions: Partial<Pick<HTMLVideoElement, "loop">>

      Returns Video

      const file = $("#file-input").files[0] // File is subclass of Blob
      const video = new Image(file, { loop: true })

    Methods

    • Stops underlying video

      Returns void