For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Installation

Installation of the VideoID Widget component.

Install the widget component from a package manager

The widget can be installed from a private package registry or a local tgz file.

  1. Create a file .npmrc with the credentials provided by the Facephi team in the root directory.

# Facephi npm credentials
registry=https://registry.npmjs.org/
@facephi:registry=https://facephicorp.jfrog.io/artifactory/api/npm/sdk-web-fphi/
//facephicorp.jfrog.io/artifactory/api/npm/sdk-web-fphi/:_password=PASSWORDBASE64
//facephicorp.jfrog.io/artifactory/api/npm/sdk-web-fphi/:username=EMAIL
//facephicorp.jfrog.io/artifactory/api/npm/sdk-web-fphi/:email=EMAIL
//facephicorp.jfrog.io/artifactory/api/npm/sdk-web-fphi/:always-auth=true
  1. Add the widget package dependency to package.json with the desired version.

"dependencies": {
    "@facephi/sdk-video-id": "1.0.0",
    (...)
}

The dependency version may differ. The Facephi team recommends using the latest available version.

Install the widget component from a local tgz package file

  1. Locate the tgz file provided by the Facephi team at the desired location.

  1. Install the package with a package manager.

The name or version of the tgz file may differ.


Define the widget custom element

To instantiate the widget component in the DOM, it must be defined.

Once successfully defined, the widget component will be implemented using the <facephi-video-id> tag in the DOM.

Define the VideoID custom element

The widget component must be defined before it can be implemented.

Compile for ES5

In some cases, polyfills can be applied if required.

It is recommended to define the VideoID custom element in the index.js.

Finally, the widget should be successfully installed in your project.

Last updated