@banuba/agora-extension
Advanced tools
Comparing version 1.0.0 to 2.0.0
import { Extension as Extension$1, VideoProcessor as VideoProcessor$1, IProcessorContext } from 'agora-rte-extension'; | ||
import { Player } from '@banuba/webar'; | ||
export { Effect, Module } from '@banuba/webar'; | ||
@@ -28,3 +27,3 @@ /** Same options as of Player.create(), see {@link https://docs.banuba.com/face-ar-sdk-v1/generated/typedoc/classes/Player.html#create} */ | ||
* // This is a syntax sugar over | ||
* // import { Module } from "@banuba/agora-extension" | ||
* // import { Module } from "@banuba/webar" | ||
* // const face_tracker = new Module("/path/to/face_tracker.zip") | ||
@@ -43,3 +42,3 @@ * // await processor.addModule(face_tracker) | ||
* ```ts | ||
* import { Module } from "@banuba/agora-extension" | ||
* import { Module } from "@banuba/webar" | ||
* | ||
@@ -64,3 +63,3 @@ * const face_tracker = new Module("/path/to/face_tracker.zip") | ||
* ```ts | ||
* import { Effect } from "@banuba/agora-extension" | ||
* import { Effect } from "@banuba/webar" | ||
* | ||
@@ -67,0 +66,0 @@ * const octopus = new Effect("/path/to/Octopus.zip") |
{ | ||
"name": "@banuba/agora-extension", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Banuba WebAR Agora extension", | ||
@@ -21,5 +21,3 @@ "license": "SEE LICENSE IN LICENSE.txt", | ||
"./dist/*": "./dist/*", | ||
".": "./dist/index.js", | ||
"./BanubaSDK.*": "./dist/BanubaSDK.*", | ||
"./*": "./dist/modules/*" | ||
".": "./dist/index.js" | ||
}, | ||
@@ -50,4 +48,5 @@ "keywords": [ | ||
"typescript": "^4.9.5", | ||
"vite": "^4.1.1" | ||
"vite": "^4.1.1", | ||
"vite-plugin-external": "^4.0.1" | ||
} | ||
} |
@@ -18,2 +18,4 @@ # Banuba WebAR Agora extension | ||
<script src="https://cdn.jsdelivr.net/npm/agora-rtc-sdk-ng@4.16.1/AgoraRTC_N-production.min.js"></script> | ||
<!-- Exposes BanubaSDK variable on window --> | ||
<script src="https://cdn.jsdelivr.net/npm/@banuba/webar/dist/BanubaSDK.browser.js"></script> | ||
<!-- Exposes BanubaAgoraExtension variable on window --> | ||
@@ -23,3 +25,6 @@ <script src="https://cdn.jsdelivr.net/npm/@banuba/agora-extension/dist/index.browser.js"></script> | ||
<script> | ||
const banuba = new BanubaAgoraExtension.Extension({ clientToken: "xxx-xxx-xxx" }) | ||
const banuba = new BanubaAgoraExtension.Extension({ | ||
clientToken: "xxx-xxx-xxx", | ||
locateFile: BanubaSDK.locateFile | ||
}) | ||
AgoraRTC.registerExtensions([banuba]) | ||
@@ -29,3 +34,3 @@ | ||
await processor.addModule( | ||
...["face_tracker", "background"].map((m) => "https://cdn.jsdelivr.net/npm/@banuba/agora-extension/dist/modules/" + m + ".zip"), | ||
...["face_tracker", "background"].map((m) => "https://cdn.jsdelivr.net/npm/@banuba/webar/dist/modules/" + m + ".zip"), | ||
) | ||
@@ -46,2 +51,4 @@ const video = await AgoraRTC.createCameraVideoTrack() | ||
<script src="https://cdn.jsdelivr.net/npm/agora-rtc-sdk-ng@4.16.1/AgoraRTC_N-production.min.js"></script> | ||
<!-- Exposes BanubaSDK variable on window --> | ||
<script src="https://cdn.jsdelivr.net/npm/@banuba/webar/dist/BanubaSDK.browser.js"></script> | ||
@@ -51,3 +58,6 @@ <script type="module"> | ||
const banuba = new BanubaAgoraExtension.Extension({ clientToken: "xxx-xxx-xxx" }) | ||
const banuba = new BanubaAgoraExtension.Extension({ | ||
clientToken: "xxx-xxx-xxx", | ||
locateFile: BanubaSDK.locateFile | ||
}) | ||
AgoraRTC.registerExtensions([banuba]) | ||
@@ -77,7 +87,7 @@ | ||
import { Extension } from "@banuba/agora-extension" | ||
import data from "@banuba/agora-extension/dist/BanubaSDK.data" | ||
import wasm from "@banuba/agora-extension/dist/BanubaSDK.wasm" | ||
import simd from "@banuba/agora-extension/dist/BanubaSDK.simd.wasm" | ||
import FaceTracker from "@banuba/agora-extension/dist/modules/face_tracker.zip" | ||
import Background from "@banuba/agora-extension/dist/modules/background.zip" | ||
import data from "@banuba/webar/dist/BanubaSDK.data" | ||
import wasm from "@banuba/webar/dist/BanubaSDK.wasm" | ||
import simd from "@banuba/webar/dist/BanubaSDK.simd.wasm" | ||
import FaceTracker from "@banuba/webar/dist/modules/face_tracker.zip" | ||
import Background from "@banuba/webar/dist/modules/background.zip" | ||
@@ -121,3 +131,6 @@ const banuba = new Extension({ | ||
```ts | ||
const banuba = new Extension({ clientToken: "xxx-xxx-xxx" }) | ||
const banuba = new Extension({ | ||
clientToken: "xxx-xxx-xxx", | ||
locateFile: BanubaSDK.locateFile | ||
}) | ||
@@ -124,0 +137,0 @@ if (!banuba.checkCompatibility()) alert("The browser does not support the extension :(") |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
213
1
8
186618
6
6
2942