Socket
Socket
Sign inDemoInstall

ai.natml.natdevice

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ai.natml.natdevice

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


Version published
Weekly downloads
119
increased by197.5%
Maintainers
1
Install size
5.00 MB
Created
Weekly downloads
 

Readme

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

Last updated on 12 Apr 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc