Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ai.natml.natdevice

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ai.natml.natdevice

High-performance, cross-platform media device streaming for Unity Engine.

  • 1.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
increased by85.71%
Maintainers
1
Weekly downloads
 
Created
Source

NatDevice

NatDevice is a high performance, cross-platform camera and microphone streaming API for Unity Engine. To start, discover available media devices:

// Create a media device query for a camera device
var filter = MediaDeviceCriteria.CameraDevice;
var query = new MediaDeviceQuery(filter);
// Get the first camera device
var device = query.current as CameraDevice;

Then stream camera images or audio buffers from the device:

// Start streaming camera images
device.StartRunning(OnCameraImage);

void OnCameraImage (CameraImage image) {
    // Do stuff
    ...
}

From here, you can utilize extensive functionality provided by the API to build your interactive applications. Features include:

  • Ultra-low Latency. Stream the camera preview and microphone audio into Unity with extremely small overhead.

  • Ultra-high Resolution. NatDevice supports high resolution camera previews, at full HD and higher on devices that support it.

  • Extensive Camera Control. Set the camera exposure mode, exposure point, exposure duration, focus mode, focus point, flash mode, white balance mode, torch mode, zoom, and more.

  • Granular Microphone Control. Configure the microphone sample rate, channel count, and echo cancellation mode on devices that support it.

  • Machine Learning Integration. NatDevice tightly integrates with NatML for building machine learning and computer vision apps.

  • Video Recording Integration. NatDevice tightly integrates with NatCorder for enabling user-generated content.

See the docs to learn more about NatDevice.

Installing NatDevice

First, add the following items to your Unity project's Packages/manifest.json:

{
  "scopedRegistries": [
    {
      "name": "NatML",
      "url": "https://registry.npmjs.com",
      "scopes": ["ai.natml"]
    }
  ],
  "dependencies": {
    "ai.natml.natdevice": "1.3.4"
  }
}

Then retrieve your access key from NatML Hub and add it to your Project Settings:

Specifying your access key

Using NatDevice requires an active NatML MediaKit subscription. You can try it out for free, but functionality is limited. See the docs for more info.


Requirements

  • Unity 2021.2+

Supported Platforms

  • Android API Level 24+
  • iOS 14+
  • macOS 10.15+ (Apple Silicon and Intel)
  • Windows 10+ (64-bit only)
  • WebGL:
    • Chrome 91+
    • Firefox 90+

Resources

Keywords

FAQs

Package last updated on 12 Apr 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc