web_audio
AudioListener
dataclass
Protocol object for AudioListener
Source code in zendriver/cdp/web_audio.py
context_id: GraphObjectId
instance-attribute
listener_id: GraphObjectId
instance-attribute
__init__(listener_id, context_id)
from_json(json)
classmethod
AudioListenerCreated
dataclass
Notifies that the construction of an AudioListener has finished.
Source code in zendriver/cdp/web_audio.py
AudioListenerWillBeDestroyed
dataclass
Notifies that a new AudioListener has been created.
Source code in zendriver/cdp/web_audio.py
context_id: GraphObjectId
instance-attribute
listener_id: GraphObjectId
instance-attribute
__init__(context_id, listener_id)
from_json(json)
classmethod
AudioNode
dataclass
Protocol object for AudioNode
Source code in zendriver/cdp/web_audio.py
channel_count: float
instance-attribute
channel_count_mode: ChannelCountMode
instance-attribute
channel_interpretation: ChannelInterpretation
instance-attribute
context_id: GraphObjectId
instance-attribute
node_id: GraphObjectId
instance-attribute
node_type: NodeType
instance-attribute
number_of_inputs: float
instance-attribute
number_of_outputs: float
instance-attribute
__init__(node_id, context_id, node_type, number_of_inputs, number_of_outputs, channel_count, channel_count_mode, channel_interpretation)
from_json(json)
classmethod
Source code in zendriver/cdp/web_audio.py
to_json()
Source code in zendriver/cdp/web_audio.py
AudioNodeCreated
dataclass
Notifies that a new AudioNode has been created.
Source code in zendriver/cdp/web_audio.py
AudioNodeWillBeDestroyed
dataclass
Notifies that an existing AudioNode has been destroyed.
Source code in zendriver/cdp/web_audio.py
context_id: GraphObjectId
instance-attribute
node_id: GraphObjectId
instance-attribute
__init__(context_id, node_id)
AudioParam
dataclass
Protocol object for AudioParam
Source code in zendriver/cdp/web_audio.py
context_id: GraphObjectId
instance-attribute
default_value: float
instance-attribute
max_value: float
instance-attribute
min_value: float
instance-attribute
node_id: GraphObjectId
instance-attribute
param_id: GraphObjectId
instance-attribute
param_type: ParamType
instance-attribute
rate: AutomationRate
instance-attribute
__init__(param_id, node_id, context_id, param_type, rate, default_value, min_value, max_value)
from_json(json)
classmethod
Source code in zendriver/cdp/web_audio.py
to_json()
Source code in zendriver/cdp/web_audio.py
AudioParamCreated
dataclass
Notifies that a new AudioParam has been created.
Source code in zendriver/cdp/web_audio.py
AudioParamWillBeDestroyed
dataclass
Notifies that an existing AudioParam has been destroyed.
Source code in zendriver/cdp/web_audio.py
context_id: GraphObjectId
instance-attribute
node_id: GraphObjectId
instance-attribute
param_id: GraphObjectId
instance-attribute
__init__(context_id, node_id, param_id)
from_json(json)
classmethod
Source code in zendriver/cdp/web_audio.py
AutomationRate
Bases: Enum
Enum of AudioParam::AutomationRate from the spec
Source code in zendriver/cdp/web_audio.py
A_RATE = 'a-rate'
class-attribute
instance-attribute
K_RATE = 'k-rate'
class-attribute
instance-attribute
from_json(json)
classmethod
BaseAudioContext
dataclass
Protocol object for BaseAudioContext
Source code in zendriver/cdp/web_audio.py
callback_buffer_size: float
instance-attribute
context_id: GraphObjectId
instance-attribute
context_state: ContextState
instance-attribute
context_type: ContextType
instance-attribute
max_output_channel_count: float
instance-attribute
realtime_data: typing.Optional[ContextRealtimeData] = None
class-attribute
instance-attribute
sample_rate: float
instance-attribute
__init__(context_id, context_type, context_state, callback_buffer_size, max_output_channel_count, sample_rate, realtime_data=None)
from_json(json)
classmethod
Source code in zendriver/cdp/web_audio.py
to_json()
Source code in zendriver/cdp/web_audio.py
ChannelCountMode
Bases: Enum
Enum of AudioNode::ChannelCountMode from the spec
Source code in zendriver/cdp/web_audio.py
CLAMPED_MAX = 'clamped-max'
class-attribute
instance-attribute
EXPLICIT = 'explicit'
class-attribute
instance-attribute
MAX_ = 'max'
class-attribute
instance-attribute
from_json(json)
classmethod
ChannelInterpretation
Bases: Enum
Enum of AudioNode::ChannelInterpretation from the spec
Source code in zendriver/cdp/web_audio.py
DISCRETE = 'discrete'
class-attribute
instance-attribute
SPEAKERS = 'speakers'
class-attribute
instance-attribute
from_json(json)
classmethod
ContextChanged
dataclass
Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
Source code in zendriver/cdp/web_audio.py
ContextCreated
dataclass
Notifies that a new BaseAudioContext has been created.
Source code in zendriver/cdp/web_audio.py
ContextRealtimeData
dataclass
Fields in AudioContext that change in real-time.
Source code in zendriver/cdp/web_audio.py
callback_interval_mean: float
instance-attribute
callback_interval_variance: float
instance-attribute
current_time: float
instance-attribute
render_capacity: float
instance-attribute
__init__(current_time, render_capacity, callback_interval_mean, callback_interval_variance)
from_json(json)
classmethod
Source code in zendriver/cdp/web_audio.py
to_json()
Source code in zendriver/cdp/web_audio.py
ContextState
Bases: Enum
Enum of AudioContextState from the spec
Source code in zendriver/cdp/web_audio.py
CLOSED = 'closed'
class-attribute
instance-attribute
INTERRUPTED = 'interrupted'
class-attribute
instance-attribute
RUNNING = 'running'
class-attribute
instance-attribute
SUSPENDED = 'suspended'
class-attribute
instance-attribute
from_json(json)
classmethod
ContextType
Bases: Enum
Enum of BaseAudioContext types
Source code in zendriver/cdp/web_audio.py
OFFLINE = 'offline'
class-attribute
instance-attribute
REALTIME = 'realtime'
class-attribute
instance-attribute
from_json(json)
classmethod
ContextWillBeDestroyed
dataclass
Notifies that an existing BaseAudioContext will be destroyed.
Source code in zendriver/cdp/web_audio.py
GraphObjectId
Bases: str
An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API
Source code in zendriver/cdp/web_audio.py
__repr__()
from_json(json)
classmethod
NodeParamConnected
dataclass
Notifies that an AudioNode is connected to an AudioParam.
Source code in zendriver/cdp/web_audio.py
context_id: GraphObjectId
instance-attribute
destination_id: GraphObjectId
instance-attribute
source_id: GraphObjectId
instance-attribute
source_output_index: typing.Optional[float]
instance-attribute
__init__(context_id, source_id, destination_id, source_output_index)
from_json(json)
classmethod
Source code in zendriver/cdp/web_audio.py
NodeParamDisconnected
dataclass
Notifies that an AudioNode is disconnected to an AudioParam.
Source code in zendriver/cdp/web_audio.py
context_id: GraphObjectId
instance-attribute
destination_id: GraphObjectId
instance-attribute
source_id: GraphObjectId
instance-attribute
source_output_index: typing.Optional[float]
instance-attribute
__init__(context_id, source_id, destination_id, source_output_index)
from_json(json)
classmethod
Source code in zendriver/cdp/web_audio.py
NodeType
Bases: str
Enum of AudioNode types
Source code in zendriver/cdp/web_audio.py
__repr__()
from_json(json)
classmethod
NodesConnected
dataclass
Notifies that two AudioNodes are connected.
Source code in zendriver/cdp/web_audio.py
context_id: GraphObjectId
instance-attribute
destination_id: GraphObjectId
instance-attribute
destination_input_index: typing.Optional[float]
instance-attribute
source_id: GraphObjectId
instance-attribute
source_output_index: typing.Optional[float]
instance-attribute
__init__(context_id, source_id, destination_id, source_output_index, destination_input_index)
from_json(json)
classmethod
Source code in zendriver/cdp/web_audio.py
NodesDisconnected
dataclass
Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.
Source code in zendriver/cdp/web_audio.py
context_id: GraphObjectId
instance-attribute
destination_id: GraphObjectId
instance-attribute
destination_input_index: typing.Optional[float]
instance-attribute
source_id: GraphObjectId
instance-attribute
source_output_index: typing.Optional[float]
instance-attribute
__init__(context_id, source_id, destination_id, source_output_index, destination_input_index)
from_json(json)
classmethod
Source code in zendriver/cdp/web_audio.py
ParamType
Bases: str
Enum of AudioParam types
Source code in zendriver/cdp/web_audio.py
__repr__()
from_json(json)
classmethod
disable()
enable()
Enables the WebAudio domain and starts sending context lifetime events.
get_realtime_data(context_id)
Fetch the realtime data from the registered contexts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
context_id
|
GraphObjectId
|
|
required |
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, ContextRealtimeData]
|
|