video-cutout-web
v0.1.4
Published
A simple demo for how to create video and audio extension for Agora Web SDK NG.
Downloads
3
Readme
Agora-RTE-Extension Demo
A simple demo for how to create video and audio extension for Agora Web SDK NG.
Detailed documentation here.
Install Dependencies
npm install
Build
npm run build
Run the demo
npm run demo
使用教程
//let background = "https://deeplor.oss-cn-hangzhou.aliyuncs.com/videosdk/bg/architecture-5082700_1280.jpg";
let background = "";
const videoExtension = new VideoCutoutWebExtension(background, appKey: string = '', appSecret: string = '');
AgoraRTC.registerExtensions([videoExtension]);
const [microphoneTrack, cameraTrack] = await AgoraRTC.createMicrophoneAndCameraTracks(audioConfig, videoConfig);
const videoProcessor = videoExtension.createProcessor();
cameraTrack.pipe(videoProcessor).pipe(cameraTrack.processorDestination);