Media🧪
该域允许对''和``内的媒体元素进行详细检查。
EN
This domain allows detailed inspection of media elements.
✅️️ Methods
🔨Media.disable
禁用媒体域。
EN
Disables the Media domain.
🔨Media.enable
启用媒体域
EN
Enables the Media domain
✅️️ Events
👋Media.playerCreated
每当玩家被创建时,或新代理加入并接收到活跃玩家列表时调用。如果代理被恢复,它将为每个活跃玩家收到一个事件。
EN
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.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| player | ✔️ | Player |
👋Media.playerErrorsRaised
发送任何需要交付的错误列表。
EN
Send a list of any errors that need to be delivered.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| playerId | ✔️ | PlayerId | |||
| errors | ✔️ | array[PlayerError] |
👋Media.playerEventsAdded
将事件以列表形式发送,允许浏览器对其进行批处理以减少拥塞。如果进行批处理,事件必须始终按时间顺序排列。
EN
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.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| playerId | ✔️ | PlayerId | |||
| events | ✔️ | array[PlayerEvent] |
👋Media.playerMessagesLogged
发送需要传递的任何消息列表。
EN
Send a list of any messages that need to be delivered.
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| playerId | ✔️ | PlayerId | |||
| messages | ✔️ | array[PlayerMessage] |