# This file is auto-generated by the CDP protocol generator.
# Do not edit this file manually as your changes will be overwritten.
# Generated from Chrome DevTools Protocol specifications.

"""CDP Media Domain Events"""

from typing import List
from typing_extensions import TypedDict

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from .types import Player
    from .types import PlayerError
    from .types import PlayerEvent
    from .types import PlayerId
    from .types import PlayerMessage
    from .types import PlayerProperty

"""This can be called multiple times, and can be used to set / override /
remove player properties. A null propValue indicates removal."""


class PlayerPropertiesChangedEvent(TypedDict):
    playerId: "PlayerId"
    properties: "List[PlayerProperty]"


"""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."""


class PlayerEventsAddedEvent(TypedDict):
    playerId: "PlayerId"
    events: "List[PlayerEvent]"


"""Send a list of any messages that need to be delivered."""


class PlayerMessagesLoggedEvent(TypedDict):
    playerId: "PlayerId"
    messages: "List[PlayerMessage]"


"""Send a list of any errors that need to be delivered."""


class PlayerErrorsRaisedEvent(TypedDict):
    playerId: "PlayerId"
    errors: "List[PlayerError]"


"""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."""


class PlayerCreatedEvent(TypedDict):
    player: "Player"
