media
PlayerError
dataclass
Corresponds to kMediaError
Source code in zendriver/cdp/media.py
cause: typing.List[PlayerError]
instance-attribute
code: int
instance-attribute
data: dict
instance-attribute
error_type: str
instance-attribute
stack: typing.List[PlayerErrorSourceLocation]
instance-attribute
__init__(error_type, code, stack, cause, data)
from_json(json)
classmethod
Source code in zendriver/cdp/media.py
to_json()
Source code in zendriver/cdp/media.py
PlayerErrorSourceLocation
dataclass
Represents logged source line numbers reported in an error. NOTE: file and line are from chromium c++ implementation code, not js.
Source code in zendriver/cdp/media.py
file: str
instance-attribute
line: int
instance-attribute
__init__(file, line)
from_json(json)
classmethod
PlayerErrorsRaised
dataclass
Send a list of any errors that need to be delivered.
Source code in zendriver/cdp/media.py
errors: typing.List[PlayerError]
instance-attribute
player_id: PlayerId
instance-attribute
__init__(player_id, errors)
PlayerEvent
dataclass
Corresponds to kMediaEventTriggered
Source code in zendriver/cdp/media.py
timestamp: Timestamp
instance-attribute
value: str
instance-attribute
__init__(timestamp, value)
from_json(json)
classmethod
PlayerEventsAdded
dataclass
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.
Source code in zendriver/cdp/media.py
events: typing.List[PlayerEvent]
instance-attribute
player_id: PlayerId
instance-attribute
__init__(player_id, events)
PlayerId
Bases: str
Players will get an ID that is unique within the agent context.
Source code in zendriver/cdp/media.py
__repr__()
from_json(json)
classmethod
PlayerMessage
dataclass
Have one type per entry in MediaLogRecord::Type Corresponds to kMessage
Source code in zendriver/cdp/media.py
level: str
instance-attribute
message: str
instance-attribute
__init__(level, message)
from_json(json)
classmethod
PlayerMessagesLogged
dataclass
Send a list of any messages that need to be delivered.
Source code in zendriver/cdp/media.py
messages: typing.List[PlayerMessage]
instance-attribute
player_id: PlayerId
instance-attribute
__init__(player_id, messages)
PlayerPropertiesChanged
dataclass
This can be called multiple times, and can be used to set / override / remove player properties. A null propValue indicates removal.
Source code in zendriver/cdp/media.py
player_id: PlayerId
instance-attribute
properties: typing.List[PlayerProperty]
instance-attribute
__init__(player_id, properties)
PlayerProperty
dataclass
Corresponds to kMediaPropertyChange
Source code in zendriver/cdp/media.py
name: str
instance-attribute
value: str
instance-attribute
__init__(name, value)
from_json(json)
classmethod
PlayersCreated
dataclass
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 the full list of player ids and all events again.
Source code in zendriver/cdp/media.py
Timestamp
Bases: float