Class WebCamTextureSource
A WebCamTexture-based video source.
Inheritance
System.Object
    
    
    
    MediaSource<IVideoOutput, IVideoInput, IVideoInputCollection, VideoSource, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>
    
    
    WebCamTextureSource
  Implements
Inherited Members
Namespace: FM.LiveSwitch.Unity
Assembly: FM.LiveSwitch.Unity.dll
Syntax
public class WebCamTextureSource : CameraSourceBase, IVideoOutput, IMediaOutput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IOutput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IVideoElement, IMediaElement, IElement
  Constructors
WebCamTextureSource(VideoConfig)
Initializes a new instance of the WebCamTextureSource class.
Declaration
public WebCamTextureSource(VideoConfig targetConfig)
  Parameters
| Type | Name | Description | 
|---|---|---|
| VideoConfig | targetConfig | 
WebCamTextureSource(VideoConfig, Boolean)
Initializes a new instance of the WebCamTextureSource class.
Declaration
public WebCamTextureSource(VideoConfig targetConfig, bool preferFrontFacing)
  Parameters
| Type | Name | Description | 
|---|---|---|
| VideoConfig | targetConfig | |
| System.Boolean | preferFrontFacing | 
Properties
Device
Gets the device.
Declaration
public WebCamDevice? Device { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Nullable<WebCamDevice> | 
GameObject
Gets the game object.
Declaration
public GameObject GameObject { get; }
  Property Value
| Type | Description | 
|---|---|
| GameObject | 
Label
Gets a label that identifies this class.
Declaration
public override string Label { get; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IVideoOutput, FM.LiveSwitch.IVideoInput, FM.LiveSwitch.IVideoInputCollection, FM.LiveSwitch.VideoSource, FM.LiveSwitch.VideoFrame, FM.LiveSwitch.VideoBuffer, FM.LiveSwitch.VideoBufferCollection, FM.LiveSwitch.VideoFormat>.Label
  
  PreferFrontFacing
Gets whether the device list is sorted to prefer front-facing cameras.
Declaration
public bool PreferFrontFacing { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
View
Gets the view.
Declaration
public RectTransform View { get; }
  Property Value
| Type | Description | 
|---|---|
| RectTransform | 
ViewMirror
Gets or sets a value indicating whether the view is mirrored.
Declaration
public bool ViewMirror { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
ViewScale
Gets or sets the view scale.
Declaration
public LayoutScale ViewScale { get; set; }
  Property Value
| Type | Description | 
|---|---|
| LayoutScale | 
WebCamTexture
Gets the underlying WebCamTexture.
Declaration
public WebCamTexture WebCamTexture { get; }
  Property Value
| Type | Description | 
|---|---|
| WebCamTexture | 
Methods
DoDestroy()
Destroys this instance.
Declaration
protected override void DoDestroy()
  Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IVideoOutput, FM.LiveSwitch.IVideoInput, FM.LiveSwitch.IVideoInputCollection, FM.LiveSwitch.VideoSource, FM.LiveSwitch.VideoFrame, FM.LiveSwitch.VideoBuffer, FM.LiveSwitch.VideoBufferCollection, FM.LiveSwitch.VideoFormat>.DoDestroy()
  
  DoStart()
Starts this instance.
Declaration
protected override Future<object> DoStart()
  Returns
| Type | Description | 
|---|---|
| Future<System.Object> | 
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IVideoOutput, FM.LiveSwitch.IVideoInput, FM.LiveSwitch.IVideoInputCollection, FM.LiveSwitch.VideoSource, FM.LiveSwitch.VideoFrame, FM.LiveSwitch.VideoBuffer, FM.LiveSwitch.VideoBufferCollection, FM.LiveSwitch.VideoFormat>.DoStart()
  
  DoStop()
Stops this instance.
Declaration
protected override Future<object> DoStop()
  Returns
| Type | Description | 
|---|---|
| Future<System.Object> | 
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IVideoOutput, FM.LiveSwitch.IVideoInput, FM.LiveSwitch.IVideoInputCollection, FM.LiveSwitch.VideoSource, FM.LiveSwitch.VideoFrame, FM.LiveSwitch.VideoBuffer, FM.LiveSwitch.VideoBufferCollection, FM.LiveSwitch.VideoFormat>.DoStop()
  
  GetInputs()
Gets the available inputs.
Declaration
public override Future<SourceInput[]> GetInputs()
  Returns
| Type | Description | 
|---|---|
| Future<SourceInput[]> | 
Overrides
FM.LiveSwitch.MediaSource<FM.LiveSwitch.IVideoOutput, FM.LiveSwitch.IVideoInput, FM.LiveSwitch.IVideoInputCollection, FM.LiveSwitch.VideoSource, FM.LiveSwitch.VideoFrame, FM.LiveSwitch.VideoBuffer, FM.LiveSwitch.VideoBufferCollection, FM.LiveSwitch.VideoFormat>.GetInputs()