sound#

class platypush.message.event.sound.SoundEvent(*args, device: str | Tuple[str, str] | None = None, **kwargs)[source]#

Bases: Event, ABC

Base class for sound events

__init__(*args, device: str | Tuple[str, str] | None = None, **kwargs)[source]#
Parameters:
  • target (str) – Target node

  • origin (str) – Origin node (default: current node)

  • id (str) – Event ID (default: auto-generated)

  • timestamp (float) – Event timestamp (default: current time)

  • logging_level – Logging level for this event (default: logging.INFO)

  • disable_web_clients_notification – Don’t send a notification of this event to the websocket clients

  • kwargs – Additional arguments for the event

class platypush.message.event.sound.SoundEventWithResource(*args, resource: str | None = None, **kwargs)[source]#

Bases: SoundEvent, ABC

Base class for sound events with resource names attached

__init__(*args, resource: str | None = None, **kwargs)[source]#
Parameters:
  • target (str) – Target node

  • origin (str) – Origin node (default: current node)

  • id (str) – Event ID (default: auto-generated)

  • timestamp (float) – Event timestamp (default: current time)

  • logging_level – Logging level for this event (default: logging.INFO)

  • disable_web_clients_notification – Don’t send a notification of this event to the websocket clients

  • kwargs – Additional arguments for the event

class platypush.message.event.sound.SoundPlaybackPausedEvent(*args, resource: str | None = None, **kwargs)[source]#

Bases: SoundEventWithResource

Event triggered when the sound playback pauses

class platypush.message.event.sound.SoundPlaybackResumedEvent(*args, resource: str | None = None, **kwargs)[source]#

Bases: SoundEventWithResource

Event triggered when the sound playback resumsed from a paused state

class platypush.message.event.sound.SoundPlaybackStartedEvent(*args, resource: str | None = None, **kwargs)[source]#

Bases: SoundEventWithResource

Event triggered when a new sound playback starts

class platypush.message.event.sound.SoundPlaybackStoppedEvent(*args, resource: str | None = None, **kwargs)[source]#

Bases: SoundEventWithResource

Event triggered when the sound playback stops

class platypush.message.event.sound.SoundRecordingPausedEvent(*args, resource: str | None = None, **kwargs)[source]#

Bases: SoundEventWithResource

Event triggered when a sound recording pauses

class platypush.message.event.sound.SoundRecordingResumedEvent(*args, device: str | Tuple[str, str] | None = None, **kwargs)[source]#

Bases: SoundEvent

Event triggered when a sound recording resumes from a paused state

class platypush.message.event.sound.SoundRecordingStartedEvent(*args, resource: str | None = None, **kwargs)[source]#

Bases: SoundEventWithResource

Event triggered when a new recording starts

class platypush.message.event.sound.SoundRecordingStoppedEvent(*args, resource: str | None = None, **kwargs)[source]#

Bases: SoundEventWithResource

Event triggered when a sound recording stops