Class VideoStreamTrack
Inherited Members
Namespace: Unity.WebRTC
Syntax
public class VideoStreamTrack : MediaStreamTrack, IDisposable
Constructors
VideoStreamTrack(String, IntPtr, Int32, Int32)
Creates a new VideoStream object.
The track is created with a source texture ptr.
It is noted that streamed video might be flipped when not action was taken. Almost case it has no problem to use other constructor instead.
See Also: Texture.GetNativeTexturePtr
Declaration
public VideoStreamTrack(string label, IntPtr ptr, int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| String | label | |
| IntPtr | ptr | |
| Int32 | width | |
| Int32 | height |
VideoStreamTrack(String, RenderTexture)
Creates a new VideoStream object.
The track is created with a source.
Declaration
public VideoStreamTrack(string label, RenderTexture source)
Parameters
| Type | Name | Description |
|---|---|---|
| String | label | |
| RenderTexture | source |
VideoStreamTrack(String, Texture)
Declaration
public VideoStreamTrack(string label, Texture source)
Parameters
| Type | Name | Description |
|---|---|---|
| String | label | |
| Texture | source |
Properties
IsInitialized
note: The videotrack cannot be used if the encoder has not been initialized. Do not use it until the initialization is complete.
Declaration
public bool IsInitialized { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Methods
Dispose()
Declaration
public override void Dispose()