Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeviceSourceManager

Class to keep track of devices

Hierarchy

  • DeviceSourceManager

Implements

Index

Constructors

constructor

  • Default constructor

    Parameters

    • engine: Engine

      Used to get canvas (if applicable)

    Returns DeviceSourceManager

Properties

Readonly onDeviceConnectedObservableSearch playground for onDeviceConnectedObservable

onDeviceConnectedObservable: Observable<DeviceSourceType>

Observable to be triggered when after a device is connected, any new observers added will be triggered against already connected devices

Readonly onDeviceDisconnectedObservableSearch playground for onDeviceDisconnectedObservable

onDeviceDisconnectedObservable: Observable<DeviceSourceType>

Observable to be triggered when after a device is disconnected

Methods

disposeSearch playground for dispose

  • dispose(): void
  • Dispose of DeviceSourceManager

    Returns void

getDeviceSourceSearch playground for getDeviceSource

  • Gets a DeviceSource, given a type and slot

    Type parameters

    Parameters

    • deviceType: T

      Type of Device

    • Optional deviceSlot: number

      Slot or ID of device

    Returns Nullable<DeviceSource<T>>

    DeviceSource

getDeviceSourcesSearch playground for getDeviceSources

  • getDeviceSources<T>(deviceType: T): ReadonlyArray<DeviceSource<T>>
  • Gets an array of DeviceSource objects for a given device type

    Type parameters

    Parameters

    • deviceType: T

      Type of Device

    Returns ReadonlyArray<DeviceSource<T>>

    All available DeviceSources of a given type

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method