diff --git a/app/src/main/java/com/bitchat/android/protocol/BinaryProtocol.kt b/app/src/main/java/com/bitchat/android/protocol/BinaryProtocol.kt index c546653f6..e22fdf392 100644 --- a/app/src/main/java/com/bitchat/android/protocol/BinaryProtocol.kt +++ b/app/src/main/java/com/bitchat/android/protocol/BinaryProtocol.kt @@ -20,7 +20,7 @@ enum class MessageType(val value: UByte) { REQUEST_SYNC(0x21u), // GCS-based sync request FILE_TRANSFER(0x22u), // New: File transfer packet (BLE voice notes, etc.) VOICE_FRAME(0x29u), // Ephemeral live push-to-talk frame; never added to gossip sync - VIDEO_FRAME(0x2Au); // Ephemeral live video packet; never added to gossip sync + VIDEO_FRAME(0x2Du); // Ephemeral live video packet; never added to gossip sync companion object { fun fromValue(value: UByte): MessageType? { diff --git a/docs/LIVE_VIDEO_V1.md b/docs/LIVE_VIDEO_V1.md index f6a551675..0445eae88 100644 --- a/docs/LIVE_VIDEO_V1.md +++ b/docs/LIVE_VIDEO_V1.md @@ -33,10 +33,13 @@ All multi-byte integers use network byte order (big-endian). | Layer | Name | Value | Purpose | | --- | --- | --- | --- | -| Outer mesh packet | `MessageType.VIDEO_FRAME` | `0x2A` | Signed public-mesh live video packet | +| Outer mesh packet | `MessageType.VIDEO_FRAME` | `0x2D` | Signed public-mesh live video packet | | Noise inner payload | `NoisePayloadType.VIDEO_FRAME` | `0x0A` | Encrypted direct-message live video packet | | Outer private packet | `MessageType.NOISE_ENCRYPTED` | `0x11` | Existing recipient-directed Noise envelope | +Outer types `0x2A` and `0x2B` are reserved for courier spray ack and decline, +so live video does not use them. + Receivers cap the decoded `VIDEO_FRAME` payload at 4 KiB, the same control ceiling as `VOICE_FRAME` (see [PACKET_PAYLOAD_LIMITS.md](PACKET_PAYLOAD_LIMITS.md)). Clients that do not know these values ignore them. diff --git a/docs/PACKET_PAYLOAD_LIMITS.md b/docs/PACKET_PAYLOAD_LIMITS.md index 3d3781fa2..96655af16 100644 --- a/docs/PACKET_PAYLOAD_LIMITS.md +++ b/docs/PACKET_PAYLOAD_LIMITS.md @@ -40,7 +40,7 @@ produces for the type. Only media-carrying types keep the framed-file ceiling. | courier envelope, Nostr carrier | `0x04`, `0x28` | 64 KiB | | `REQUEST_SYNC` | `0x21` | 8 KiB | | `FRAGMENT` | `0x20` | 1,280 B | -| `ANNOUNCE`, `LEAVE`, `NOISE_HANDSHAKE`, `VOICE_FRAME`, `VIDEO_FRAME`, board post, prekey bundle, ping, pong | `0x01`, `0x03`, `0x10`, `0x29`, `0x2A`, `0x23`, `0x24`, `0x26`, `0x27` | 4 KiB | +| `ANNOUNCE`, `LEAVE`, `NOISE_HANDSHAKE`, `VOICE_FRAME`, `VIDEO_FRAME`, board post, prekey bundle, ping, pong | `0x01`, `0x03`, `0x10`, `0x29`, `0x2D`, `0x23`, `0x24`, `0x26`, `0x27` | 4 KiB | | Any other value | | 128 KiB (a v1 frame stays relayable) | Types marked by name only (group message, courier envelope, Nostr carrier,