Interface IMedia
This domain allows detailed inspection of media elements.
[Experimental("BIDICDP001")]
public interface IMedia
Properties
PlayerCreated
Called whenever a player is created, or when a new agent joins and receives a list of active players. If an agent is restored, it will receive one event for each active player.
IEventSource<PlayerCreatedEventArgs> PlayerCreated { get; }
Property Value
- IEventSource<PlayerCreatedEventArgs>
Remarks
Event args (PlayerCreatedEventArgs):
- Player
PlayerErrorsRaised
Send a list of any errors that need to be delivered.
IEventSource<PlayerErrorsRaisedEventArgs> PlayerErrorsRaised { get; }
Property Value
- IEventSource<PlayerErrorsRaisedEventArgs>
Remarks
Event args (PlayerErrorsRaisedEventArgs):
- PlayerId
- Errors
PlayerEventsAdded
Send events as a list, allowing them to be batched on the browser for less congestion. If batched, events must ALWAYS be in chronological order.
IEventSource<PlayerEventsAddedEventArgs> PlayerEventsAdded { get; }
Property Value
- IEventSource<PlayerEventsAddedEventArgs>
Remarks
Event args (PlayerEventsAddedEventArgs):
- PlayerId
- Events
PlayerMessagesLogged
Send a list of any messages that need to be delivered.
IEventSource<PlayerMessagesLoggedEventArgs> PlayerMessagesLogged { get; }
Property Value
- IEventSource<PlayerMessagesLoggedEventArgs>
Remarks
Event args (PlayerMessagesLoggedEventArgs):
- PlayerId
- Messages
PlayerPropertiesChanged
This can be called multiple times, and can be used to set / override / remove player properties. A null propValue indicates removal.
IEventSource<PlayerPropertiesChangedEventArgs> PlayerPropertiesChanged { get; }
Property Value
- IEventSource<PlayerPropertiesChangedEventArgs>
Remarks
Event args (PlayerPropertiesChangedEventArgs):
- PlayerId
- Properties
Methods
DisableAsync(string?, CancellationToken)
Disables the Media domain.
Task<DisableResult> DisableAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<DisableResult>
A task representing the asynchronous operation, containing a DisableResult.
EnableAsync(string?, CancellationToken)
Enables the Media domain
Task<EnableResult> EnableAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<EnableResult>
A task representing the asynchronous operation, containing a EnableResult.