const config = {module: {beautify: true, // Whether to enable the effect module, which offers beautification and makeup effects as well as stickerssegmentation: true // Whether to enable the segmentation module, which allows you to change the backgroundsegmentationLevel: 0 // Switch background segmentation models supported since Versions 1.0.19},auth: authData, // The authentication informationinput: stream, // The input streambeautify: { // The effect parameters for initialization (optional)whiten: 0.1,dermabrasion: 0.3,eye: 0.2,chin: 0,lift: 0.1,shave: 0.2},background: {type: 'blur' // Blur the background}}const sdk = new ArSdk(// Pass in a config object to initialize the SDKconfig)
sdk.setBackground({type: 'image', // The background imagesrc: 'https://webar-static.tencent-cloud.com/assets/background/1.jpg'})
sdk.setBackground({type: 'video', // The background videosrc: 'https://webar-static.tencent-cloud.com/assets/background/video-bg-1.mp4',})
sdk.setBackground({type: 'transparent'})
Feedback