👐
Hand & Finger Tracking for Unity
HomepageSupportContact
  • Hand Tracking Unity Plugin
    • Overview
    • System Requirements
    • Installation
    • QuickStart
    • Supported Joints
  • Help & Support
    • Ask for help
    • Request a feature
  • Examples
    • Detect hand and retrieve joints
    • No Code: Detect and visualize hands from a Sprite
    • Detect and visualize hands from a Sprite
    • Detect and visualize hands from a video
    • Use webcam to detect and visualize hands (2D Canvas)
    • Use webcam to detect and visualize hands (3D World space)
  • API Reference
    • Finger
      • Index
      • Middle
      • Palm
      • Pinky
      • Ring
      • Thumb
    • FingerJoint
    • FingerJointType
    • Hand
    • HandExtensions
    • HandSide
    • HandTracker
  • UI Reference
    • HandManager
    • HandViewer
    • HandVisual
    • ImageView
    • StreamSource
      • SpriteSource
      • VideoSource
      • WebcamSource
    • HandTrackerExtensions
    • WebcamSelector
Powered by GitBook
On this page
  • Constructors
  • Properties
  • Example
  1. UI Reference
  2. StreamSource

VideoSource

Manages the video functionality.

PreviousSpriteSourceNextWebcamSource

Last updated 1 year ago

public class VideoSource : StreamSource

Inherits class.

Constructors

Name
Description

VideoSource()

Creates a new VideoSource object.

Properties

Name
Type
Description

Timestamp

DateTime

Read-Only. Overriden. The frame timestamp.

Width

int

Read-Only. Overriden. The width of the video texture in pixels.

Height

int

Read-Only. Overriden. The height of the video texture in pixels.

Pixels

Read-Only. Overriden. The pixel color data for a mipmap level as Color32 structs.

Example

The example shows how to manage video functionality with the VideoSource class.

Create a VideoSource

To create a VideoSource, add a field for Unity to serialize.

[SerializeField] private VideoSource _video;

Get video information

Get the video's timestamp, pixels, width and height.

// Get video timestamp.
DateTime timestamp = _video.Timestamp;

// Get video pixels.
Color32[] pixels = _video.Pixels;

// Get video width.
int width = _video.Width;

// Get video height.
int height = _video.Height;

[]

StreamSource
UnityEngine.Color32