tav-media
Version:
Cross platform media editing framework
50 lines (49 loc) • 1.31 kB
TypeScript
/**
* License Authorization result.
* @category Engine
*/
export declare const enum OAuthErrorCode {
/**
* The license is invalid.
*/
OK = 0,
/**
* Invalid license file
*/
ERROR_INVALID_PARAMETER = -1,
/**
* The license is not for this app id
*/
ERROR_INVALID_APP_ID = -2,
/**
* The license is not for this site
*/
ERROR_INVALID_PACKAGE_NAME = -3,
/**
* The license is expired
*/
ERROR_INVALID_TIME = -4,
/**
* Invalid license file
*/
ERROR_DECRYPT_FAILED = -5
}
/**
* Utils to setup license
*/
export declare class TAVLicense {
/**
* Authorize the SDK with license at the given url.
* @param licenseUrl The url of the license file.
* @param appId The appId of the license.
* @param key The key used to decrypt the license file.
*/
static Auth(licenseUrl: string, appId: string, key: string): Promise<OAuthErrorCode>;
/**
* Authorize the SDK with license content.
* @param licenseData The content of the license file in ArrayBuffer.
* @param appId The appId of the license.
* @param key The key used to decrypt the license file.
*/
static Auth(licenseData: ArrayBufferView, appId: string, key: string): Promise<OAuthErrorCode>;
}