Class MediaAdapter
Represents an adapter for the Media domain to simplify the command interface.
public class MediaAdapter
- Inheritance
-
MediaAdapter
- Inherited Members
Constructors
MediaAdapter(IDevToolsSession)
Initializes a new instance of the MediaAdapter class.
public MediaAdapter(IDevToolsSession session)
Parameters
sessionIDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
sessionis null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
Disable(DisableCommandSettings?, CancellationToken, int?, bool)
Disables the Media domain.
public Task<DisableCommandResponse?> Disable(DisableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandDisableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Enable(EnableCommandSettings?, CancellationToken, int?, bool)
Enables the Media domain
public Task<EnableCommandResponse?> Enable(EnableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandEnableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Events
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.
public event EventHandler<PlayerCreatedEventArgs>? PlayerCreated
Event Type
PlayerErrorsRaised
Send a list of any errors that need to be delivered.
public event EventHandler<PlayerErrorsRaisedEventArgs>? PlayerErrorsRaised
Event Type
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.
public event EventHandler<PlayerEventsAddedEventArgs>? PlayerEventsAdded
Event Type
PlayerMessagesLogged
Send a list of any messages that need to be delivered.
public event EventHandler<PlayerMessagesLoggedEventArgs>? PlayerMessagesLogged
Event Type
PlayerPropertiesChanged
This can be called multiple times, and can be used to set / override / remove player properties. A null propValue indicates removal.
public event EventHandler<PlayerPropertiesChangedEventArgs>? PlayerPropertiesChanged