privacyProtectDetectForVideo(params: Object)
Requires:
AIKit≥1.2.0@ray-js/ray≥1.7.9
Platforms:
iOSAndroid
Description
Run privacy region recognition on a video
Parameters
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
inputVideoPath | string | Yes | - | Video input path |
outputVideoPath | string | Yes | - | Video output path |
videoConfig | 1 | 2 | 3 | 4 | No | 4 | Video configuration -- defaults to 1080 |
detectType | 1 | 2 | No | 1 | Recognition type |
imageEditType | 1 | 2 | 3 | No | 1 | Image processing type |
musicPath | string | Yes | - | Local path of background music |
audioEditType | 1 | 2 | 3 | No | 1 | Audio processing type |
originAudioVolume | number | No | 0.5 | Original audio volume |
overlayAudioVolume | number | No | 0.5 | Overlay audio volume |
complete | () => void | No | - | Completion callback (executed on both success and failure) |
success | (params: Object) => void | No | - | Callback on successful API call |
fail | (params: Object) => void | No | - | Failure callback |
success callback parameters
| Property | Type | Description |
|---|---|---|
path | string | Output path |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None
Valid Values
videoConfig
| Value | Description | AIKit Since |
|---|---|---|
1 | 480 | v1.1.0 |
2 | 540 | v1.1.0 |
3 | 720 | v1.1.0 |
4 | 1080 (default) | v1.1.0 |
detectType
| Value | Description | AIKit Since |
|---|---|---|
1 | Pets | v1.1.0 |
2 | People | v1.1.0 |
imageEditType
| Value | Description | AIKit Since |
|---|---|---|
1 | No effect | v1.1.0 |
2 | Emphasize subject | v1.1.0 |
3 | Privacy protection | - |
audioEditType
| Value | Description | AIKit Since |
|---|---|---|
1 | No processing | v1.1.0 |
2 | 0.5 0.5 mixing | v1.1.0 |
3 | Mute video | v1.1.0 |