@zaisma/cli 0.68.0 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -104,6 +104,7 @@ The HTTP status goes with the code, as listed. The list lives in `ERROR_CODES` (
|
|
|
104
104
|
| `bad_deleted_account_erase_enabled` | 400 | deleted_account_erase_enabled isn't true or false. |
|
|
105
105
|
| `bad_friend_joins_enabled` | 400 | friend_joins_enabled isn't true or false. |
|
|
106
106
|
| `bad_performance_measuring_enabled` | 400 | performance_measuring_enabled isn't true or false. |
|
|
107
|
+
| `bad_microphone_enabled` | 400 | microphone_enabled isn't true or false. |
|
|
107
108
|
| `bad_room_browsing` | 400 | room_browsing isn't page, game or off. |
|
|
108
109
|
| `bad_multiplayer_mode` | 400 | multiplayer_mode isn't none, relay or own. |
|
|
109
110
|
| `bad_account_requirement` | 400 | account_requirement isn't none, multiplayer or whole_game. |
|
|
@@ -669,11 +670,11 @@ Every call is checked before any of it runs, in this order: the key's access, wh
|
|
|
669
670
|
| Call | What it does |
|
|
670
671
|
| --- | --- |
|
|
671
672
|
| `GET /games` | Your games, each with its `alerts` (see Alerts below), and `unread_topic_count`: how many of your forum topics Zaisma has replied to or changed since you last opened them. |
|
|
672
|
-
| `POST /games` | Make a game: `{"title", "slug"?, "description"?, "glass_tint_color"?, "devices"?, "controls"?, "genres"?, "screen_orientation"?, "play_modes"?, "cloud_saves_enabled"?, "account_offer_enabled"?, "deleted_account_erase_enabled"?, "friend_joins_enabled"?, "performance_measuring_enabled"?, "multiplayer_mode"?, "room_browsing"?, "account_requirement"?, "minimum_player_age_years"?, "game_server_allowed_hosts"?, "own_server_urls"?, "links"?, "link_out_url"?}`. It starts as a draft that only you can see. Publishing is never limited, but an account holds at most 50 games that no real players play; a game with players frees its slot. |
|
|
673
|
+
| `POST /games` | Make a game: `{"title", "slug"?, "description"?, "glass_tint_color"?, "devices"?, "controls"?, "genres"?, "screen_orientation"?, "play_modes"?, "cloud_saves_enabled"?, "account_offer_enabled"?, "deleted_account_erase_enabled"?, "friend_joins_enabled"?, "performance_measuring_enabled"?, "microphone_enabled"?, "multiplayer_mode"?, "room_browsing"?, "account_requirement"?, "minimum_player_age_years"?, "game_server_allowed_hosts"?, "own_server_urls"?, "links"?, "link_out_url"?}`. It starts as a draft that only you can see. Publishing is never limited, but an account holds at most 50 games that no real players play; a game with players frees its slot. |
|
|
673
674
|
| `GET /games/:slug` | One game with its `alerts` (see Alerts below), `playing_now_player_count` (the exact number of people playing it now: browsers that pressed Play and still have it on screen, and players in your Zaisma rooms, each counted once however many rooms they sit in, from the last 6 minutes; players see it from 3 up), `images`, `versions` (newest first, each with its `review_reason` and scan `findings`) and `testers`. |
|
|
674
|
-
| `PATCH /games/:slug` | Change any of `new_slug` (the game's link, only while `can_change_slug`: a draft or private game never published, with no tester links or kept rooms; else `slug_locked`), `title`, `description`, `visibility`, `devices`, `controls`, `genres`, `screen_orientation`, `play_modes`, `cloud_saves_enabled`, `account_offer_enabled`, `deleted_account_erase_enabled`, `friend_joins_enabled`, `performance_measuring_enabled`, `room_browsing`, `multiplayer_mode`, `account_requirement`, `minimum_player_age_years`, `game_server_allowed_hosts`, `own_server_urls`, `links`, `glass_tint_color`, `demo_game_slug`, `full_game_item_name` (the game's price to play, see "Sell your game once" under Items and purchases; it needs `purchase_access` `write`), `monthly_budget_cents` (the game's monthly budget from your hosting credit, see Hosting and credit; it needs `credit_access` `write`, and a first or higher budget answers `confirmation_needed`). Leave out what stays the same; `null` clears it. Answers with the `game`, `review_message` (set when new words wait for review), `game_server_problem` (why the game's own game server can't run yet, or `null`) and `next_steps`. |
|
|
675
|
+
| `PATCH /games/:slug` | Change any of `new_slug` (the game's link, only while `can_change_slug`: a draft or private game never published, with no tester links or kept rooms; else `slug_locked`), `title`, `description`, `visibility`, `devices`, `controls`, `genres`, `screen_orientation`, `play_modes`, `cloud_saves_enabled`, `account_offer_enabled`, `deleted_account_erase_enabled`, `friend_joins_enabled`, `performance_measuring_enabled`, `microphone_enabled`, `room_browsing`, `multiplayer_mode`, `account_requirement`, `minimum_player_age_years`, `game_server_allowed_hosts`, `own_server_urls`, `links`, `glass_tint_color`, `demo_game_slug`, `full_game_item_name` (the game's price to play, see "Sell your game once" under Items and purchases; it needs `purchase_access` `write`), `monthly_budget_cents` (the game's monthly budget from your hosting credit, see Hosting and credit; it needs `credit_access` `write`, and a first or higher budget answers `confirmation_needed`). Leave out what stays the same; `null` clears it. Answers with the `game`, `review_message` (set when new words wait for review), `game_server_problem` (why the game's own game server can't run yet, or `null`) and `next_steps`. |
|
|
675
676
|
|
|
676
|
-
A game looks like: `slug`, `page_url`, `can_change_slug`, `title`, `description`, `visibility`, `is_waiting_for_zaisma_lists` (a listed game from a new developer, waiting for real players and a few quiet days before Zaisma's own lists show it; its link plays meanwhile), `zaisma_lists_wait` (where a live waiting game stands, null when it isn't waiting or isn't live: `is_held_by_reports`, true when reports a person or triage upheld hold it, never who reported or what they wrote, and `progress`, null when only a report holds it: `live_duration_days` of `minimum_live_duration_days`, `counted_player_count` of `minimum_counted_player_count` and `quiet_duration_days` of `minimum_quiet_duration_days`, the same limits that open the lists every hour), `review_status`, `review_reason`, `erases_at`, `is_erase_now_allowed`, `country_blocks`, `devices`, `controls`, `genres`, `screen_orientation`, `play_modes`, `cloud_saves_enabled`, `account_offer_enabled`, `deleted_account_erase_enabled`, `friend_joins_enabled`, `performance_measuring_enabled`, `multiplayer_mode`, `room_browsing`, `account_requirement`, `minimum_player_age_years`, `game_server_allowed_hosts`, `own_server_urls`, `has_ticket_secret` (whether its own server has a ticket secret for voice, see Voice), `links`, `link_out_url`, `link_out_who_can_open`, `link_out_review_reason`, `details_waiting_for_review` (a title or description from before Nov 25, 2026 still waiting for a person; new words apply at once), `glass_tint_color`, `monthly_budget_cents` (`null`: no paid hosting), `purchase_label` (what the game page says it sells, see In-game purchases), `refund_policy` and `refund_policy_text` (`null` until it states one), `full_game_item_name` (`null`: free to play), `demo_game_slug` (`null`: no demo), `first_published_at` (when it first went live; it never moves), `big_update_at` (the last marked big update; `null`: none yet), `recently_updated_at` (where Browse's Recently updated places it) and `updated_at`.
|
|
677
|
+
A game looks like: `slug`, `page_url`, `can_change_slug`, `title`, `description`, `visibility`, `is_waiting_for_zaisma_lists` (a listed game from a new developer, waiting for real players and a few quiet days before Zaisma's own lists show it; its link plays meanwhile), `zaisma_lists_wait` (where a live waiting game stands, null when it isn't waiting or isn't live: `is_held_by_reports`, true when reports a person or triage upheld hold it, never who reported or what they wrote, and `progress`, null when only a report holds it: `live_duration_days` of `minimum_live_duration_days`, `counted_player_count` of `minimum_counted_player_count` and `quiet_duration_days` of `minimum_quiet_duration_days`, the same limits that open the lists every hour), `review_status`, `review_reason`, `erases_at`, `is_erase_now_allowed`, `country_blocks`, `devices`, `controls`, `genres`, `screen_orientation`, `play_modes`, `cloud_saves_enabled`, `account_offer_enabled`, `deleted_account_erase_enabled`, `friend_joins_enabled`, `performance_measuring_enabled`, `microphone_enabled`, `multiplayer_mode`, `room_browsing`, `account_requirement`, `minimum_player_age_years`, `game_server_allowed_hosts`, `own_server_urls`, `has_ticket_secret` (whether its own server has a ticket secret for voice, see Voice), `links`, `link_out_url`, `link_out_who_can_open`, `link_out_review_reason`, `details_waiting_for_review` (a title or description from before Nov 25, 2026 still waiting for a person; new words apply at once), `glass_tint_color`, `monthly_budget_cents` (`null`: no paid hosting), `purchase_label` (what the game page says it sells, see In-game purchases), `refund_policy` and `refund_policy_text` (`null` until it states one), `full_game_item_name` (`null`: free to play), `demo_game_slug` (`null`: no demo), `first_published_at` (when it first went live; it never moves), `big_update_at` (the last marked big update; `null`: none yet), `recently_updated_at` (where Browse's Recently updated places it) and `updated_at`.
|
|
677
678
|
|
|
678
679
|
- **visibility:** `draft`, `listed` (home page, search and search engines), `unlisted` (anyone with the link, never in lists or search engines) or `private`. Draft and private games open only through preview links and tester links (below), and on their own page for their developer, signed in. There a multiplayer game plays online while the page plays the live version; a newer version not yet published plays alone, and joining a room says so. A game is listed only with at least one gallery picture, sent or approved: `listed` without one answers `gallery_picture_needed`, and so does removing the last gallery picture of a listed game.
|
|
679
680
|
- **review_status** is ours and separate: `pending` (no version has passed review yet), `live`, `held` or `removed`, and `review_reason` says why it's held or removed (see Holds and takedowns). Changing visibility never undoes a takedown.
|
|
@@ -689,6 +690,7 @@ A game looks like: `slug`, `page_url`, `can_change_slug`, `title`, `description`
|
|
|
689
690
|
- **room_browsing:** for games on Zaisma rooms (`multiplayer_mode` other than `none`), where open rooms are listed so players can join them: `page` (the default) on the game page and to the game through `Zaisma.rooms.list()`, `game` only to the game (for games with their own lobby or server browser), or `off`. Room codes and invite links work either way, and the game can hide single rooms itself (see Multiplayer in the README). Whatever the setting, every game's page and the home say how many are playing now once it's 3 or more, for every game and not only multiplayer ones (no names); `GET /games/:slug` gives you the exact number. Rooms on your own servers aren't listed or counted.
|
|
690
691
|
- **friend_joins_enabled:** `true` (the default) lets Join on zaisma.com (a friend's face on /friends, "Alex is playing" on the game page, a profile's Playing now) and `Zaisma.friends.list()` take a player into the room their friend is in, for any game with rooms (Zaisma rooms, or its own servers through `Zaisma.friends.setRoom`). `false` grays Join as "This game doesn't take joins". One room turns it off instead, shown as "Private room": `Zaisma.joinRoom({ friendJoinsEnabled: false })` from the player who makes it, or `room.setFriendJoinsEnabled(false)` (the game server's, or the host's with the relay). It isn't a lock: a room's code or link still reaches it, so close the room (`setOpen(false)`) or answer `false` from `canJoin` to keep players out.
|
|
691
692
|
- **performance_measuring_enabled:** `true` (the default) has Zaisma measure how the game runs on players' devices, for `performance` in the stats (Play stats, below). `false` stops Zaisma adding its measuring script to the game's pages at all, and the stats answer `performance: null`.
|
|
693
|
+
- **microphone_enabled:** `false` (the default) means the game is never allowed the microphone. `true` lets it ask players for it, for voice chat in rooms (`room.voice`) or a game played by voice. Browsers keep a player's yes for zaisma.com, not for one game, so where the browser already keeps one from another game, the game page asks the player once for this game before it plays (on that device); Not now plays without the microphone.
|
|
692
694
|
- **account_requirement:** what the game needs a Zaisma account for. `none` (the default): guests play everything, and signed-in players play as their account. `multiplayer`: guests play alone; only signed-in players get player passes, so a guest's `Zaisma.player.getPass()` and `Zaisma.joinRoom()` fail with `error.code` `"account_needed"` (show your own message, or ask them to sign in without leaving the game with `Zaisma.player.signIn()`), and room links ask guests to sign in first. That's part of v1: a guest never gets a pass in such a game. `whole_game`: the game page says "Needs a Zaisma account" and Play asks guests to sign in first; only signed-in players get player passes. Passes are the backstop: Zaisma rooms also turn away guest passes given before the change, and your own servers can check a pass's `kind` claim for the same. Players under 13 can't make accounts, so they can't play games that need one.
|
|
693
695
|
- **minimum_player_age_years:** the youngest age that can play, even when the game's content suits everyone. `13` (the default): everyone, guests included as `account_requirement` allows. `16` or `18`: only accounts that old; younger accounts don't find the game on Zaisma (home, More games, friends' Playing now, profiles), and a link to it says "This game isn't open to your account." Only accounts have an age, so above 13 the game needs an account for the whole game: giving `16` or `18` alone sets `account_requirement` to `whole_game` too, and any other `account_requirement` while it's above 13 is refused with `accounts_needed_for_minimum_age` (set it back to `13` first; that leaves `account_requirement` as it is). Zaisma enforces it: Play, player passes, the relay and requests to your game server turn away younger accounts with `game_not_open_to_player`, and Zaisma rooms remove ones already playing when you raise it. Tester links follow it (testers then need an account); your own previews don't. Neither your game nor your own servers ever learn a player's age: a pass never carries it, and a younger account never gets one. Lifelike gore needs `16` or `18`: see "Allowed, even where other platforms ban it" under the content rules.
|
|
694
696
|
- **game_server_allowed_hosts:** the hosts the game's own game server can call with plain `fetch()` (game server reach): your own server, a payment provider, Discord, GitHub. Up to 20 host names, like `["discord.com", "api.github.com"]`, or `"*.example.com"` for every name under example.com (not example.com itself); `[]` (the default) for none, and the whole list each time. No `https://`, paths or ports: every call is https, never to an IP address, this computer or Zaisma's own domains. Live within a minute, with no approval by Zaisma, and kept in the game's history; players don't see it (the game page names only servers their browser connects to). Calls send up to 5 MB, get 10 seconds, aren't redirected (a redirect comes back to your code), and a game makes up to about 600 a minute in each place. A call to anything else throws an `OutsideCallError` in the game server, with a `code` (`not_https`, `unreachable_host`, `host_not_allowed`, `outside_call_limit`, `too_big`, `outside_call_timeout` or `outside_call_failed`) and a `fix`; the stats' `game_server_errors` show it. Raw sockets (`connect()` from `cloudflare:sockets`, `node:net` and `node:tls`) aren't offered: opening one throws. The game server reaches the game's database, receipts and rooms through `room` and `server` while a handler runs, and `env` from `cloudflare:workers` is empty. The tokens it needs go in its secrets (below).
|
|
@@ -958,7 +960,7 @@ Players talk to each other in a room with `room.voice`, through Cloudflare's med
|
|
|
958
960
|
|
|
959
961
|
- **Who hears whom:** each player chooses who hears them talk (Friends, My age band or Everyone, starting where their typed chat is, `who_hears_my_voice` on their pass) and whether they hear others (`voice_hearing_enabled`). A voice reaches the players that choice takes in, with no block either way and not muted by them. Guests and spectators have no voice (`room.canTalk` is `false`; a player who can't talk can still listen).
|
|
960
962
|
- **The witness rule, for voice:** anyone under 18 is heard, and hears adults, only while at least two independent players hear that voice too (the same independent players as chat's). In a duo, in proximity voice with one other player in range, or on a team of two, an under-18's voice goes quiet both ways, and the moment a witness leaves it's cut. No filter listens to voice: a report carries the last 30 seconds the reporter heard instead.
|
|
961
|
-
- **In the game:** `await room.voice.join()` (call it from a tap: browsers play sound only after one) asks for the microphone when the player can talk, and rejects with `microphone_refused`, `voice_not_allowed`, `voice_unavailable` or `hosting_paused`. `room.on("speaking", ({ playerId, isSpeaking }) => …)` says who's talking, this player included; `room.voice.speakerPlayerIds` (and the `voiceSpeakers` event) is whose voices reach this player now. `room.voice.setMicrophoneMuted(isMuted)` for a mute button or push-to-talk; `room.voice.leave()`, or leaving the room, ends it.
|
|
963
|
+
- **In the game:** `await room.voice.join()` (call it from a tap: browsers play sound only after one) asks for the microphone when the player can talk (the game needs `microphone_enabled` on), and rejects with `microphone_refused`, `voice_not_allowed`, `voice_unavailable` or `hosting_paused`. `room.on("speaking", ({ playerId, isSpeaking }) => …)` says who's talking, this player included; `room.voice.speakerPlayerIds` (and the `voiceSpeakers` event) is whose voices reach this player now. `room.voice.setMicrophoneMuted(isMuted)` for a mute button or push-to-talk; `room.voice.leave()`, or leaving the room, ends it.
|
|
962
964
|
- **Proximity and effects:** `room.voice.setSpeakerVolume(playerId, volumePct)` (0 to 100; at 0 the voice isn't sent at all, so nobody pays for it) and `room.voice.setSpeakerPan(playerId, panPct)` (-100 left to 100 right) place each voice; `room.voice.audioNodeOf(playerId)` hands you its sound to run through your own Web Audio nodes (a radio's crackle, a muffled wall) to `room.voice.outputNode`.
|
|
963
965
|
- **Echo:** voices play through `room.voice.outputNode`, which the browser's echo cancellation hears, so a player on speakers doesn't send the others' voices back. Route your game's own sound there too (made in `room.voice.audioContext`), or a phone's microphone picks it up.
|
|
964
966
|
- **Your game server's rules, the backstop:** `room.setVoiceGroup(playerId, groupName)` puts a player in a group (a team, a squad's radio: 1 to 40 characters, `null` for none), who then hears and is heard only within it; `room.setHeardSpeakers(listenerPlayerId, speakerPlayerIds)` limits whom a player hears (proximity: only those in range; `null` for everyone allowed); `room.setHeardSpeakerCount(count)` sets how many voices each player hears at once, 1 to 32 (16 unless you set it), the loudest past that. A changed game can't hear past these: Zaisma's room makes every connection itself.
|
|
@@ -1134,7 +1136,7 @@ A room answers a refusal with `{ type: "error", code, message }`, then closes th
|
|
|
1134
1136
|
| `chat_too_long` | `room.chat` over 2000 characters. |
|
|
1135
1137
|
| `chat_too_fast` | More than 20 chat messages in 10 seconds from one player. |
|
|
1136
1138
|
| `voice_not_here` | A voice message reached a room whose server doesn't take voice (your own server: voice goes through a ticket, see Voice). |
|
|
1137
|
-
| `microphone_refused` | The SDK's own: `room.voice.join` couldn't use the microphone (the player or the browser said no). |
|
|
1139
|
+
| `microphone_refused` | The SDK's own: `room.voice.join` couldn't use the microphone (the player or the browser said no, or the game's `microphone_enabled` is off). |
|
|
1138
1140
|
| `voice_not_allowed` | `room.voice.join` from a guest or a spectator. |
|
|
1139
1141
|
| `voice_unavailable` | Voice couldn't start or connect: try again. |
|
|
1140
1142
|
| `voice_ticket_required` | `room.voice.join` in a room on your own server without a ticket from that server. |
|
|
@@ -53,6 +53,7 @@ Every error the developer API and MCP answer with, as `{ "error": { code, messag
|
|
|
53
53
|
- `bad_deleted_account_erase_enabled` (HTTP 400): deleted_account_erase_enabled isn't true or false. Fix: Give deleted_account_erase_enabled as true or false. https://zaisma.com/developers/errors/bad_deleted_account_erase_enabled
|
|
54
54
|
- `bad_friend_joins_enabled` (HTTP 400): friend_joins_enabled isn't true or false. Fix: Give friend_joins_enabled as true or false. https://zaisma.com/developers/errors/bad_friend_joins_enabled
|
|
55
55
|
- `bad_performance_measuring_enabled` (HTTP 400): performance_measuring_enabled isn't true or false. Fix: Give performance_measuring_enabled as true or false. https://zaisma.com/developers/errors/bad_performance_measuring_enabled
|
|
56
|
+
- `bad_microphone_enabled` (HTTP 400): microphone_enabled isn't true or false. Fix: Give microphone_enabled as true or false. https://zaisma.com/developers/errors/bad_microphone_enabled
|
|
56
57
|
- `bad_room_browsing` (HTTP 400): room_browsing isn't page, game or off. Fix: Give room_browsing as page, game or off. https://zaisma.com/developers/errors/bad_room_browsing
|
|
57
58
|
- `bad_multiplayer_mode` (HTTP 400): multiplayer_mode isn't none, relay or own. Fix: Give multiplayer_mode as none, relay or own. https://zaisma.com/developers/errors/bad_multiplayer_mode
|
|
58
59
|
- `bad_account_requirement` (HTTP 400): account_requirement isn't none, multiplayer or whole_game. Fix: Give account_requirement as none, multiplayer or whole_game. https://zaisma.com/developers/errors/bad_account_requirement
|
|
@@ -558,7 +558,7 @@ A room answers a refusal with `{ type: "error", code, message }`, then closes th
|
|
|
558
558
|
| `chat_too_long` | `room.chat` over 2000 characters. |
|
|
559
559
|
| `chat_too_fast` | More than 20 chat messages in 10 seconds from one player. |
|
|
560
560
|
| `voice_not_here` | A voice message reached a room whose server doesn't take voice (your own server: voice goes through a ticket, see Voice). |
|
|
561
|
-
| `microphone_refused` | The SDK's own: `room.voice.join` couldn't use the microphone (the player or the browser said no). |
|
|
561
|
+
| `microphone_refused` | The SDK's own: `room.voice.join` couldn't use the microphone (the player or the browser said no, or the game's `microphone_enabled` is off). |
|
|
562
562
|
| `voice_not_allowed` | `room.voice.join` from a guest or a spectator. |
|
|
563
563
|
| `voice_unavailable` | Voice couldn't start or connect: try again. |
|
|
564
564
|
| `voice_ticket_required` | `room.voice.join` in a room on your own server without a ticket from that server. |
|
|
@@ -281,7 +281,7 @@ One name per concept. The API and MCP column is snake_case; the SDK and game ser
|
|
|
281
281
|
| Who reads what an account types, whether it reads others' chat, and the opaque group of its age band (never an age) | `who_reads_my_chat`: `friends`, `my_age_band`, `everyone` (the social setting, outside the presets, `defaultWhoReadsMyChat`), `chat_reading_enabled` (Zaisma's own code: `accounts.who_reads_my_chat`, `accounts.chat_reading_enabled`, `PRESET_SOCIAL_SETTINGS`) | player pass claims `who_reads_my_chat` (`WhoReadsMyChat`, or `nobody` while stopped), `chat_reading_enabled`, `chat_group_id` (a `chat_group_…` ID, different in every game), v1's `who_can_chat` (`WhoCanChat`: `nobody`, `friends`, `anyone`) as a stricter stand-in; checked with `canChat(first, second)`, first the sender and second the reader; inside, `ChatReach` (`nobody`, `friends`, `my_age_band`, `everyone`), `chatReachOf`, `isWithinChatReach`, `PlayerChatSettings` (`sending`, `reading`, `chatGroupId`, `networkSeal`) |
|
|
282
282
|
| A chat message: a line a player typed, sent with room.chat through the room to the players who may read it, after the game server's onChat and Zaisma's chat filter | `chat_messages` on a player report (`from_player_id`, the reported player's or `null`, `text`, `sent_at`); Zaisma's own code: `reports.reported_chat_json`, `ReportedChatMessage`, `REPORTED_CHAT_LIMITS` | `room.chat(text, { toPlayerIds })` answers `{ sentAt }` (`ChatSent`); the `chat` event's `ChatMessage`: `fromPlayerId`, `text`, `hasSwearing`, `hasSlur`, `sentAt`; game server `onChat(state, player, room, chatInfo)` with `ChatInfo` `{ text, toPlayerIds }`, answering a `ChatAnswer` (`true`, `false`, `{ toPlayerIds }`); option `adultChatFilterEnabled`; `CHAT_ROOM_LIMITS` (`maximumChatMessageCount`, `chatWindowDurationMs`); wire messages `chat`, `chat_sent`, `chat_stopped` with a `chatNumber`; error codes `chat_stopped` (with `reason`, `stopped_by_game` for onChat), `chat_not_allowed`, `chat_empty`, `chat_too_long`, `chat_too_fast`, `chat_not_here` |
|
|
283
283
|
| Anyone under 18 types only where two independent players read it: who counts, and a player's network for it (never shown to a game) | Zaisma's own code: `CHAT_WITNESS_LIMITS` (`minimumWitnessCount`, `minimumWitnessAccountAgeDays`, `minimumWitnessCountedDayCount`), `isEstablishedWitness`, `independentWitnessCount`, `WitnessReader`; a network is `v4:<address>` or `v6:<the /56>` (`networkOfAddress`, `networkOf`, `sealNetwork`, `openNetworkSeal`); the filter's answer in rooms adds `readerPlayerIds` and `isEveryReaderNeeded` | player pass claim `network_seal`; `deliverChat`'s `isEveryReaderNeeded` |
|
|
284
|
-
| Voice in a room: a player's voice going through Cloudflare's media server to the players who may hear it, by chat's rules; who hears whom is decided by Zaisma, never the game | `who_hears_my_voice` (`friends`, `my_age_band`, `everyone`, outside the presets, starting where `who_reads_my_chat` is), `voice_hearing_enabled`; `voice_size_bytes` and the meter share `voice`; Zaisma's own code: `VOICE_LIMITS`, `voicePulls`, `accounts.who_hears_my_voice`, `voice_sessions` | `room.voice` (`join`, `leave`, `setMicrophoneMuted`, `setSpeakerVolume(playerId, volumePct)`, `setSpeakerPan(playerId, panPct)`, `audioNodeOf`, `speakerPlayerIds`, `canTalk`), events `speaking` and `voiceSpeakers`; `room.canTalk`; `canVoiceChat(speaker, listener)`; errors `microphone_refused`, `voice_not_allowed`, `voice_unavailable`, `voice_not_here` |
|
|
284
|
+
| Voice in a room: a player's voice going through Cloudflare's media server to the players who may hear it, by chat's rules; who hears whom is decided by Zaisma, never the game | `who_hears_my_voice` (`friends`, `my_age_band`, `everyone`, outside the presets, starting where `who_reads_my_chat` is), `voice_hearing_enabled`; a game's `microphone_enabled` (off by default: only then may its frame use the microphone; `bad_microphone_enabled`); `voice_size_bytes` and the meter share `voice`; Zaisma's own code: `VOICE_LIMITS`, `voicePulls`, `accounts.who_hears_my_voice`, `voice_sessions` | `room.voice` (`join`, `leave`, `setMicrophoneMuted`, `setSpeakerVolume(playerId, volumePct)`, `setSpeakerPan(playerId, panPct)`, `audioNodeOf`, `speakerPlayerIds`, `canTalk`), events `speaking` and `voiceSpeakers`; `room.canTalk`; `canVoiceChat(speaker, listener)`; errors `microphone_refused`, `voice_not_allowed`, `voice_unavailable`, `voice_not_here` |
|
|
285
285
|
| A voice group: the players who hear one another only, like a team or a squad's radio; heard speakers: whom one player hears, for proximity; how many voices a player hears at once, the loudest past it | | `room.setVoiceGroup(playerId, groupName)`, `room.setHeardSpeakers(listenerPlayerId, speakerPlayerIds)`, `room.setHeardSpeakerCount(count)`, `VOICE_ROOM_LIMITS` |
|
|
286
286
|
| A voice channel: voice for players of a game on its own server, joined with a voice ticket the server signs with the game's ticket secret | `create_ticket_secret`, `ticket_secret`, `has_ticket_secret`; errors `voice_ticket_required`, `voice_ticket_refused`; Zaisma's own code: `games.sealed_ticket_secret` | `voiceTicket(playerPass, channelName, ticketSecret, voiceTicketOptions)`, `VoiceTicketClaims` (`ticket_kind` `voice`, `channel_name`, `voice_group_name`, `heard_speaker_ids`, `heard_speaker_count`), `room.voice.join({ ticket })`, `room.voice.updateTicket` |
|
|
287
287
|
| A report's voice clip: the last 30 seconds of voice the reporter heard, from their game; only Zaisma hears it | Zaisma's own code: `reports.reported_audio_key`, `reportAudioKey` | `voiceClipBase64` on a report a game sends |
|
package/skill/references/sdk.md
CHANGED
|
@@ -1741,7 +1741,8 @@ interface VoiceOptions {
|
|
|
1741
1741
|
interface RoomVoice {
|
|
1742
1742
|
/**
|
|
1743
1743
|
* Join the room's voice: asks for the microphone when the player can talk ({@link Room.canTalk}), else joins to
|
|
1744
|
-
* listen. Resolves once connected; rejects with microphone_refused (the player or browser said no
|
|
1744
|
+
* listen. Resolves once connected; rejects with microphone_refused (the player or browser said no, or the game's microphone_enabled
|
|
1745
|
+
* setting is off), voice_not_allowed
|
|
1745
1746
|
* (a guest or a spectator), voice_unavailable or hosting_paused. Call it from a tap or key press: browsers play
|
|
1746
1747
|
* sound only after one.
|
|
1747
1748
|
*/
|