Table of Contents

Class WebAudioAdapter

Namespace
OpenQA.Selenium.DevTools.V148.WebAudio
Assembly
Selenium.WebDriver.dll

Represents an adapter for the WebAudio domain to simplify the command interface.

public class WebAudioAdapter
Inheritance
WebAudioAdapter
Inherited Members

Constructors

WebAudioAdapter(IDevToolsSession)

Initializes a new instance of the WebAudioAdapter class.

public WebAudioAdapter(IDevToolsSession session)

Parameters

session IDevToolsSession

The IDevToolsSession to be used with this adapter.

Exceptions

ArgumentNullException

If session is null.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

Methods

Disable(DisableCommandSettings?, CancellationToken, int?, bool)

Disables the WebAudio domain.

public Task<DisableCommandResponse?> Disable(DisableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command DisableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DisableCommandResponse>

Enable(EnableCommandSettings?, CancellationToken, int?, bool)

Enables the WebAudio domain and starts sending context lifetime events.

public Task<EnableCommandResponse?> Enable(EnableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command EnableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<EnableCommandResponse>

GetRealtimeData(GetRealtimeDataCommandSettings, CancellationToken, int?, bool)

Fetch the realtime data from the registered contexts.

public Task<GetRealtimeDataCommandResponse> GetRealtimeData(GetRealtimeDataCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetRealtimeDataCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetRealtimeDataCommandResponse>

Events

AudioListenerCreated

Notifies that the construction of an AudioListener has finished.

public event EventHandler<AudioListenerCreatedEventArgs>? AudioListenerCreated

Event Type

EventHandler<AudioListenerCreatedEventArgs>

AudioListenerWillBeDestroyed

Notifies that a new AudioListener has been created.

public event EventHandler<AudioListenerWillBeDestroyedEventArgs>? AudioListenerWillBeDestroyed

Event Type

EventHandler<AudioListenerWillBeDestroyedEventArgs>

AudioNodeCreated

Notifies that a new AudioNode has been created.

public event EventHandler<AudioNodeCreatedEventArgs>? AudioNodeCreated

Event Type

EventHandler<AudioNodeCreatedEventArgs>

AudioNodeWillBeDestroyed

Notifies that an existing AudioNode has been destroyed.

public event EventHandler<AudioNodeWillBeDestroyedEventArgs>? AudioNodeWillBeDestroyed

Event Type

EventHandler<AudioNodeWillBeDestroyedEventArgs>

AudioParamCreated

Notifies that a new AudioParam has been created.

public event EventHandler<AudioParamCreatedEventArgs>? AudioParamCreated

Event Type

EventHandler<AudioParamCreatedEventArgs>

AudioParamWillBeDestroyed

Notifies that an existing AudioParam has been destroyed.

public event EventHandler<AudioParamWillBeDestroyedEventArgs>? AudioParamWillBeDestroyed

Event Type

EventHandler<AudioParamWillBeDestroyedEventArgs>

ContextChanged

Notifies that existing BaseAudioContext has changed some properties (id stays the same)..

public event EventHandler<ContextChangedEventArgs>? ContextChanged

Event Type

EventHandler<ContextChangedEventArgs>

ContextCreated

Notifies that a new BaseAudioContext has been created.

public event EventHandler<ContextCreatedEventArgs>? ContextCreated

Event Type

EventHandler<ContextCreatedEventArgs>

ContextWillBeDestroyed

Notifies that an existing BaseAudioContext will be destroyed.

public event EventHandler<ContextWillBeDestroyedEventArgs>? ContextWillBeDestroyed

Event Type

EventHandler<ContextWillBeDestroyedEventArgs>

NodeParamConnected

Notifies that an AudioNode is connected to an AudioParam.

public event EventHandler<NodeParamConnectedEventArgs>? NodeParamConnected

Event Type

EventHandler<NodeParamConnectedEventArgs>

NodeParamDisconnected

Notifies that an AudioNode is disconnected to an AudioParam.

public event EventHandler<NodeParamDisconnectedEventArgs>? NodeParamDisconnected

Event Type

EventHandler<NodeParamDisconnectedEventArgs>

NodesConnected

Notifies that two AudioNodes are connected.

public event EventHandler<NodesConnectedEventArgs>? NodesConnected

Event Type

EventHandler<NodesConnectedEventArgs>

NodesDisconnected

Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.

public event EventHandler<NodesDisconnectedEventArgs>? NodesDisconnected

Event Type

EventHandler<NodesDisconnectedEventArgs>