Initialization
For Initialization a Video SDK Token is required. Initialization must be done before creating the Record, Import or Edit Widget.
info
Reach out to Hippo Video Support (support@hippovideo.io) to get Video SDK Token for your account
- NPM
- CDN
import { initialize } from "@hippovideo/video-sdk";
import "@hippovideo/video-sdk/app/hv_recorder.css"; // Importing the styling required
let initializeOptions = {
token: <VIDEO_SDK_TOKEN>,
};
const onVideoSdkInitialize = (success, error) => {
/*
* error will be undefined in case of successfull initialization
* success will be undefined in case there is any error
* */
};
initialize(initializeOptions, onVideoSdkInitialize);
if (window.HVRecorder) {
let initializeOptions = {
token: <VIDEO_SDK_TOKEN>,
};
const onVideoSdkInitialize = (success, error) => {
/*
* error will be undefined in case of successfull initialization
* success will be undefined in case there is any error
* */
};
HVRecorder.initialize(initializeOptions, onVideoSdkInitialize);
}
The onVideoSdkInitialize is a callback method that will be called with data and error objects.
- error will be undefined in case of successfull initialization,
- success will be undefined in case there is any error, and
- success.key will be passed while starting the recording.
- Refer to
initialize
API for more details.