WebRTC Video Chat 1.0.6
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Properties | List of all members
Byn.Awrtc.MediaConfig Class Reference

Media related configuration for ICall and IMediaNetwork. More...

Public Member Functions

 MediaConfig ()
 Default configuration. Can be used directly.
 
override bool Equals (object obj)
 True if the configurations are equal by comparing all members.
 
override int GetHashCode ()
 
virtual MediaConfig DeepClone ()
 Creates a clone by copying the content of all members.
 
override string ToString ()
 Returns a string listing all values.
 

Protected Member Functions

 MediaConfig (MediaConfig other)
 Copy constructor used to clone objects of MediaConfig and its subclasses.
 
virtual void ToStringBase (StringBuilder sb)
 Override in subclass to append more information to the ToString method.
 

Properties

bool Audio [get, set]
 Set true to allow sending video to the other connection(s)
 
bool Video [get, set]
 Set true to allow sending video to the other connection(s).
 
string VideoDeviceName [get, set]
 Name of the video device or null to automatically choose any device. Will be ignored in the browser as the user needs to configure the browser itself to set a certain video device.
 
int? MinWidth [get, set]
 Sets the absolute minimum width usable. Everything below this resolution leads to an error during the configuration process.
 
int? MinHeight [get, set]
 Sets the absolute minimum height usable. Everything below this resolution leads to an error during the configuration process.
 
int? MaxWidth [get, set]
 Sets the absolute maximum width usable. Everything above this resolution leads to an error during the configuration process.
 
int? MaxHeight [get, set]
 Sets the absolute maximum height usable. Everything above this resolution leads to an error during the configuration process.
 
int? IdealWidth [get, set]
 Ideal width. The closest value width is used if the camera has multiple possible configurations that are within max and min width.
 
int? IdealHeight [get, set]
 Ideal height. The closest value height is used if the camera has multiple possible configurations that are within max and min width.
 
int? IdealFrameRate [get, set]
 WebRTC will chose the device configuration which has the FPS closest to the given value for IdealFrameRate. (IdealWidth, IdealHeight has priority though.)
 
int? MinFrameRate [get, set]
 WebRTC will only consider device configurations that have at least the given frame rate.
 
int? MaxFrameRate [get, set]
 WebRTC will only consider device configurations that have a frame rate below the given value.
 
FramePixelFormat Format [get, set]
 This will support multiple formats in the future. So far only FramePixelFormat.ABGR is supported due to browser compatibility.
 
string[] VideoCodecs [get, set]
 A list of codecs in order of priority. Any codecs the platform does support but is not in the list will be ignored and treated as unsupported.
 
int? VideoBitrateKbits [get, set]
 Sets the video encoding bitrate in kbits.
 
string VideoContentHint [get, set]
 Sets a content hint to prioritize video resolution or framerate while load balancing.
 
static MediaConfig DefaultOff [get]
 Returns a config with audio and video turned off (future default).
 

Detailed Description

Media related configuration for ICall and IMediaNetwork.

Allows to turn on / off the sending of audio, video and set the preferred resolution.

Note that the Width / Height values are used to find the most suitable setting the camera hardware supports. It is not possible to force the hardware to supply a specific resolution.

UPDATE: Most WebRTC implementations no longer use the Max/Min values. In most cases WebRTC will check what resolution the camera supports and then pick the closest to the requested ideal width and height.

Constructor & Destructor Documentation

◆ MediaConfig()

Byn.Awrtc.MediaConfig.MediaConfig ( MediaConfig other)
protected

Copy constructor used to clone objects of MediaConfig and its subclasses.

Parameters
other

Member Function Documentation

◆ DeepClone()

virtual MediaConfig Byn.Awrtc.MediaConfig.DeepClone ( )
virtual

Creates a clone by copying the content of all members.

Returns
Cloned object

◆ Equals()

override bool Byn.Awrtc.MediaConfig.Equals ( object obj)

True if the configurations are equal by comparing all members.

Parameters
obj
Returns

◆ GetHashCode()

override int Byn.Awrtc.MediaConfig.GetHashCode ( )
Returns

◆ ToString()

override string Byn.Awrtc.MediaConfig.ToString ( )

Returns a string listing all values.

Returns

◆ ToStringBase()

virtual void Byn.Awrtc.MediaConfig.ToStringBase ( StringBuilder sb)
protectedvirtual

Override in subclass to append more information to the ToString method.

Parameters
sbStringBuilder to append information

Property Documentation

◆ MaxHeight

int? Byn.Awrtc.MediaConfig.MaxHeight
getset

Sets the absolute maximum height usable. Everything above this resolution leads to an error during the configuration process.

Note that a too high value here can reduce the performance extremely if a user has a high res webcam but a weak CPU.

◆ MaxWidth

int? Byn.Awrtc.MediaConfig.MaxWidth
getset

Sets the absolute maximum width usable. Everything above this resolution leads to an error during the configuration process.

Note that a too high value here can reduce the performance extremely if a user has a high res webcam but a weak CPU.

◆ VideoCodecs

string [] Byn.Awrtc.MediaConfig.VideoCodecs
getset

A list of codecs in order of priority. Any codecs the platform does support but is not in the list will be ignored and treated as unsupported.

VP8 and VP9 are usually supported. H264 is only supported on some platforms and might not work reliably.

Keep at null to use the implementation specific default behavior.

◆ VideoContentHint

string Byn.Awrtc.MediaConfig.VideoContentHint
getset

Sets a content hint to prioritize video resolution or framerate while load balancing.

motion = High FPS but might lower resolution detail = High resolution but might lower FPS text = Optimization for content containing text


The documentation for this class was generated from the following file: