Options
All
  • Public
  • Public/Protected
  • All
Menu

gaia-js-sdk-convey

Index

Variables

Let barcodeReader

barcodeReader: any = null

Const google

google: google

Let qrCodeReader

qrCodeReader: any = null

Functions

closestByClass

  • closestByClass(element: HTMLElement, clazz: Array<string>): HTMLElement | null

dataURLToFile

  • dataURLToFile(urlString: string, fileName: string): File
  • Function loads a file from the given URL and returns it as a File.

    Parameters

    • urlString: string
    • fileName: string

    Returns File

    File

drawCanvas

  • drawCanvas(canvas: HTMLCanvasElement, video: HTMLVideoElement, mediaStream: MediaStream, maxCanvasSize: number): void
  • Parameters

    • canvas: HTMLCanvasElement
    • video: HTMLVideoElement
    • mediaStream: MediaStream
    • maxCanvasSize: number

    Returns void

getBase64FromFile

  • getBase64FromFile(file: File): Promise<any>
  • Function takes a file and returns it as a base64 variant of the file.

    Parameters

    • file: File

    Returns Promise<any>

    Promise base64 file representation

getDigit

  • getDigit(idMap: Map<string, number>, name: string): number
  • Function returns the number value of the given key, if the key is not found the key is added and the current map size is set as value.

    Parameters

    • idMap: Map<string, number>

      Map with string key and number value

    • name: string

      string key

    Returns number

    number of the given key.

getFileExtensionFromFile

  • getFileExtensionFromFile(file: File): string
  • Function returns the file type of the given file.

    Parameters

    • file: File

      File

    Returns string

    string file extension

getLetter

  • getLetter(idMap: Map<string, number>, name: string): string

getUserVideoMedia

  • getUserVideoMedia(): null | Promise<MediaStream>

isImageFile

  • isImageFile(fileExtension: string): Boolean
  • Function verifies whether a given file extension is a supported image file type for the image compression. Supported types are jpeg, jpg and png.

    Parameters

    • fileExtension: string

    Returns Boolean

    Boolean

sizeCanvasAccordingToImage

  • sizeCanvasAccordingToImage(canvas: HTMLCanvasElement, width: number, height: number, maxCanvasSize: number): void
  • Parameters

    • canvas: HTMLCanvasElement
    • width: number
    • height: number
    • maxCanvasSize: number

    Returns void

split

  • split(str?: undefined | string, separator?: string): string[]
  • Function provides a save string split functionality. If the given string to split is undefined or null an empty string array is returned.

    Parameters

    • Optional str: undefined | string

      string to split

    • Default value separator: string = " "

      separator of the split

    Returns string[]

    string []

uuid

  • uuid(): string
  • Function creates an UUID string with 16 characters.

    Returns string

    string

wrap

  • wrap(node: HTMLElement | string): INode

Generated using TypeDoc