Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
on_error {
"code": "error_code",
"event_session_id": "id_of_telemetry_session_with_error",
"message": "<error decription>",
"context": {} // дополнительная информация
}<script src="https://web-sdk-root-url/plugin_liveness.php"></script><link rel="stylesheet" href="https://web-sdk-root-url/plugin/ozliveness.css" />
<script src="https://web-sdk-root-url/plugin_liveness.php"></script>{
"state": "finished"
}{
"state": "finished",
"analyses": {
"quality": {
"state": "finished",
"resolution": "success"
}
}
}{
"state": "finished",
"folder_id": "your_folder_id",
"analyses": {
"quality": {
"state": "finished",
"resolution": "success"
}
}
}OzLiveness.open({
license: {
'payload_b64': 'some_payload',
'signature': 'some_data',
'enc_public_key': 'some_key'
},
...,
})OzLiveness.open({
licenseUrl: 'https://some_url',
...,
}){
"state": "processing"
}{
"state": "finished"
}{
"state": "processing",
"analyses": {
"quality": {
"state": "processing",
"resolution": ""
}
}
}{
"state": "finished",
"analyses": {
"quality": {
"state": "finished",
"resolution": "success"
}
}
}{
"state": "processing",
"folder_id": "your_folder_id",
"analyses": {
"quality": {
"state": "processing",
"resolution": ""
}
}
}OzLiveness.open({
lang: 'en',
action: [
'video_selfie_blank',
],
meta: { // если нужно, добавьте метаданные для папки
'transaction_id': 'your unique transaction identifier', // идентификатор транзакции для поиска через Oz API
'end_user_id': '<user_or_lead_id>',
'meta_key': 'meta_value',
},
on_result: function (result) {
console.log('on_result', result);
},
on_complete: function (result) {
console.log('on_complete', result);
},
on_close: function () {
console.log('on_close');
},
on_capture_complete: function (result) {
console.log('on_capture_complete', result);
}
});OZLiveness.open({
... // другие параметры
on_capture_complete: function(result) {
// Код для обработки кадров / отправки его через ваш API, шаг 2 на схеме
}
}){
"action": <action>,
"best_frame": <bestframe>,
"best_frame_png": <bestframe_png>,
"best_frame_bounding_box": {
"left": <bestframe_bb_left>,
"top": <bestframe_bb_top>,
"right": <bestframe_bb_right>,
"bottom": <bestframe_bb_bottom>
},
"best_frame_landmarks": {
"left_eye": [bestframe_x_left_eye, bestframe_y_left_eye],
"right_eye": [bestframe_x_right_eye, bestframe_y_right_eye],
"nose_base": [bestframe_x_nose_base, bestframe_y_nose_base],
"mouth_bottom": [bestframe_x_mouth_bottom, bestframe_y_mouth_bottom],
"left_ear": [bestframe_x_left_ear, bestframe_y_left_ear],
"right_ear": [bestframe_x_right_ear, bestframe_y_right_ear]
},
"frame_list": [<frame1>, <frame2>],
"frame_bounding_box_list": [
{
"left": <frame1_bb_left>,
"top": <frame1_bb_top>,
"right": <frame1_bb_right>,
"bottom": <frame1_bb_bottom>
},
{
"left": <frame2_bb_left>,
"top": <frame2_bb_top>,
"right": <frame2_bb_right>,
"bottom": <frame2_bb_bottom>
},
],
"frame_landmarks": [
{
"left_eye": [frame1_x_left_eye, frame1_y_left_eye],
"right_eye": [frame1_x_right_eye, frame1_y_right_eye],
"nose_base": [frame1_x_nose_base, frame1_y_nose_base],
"mouth_bottom": [frame1_x_mouth_bottom, frame1_y_mouth_bottom],
"left_ear": [frame1_x_left_ear, frame1_y_left_ear],
"right_ear": [frame1_x_right_ear, frame1_y_right_ear]
},
{
"left_eye": [frame2_x_left_eye, frame2_y_left_eye],
"right_eye": [frame2_x_right_eye, frame2_y_right_eye],
"nose_base": [frame2_x_nose_base, frame2_y_nose_base],
"mouth_bottom": [frame2_x_mouth_bottom, frame2_y_mouth_bottom],
"left_ear": [frame2_x_left_ear, frame2_y_left_ear],
"right_ear": [frame2_x_right_ear, frame2_y_right_ear]
}
],
"from_virtual_camera": null,
"additional_info": <additional_info>
}{
"action": <action>,
"best_frame": null,
"best_frame_png": null,
"best_frame_bounding_box": null,
"best_frame_landmarks": null
"frame_list": null,
"frame_bounding_box_list": null,
"frame_landmarks": null,
"from_virtual_camera": {
"additional_info": <additional_info>,
"best_frame": <bestframe>,
"best_frame_png": <best_frame_png>,
"best_frame_bounding_box": {
"left": <bestframe_bb_left>,
"top": <bestframe_bb_top>,
"right": <bestframe_bb_right>,
"bottom": <bestframe_bb_bottom>
},
"best_frame_landmarks": {
"left_eye": [bestframe_x_left_eye, bestframe_y_left_eye],
"right_eye": [bestframe_x_right_eye, bestframe_y_right_eye],
"nose_base": [bestframe_x_nose_base, bestframe_y_nose_base],
"mouth_bottom": [bestframe_x_mouth_bottom, bestframe_y_mouth_bottom],
"left_ear": [bestframe_x_left_ear, bestframe_y_left_ear],
"right_ear": [bestframe_x_right_ear, bestframe_y_right_ear]
},
"frame_list": [<frame1>, <frame2>],
"frame_bounding_box_list": [
{
"left": <frame1_bb_left>,
"top": <frame1_bb_top>,
"right": <frame1_bb_right>,
"bottom": <frame1_bb_bottom>
},
{
"left": <frame2_bb_left>,
"top": <frame2_bb_top>,
"right": <frame2_bb_right>,
"bottom": <frame2_bb_bottom>
},
],
"frame_landmarks": [
{
"left_eye": [frame1_x_left_eye, frame1_y_left_eye],
"right_eye": [frame1_x_right_eye, frame1_y_right_eye],
"nose_base": [frame1_x_nose_base, frame1_y_nose_base],
"mouth_bottom": [frame1_x_mouth_bottom, frame1_y_mouth_bottom],
"left_ear": [frame1_x_left_ear, frame1_y_left_ear],
"right_ear": [frame1_x_right_ear, frame1_y_right_ear]
},
{
"left_eye": [frame2_x_left_eye, frame2_y_left_eye],
"right_eye": [frame2_x_right_eye, frame2_y_right_eye],
"nose_base": [frame2_x_nose_base, frame2_y_nose_base],
"mouth_bottom": [frame2_x_mouth_bottom, frame2_y_mouth_bottom],
"left_ear": [frame2_x_left_ear, frame2_y_left_ear],
"right_ear": [frame2_x_right_ear, frame2_y_right_ear]
}
]
}
}"VIDEO_FILE_KEY": VIDEO_FILE_ZIP_BINARY
"payload": "{
"media:meta_data": {
"VIDEO_FILE_KEY": {
"additional_info": <additional_info>
}
}
}"OzLiveness.open({
...
meta: {
// идентификатор пользователя или лида из стороннего лидогенератора
// передавайте ID, если вам нужно отслеживать несколько попыток от одного и того же пользователя
'end_user_id': '<user_or_lead_id>',
// уникальный идентификатор попытки
'transaction_id': '<unique_id1>'
}
});/api/folders/?meta_data=transaction_id==unique_id1&with_analyses=true/api/folders/?meta_data=transaction_id==unique_id1&with_analyses=true&time_created.min=([CURRENT_TIME]-1hour)"result_mode": "safe"// Редактируем текст кнопки
OzLiveness.add_lang('ru', {
action_photo_button: 'Сделать фото'
});OzLiveness.open({
lang: 'es', // идентификатор нужного языка
...
});OzLiveness.open({
style: {
baseColorCustomization: {
textColorPrimary: "#000000",
backgroundColorPrimary: "#FFFFFF",
textColorSecondary: "#8E8E93",
backgroundColorSecondary: "#F2F2F7",
iconColor: "#00A5BA"
},
baseFontCustomization: {
textFont: "Roboto, sans-serif",
textSize: "16px",
textWeight: "400",
textStyle: "normal"
},
titleFontCustomization: {
textFont: "inherit",
textSize: "36px",
textWeight: "500",
textStyle: "normal"
},
buttonCustomization: {
textFont: "inherit",
textSize: "14px",
textWeight: "500",
textStyle: "normal",
textColorPrimary: "#FFFFFF",
backgroundColorPrimary: "#00A5BA",
textColorSecondary: "#00A5BA",
backgroundColorSecondary: "#DBF2F5",
cornerRadius: "10px"
},
toolbarCustomization: {
closeButtonIcon: "cross",
iconColor: "#707070"
},
centerHintCustomization: {
textFont: "inherit",
textSize: "24px",
textWeight: "500",
textStyle: "normal",
textColor: "#FFFFFF",
backgroundColor: "#1C1C1E",
backgroundOpacity: "56%",
backgroundCornerRadius: "14px",
verticalPosition: "38%"
},
hintAnimation: {
hideAnimation: false,
hintGradientColor: "#00BCD5",
hintGradientOpacity: "100%",
animationIconSize: "80px"
},
faceFrameCustomization: {
geometryType: "oval",
cornersRadius: "0px",
strokeDefaultColor: "#D51900",
strokeFaceInFrameColor: "#00BCD5",
strokeOpacity: "100%",
strokeWidth: "6px",
strokePadding: "4px"
},
documentFrameCustomization: {
cornersRadius: "20px",
templateColor: "#FFFFFF",
templateOpacity: "100%"
},
backgroundCustomization: {
backgroundColor: "#FFFFFF",
backgroundOpacity: "88%"
},
antiscamCustomization: {
enableAntiscam: false,
textMessage: "",
textFont: "inherit",
textSize: "14px",
textWeight: "500",
textStyle: "normal",
textColor: "#000000",
textOpacity: "100%",
backgroundColor: "#F2F2F7",
backgroundOpacity: "100%",
backgroundCornerRadius: "20px",
flashColor: "#FF453A"
},
versionTextCustomization: {
textFont: "inherit",
textSize: "16px",
textWeight: "500",
textStyle: "normal",
textColor: "#000000",
textOpacity: "56%"
},
maskCustomization: {
maskColor: "#008700",
glowColor: "#000102",
minAlpha: "30%", // от 0 до 1 или 0-100%
maxAlpha: "100%" // от 0 до 1 или 0-100%
},
switchCameraButtonCustomization: {
enableSwitchCameraButton: true,
},
.ozliveness_wrap_overlay .ozliveness_face_stroke {
overflow: hidden;
box-shadow: 0 0 10px rgb(90 201 207);
border: none; /* важно: удалите используемую по умолчанию рамку */
},
/* для HTML-строки используйте тип string; HTMLElement нужно вставить через cloneNode(true) */
loaderSlot: yourLoader, /* <string | HTMLElement> */
loaderTransition: {type: 'fade', duration: 500}
}
});OzLiveness.open({
// ...
style: {
//блок для обратной совместимости
doc_color: "",
face_color_success: "",
face_color_fail: "",
//основной блок
faceFrame: {
faceReady: "",
faceNotReady: "",
},
centerHint: {
textSize: "",
color: "",
yPosition: "",
letterSpacing: "",
fontStyle: "",
},
closeButton: {
image: "",
},
backgroundOutsideFrame: {
color: "",
},
},
// ...
});OzLiveness.open({
// При получении промежуточного результата скрываем окно плагина и показываем собственные индикаторы загрузки
on_result: function(result) {
OzLiveness.hide();
if (result.state === 'processing') {
show_my_loader();
}
},
on_complete: function() {
hide_my_loader();
}
});var session_id = 123;
OzLiveness.open({
// Передаем произвольные метаданные, по которым в дальнейшем сможем идентифицировать сессию в Oz API
meta: {
session_id: session_id
},
// После отправки данных принудительно закрываем окно плагина и самостоятельно запрашиваем результат
on_submit: function() {
OzLiveness.close();
my_result_function(session_id);
}
});