BooleanOrMediaTrackConstraints Struct
The (boolean or MediaTrackConstraints) union of the audio and video members of MediaStreamConstraints and DisplayMediaStreamOptions: whether the kind of media is requested, or the constraints of its track.
public readonly struct BooleanOrMediaTrackConstraints : IEquatable<BooleanOrMediaTrackConstraints>Properties
| Name | Description |
|---|---|
| Constraints | Gets the constraints when the union holds it, otherwise null. |
| Flag | Gets the boolean when the union holds it, otherwise null. |
| Value | Gets the value of the union: Boolean or MediaTrackConstraints. |
Constraints
MediaCaptureUnions.csGets the constraints when the union holds it, otherwise null.
public MediaTrackConstraints? Constraints { get; }Property value
Gets the value of the union: Boolean or MediaTrackConstraints.
public object Value { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(BooleanOrMediaTrackConstraints) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| FromBoolean(bool) | Creates the union from the boolean. |
| FromMediaTrackConstraints(MediaTrackConstraints) | Creates the union from the constraints. |
| GetHashCode() | Returns the hash code for this instance. |
Equals overloads
Equals(BooleanOrMediaTrackConstraints)
MediaCaptureUnions.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(BooleanOrMediaTrackConstraints other)Parameters
otherBooleanOrMediaTrackConstraints- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
MediaCaptureUnions.csFromBoolean(bool)
MediaCaptureUnions.csCreates the union from the boolean.
public static BooleanOrMediaTrackConstraints FromBoolean(bool value)FromMediaTrackConstraints(MediaTrackConstraints)
MediaCaptureUnions.csCreates the union from the constraints.
public static BooleanOrMediaTrackConstraints FromMediaTrackConstraints(MediaTrackConstraints value)GetHashCode()
MediaCaptureUnions.csOperators
| Name | Description |
|---|---|
| operator ==(BooleanOrMediaTrackConstraints, BooleanOrMediaTrackConstraints) | Returns whether the two unions hold the same value. |
| implicit operator BooleanOrMediaTrackConstraints(MediaTrackConstraints) | Creates the union from the constraints. |
| implicit operator BooleanOrMediaTrackConstraints(bool) | Creates the union from the boolean. |
| operator !=(BooleanOrMediaTrackConstraints, BooleanOrMediaTrackConstraints) | Returns whether the two unions hold different values. |
operator ==(BooleanOrMediaTrackConstraints, BooleanOrMediaTrackConstraints)
MediaCaptureUnions.csReturns whether the two unions hold the same value.
public static bool operator ==(BooleanOrMediaTrackConstraints left, BooleanOrMediaTrackConstraints right)op_Implicit overloads
implicit operator BooleanOrMediaTrackConstraints(MediaTrackConstraints)
MediaCaptureUnions.csCreates the union from the constraints.
public static implicit operator BooleanOrMediaTrackConstraints(MediaTrackConstraints value)implicit operator BooleanOrMediaTrackConstraints(bool)
MediaCaptureUnions.csCreates the union from the boolean.
public static implicit operator BooleanOrMediaTrackConstraints(bool value)operator !=(BooleanOrMediaTrackConstraints, BooleanOrMediaTrackConstraints)
MediaCaptureUnions.csReturns whether the two unions hold different values.
public static bool operator !=(BooleanOrMediaTrackConstraints left, BooleanOrMediaTrackConstraints right)