Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
deepar-agora-extension
Advanced tools
This is the DeepAR Agora extension for Web. Read more about Agora extensions here https://docs.agora.io/en/extension_customer/landing-page.
DeepAR Extension is just a wrapper around the DeepAR Web that simplifies the integration with the Agora RTC platform. For more information on DeepAR visit https://www.deepar.ai.
DeepAR Web is an augmented reality SDK that allows users to integrate advanced, Snapchat-like face lenses in the browser environment.
DeepAR Web supports:
❗ DeepAR Web works only in the browser (not Node.js).
In order to use the DeepAR Web extension you need to set up a license key for your web app on developer.deepar.ai.
You can test our sample demo app to test out the DeepAR Agora Extension.
🔥 It is free! 🔥
See the official quickstart example here: https://github.com/DeepARSDK/quickstart-agora-web-extension
Once the extension is initialized with Agora, the DeepAR SDK is used very much the same as plain DeepAR Web.
Visit the official DeepAR docs for Web SDK here: https://docs.deepar.ai/category/deepar-sdk-for-web
You need both DeepAR Web extension and Agora RTC packages.
Using npm
:
npm install deepar-agora-extension agora-rtc-sdk-ng
Using yarn
:
yarn add deepar-agora-extension agora-rtc-sdk-ng
Import VideoExtension
and AgoraRTC
.
import { VideoExtension } from 'deepar-agora-extension';
import AgoraRTC from 'agora-rtc-sdk-ng'
Create a div
tag that will be used as a container for camera preview:
<div class="video-container"></div>
Be sure to set the width and height of the div
!
<style>
.video-container{
width: 640px;
height: 480px;
}
</style>
Initialize DeepAR extension.
const videoExtension = new VideoExtension({
licenseKey: 'your_license_key_here', // create the license key here https://developer.deepar.ai/projects
onInitialize: (deepAR) => {
// at this point DeepAR is initialized and can be used normally
},
});
Following code is standard Agora extension setup.
//register extension
AgoraRTC.registerExtensions([videoExtension]);
//create DeepAR extension processor
const processor = videoExtension.createProcessor();
//create CameraVideoTrack
const videoTrack = await AgoraRTC.createCameraVideoTrack();
//piping processor
videoTrack.pipe(processor).pipe(videoTrack.processorDestination);
await videoTrack.play(document.querySelector('.video-container'), {mirror: false});
You can use the deepAR
object normally as in the standard DeepAR Web SDK.
See API reference here.
Access it through the VideoExtension
's onInitialize
callback:
const videoExtension = new VideoExtension({
// ...
onInitialize: (deepAR) => {
// at this point DeepAR is initialized and can be used normally
}
// ...
});
AR filters are represented by effect files in DeepAR. You can load them to preview the effect.
Places you can get DeepAR effects:
Load an effect using the switchEffect
method:
await deepAR.switchEffect('path/to/effect/alien');
Both desktop and mobile browsers are supported by DeepAR.
Please see: https://developer.deepar.ai/customer-agreement
FAQs
Official DeepAR Agora Extension for Web
The npm package deepar-agora-extension receives a total of 11 weekly downloads. As such, deepar-agora-extension popularity was classified as not popular.
We found that deepar-agora-extension demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.