RideKit
Docs/Reference/In-ride audio recording

In-ride audio recording

Status: built (2026-11-02). On by default for India, off in every other market until the operator turns it on. This page is for the operator who sells or runs the platform: what the feature does, what it stores, what you must declare to the app stores, and what you should confirm with a lawyer first.

It replaces the August 2026 design note that deferred the feature. That note's three objections — the driver must be told, the store declarations, and deletion as a duty — are each answered below, and its list of requirements is checked off at the end.


What riders and drivers see

  • Record trip audio sits on the trip screen in both apps (rider: tracking; driver: trip and journey screens) from the moment a driver is assigned until the trip ends. Either person can tap it.
  • A confirmation says the other person will be told, that the audio is encrypted, that the safety team listens only if a problem is reported, and how many days it is kept.
  • While recording: a red card with a running clock, "Your rider/driver has been told", and Stop. During an in-app call it reads "Paused during the call. Calls are never recorded" — the recording stops for the call and resumes after it.
  • The other person sees a notice on their trip screen ("Your driver is recording audio of this trip for safety") the moment it starts, over the live connection, and gets a push notification in their own language in case the app is in the background (a driver navigating in a maps app).
  • Recording stops by itself when the trip ends (completed, cancelled), after the market's maximum length (default 120 minutes), or when the person taps Stop. If the phone loses its live connection, it checks with the server once a minute and still stops at the drop-off.
  • The phone's microphone permission is asked only when the person first taps Record. Refusing it shows how to allow it in Settings; nothing is announced to the other person.

How it works

Piece Where
Market rules (on/off, retention, max length) backend/src/safety/ride-recording.ts
Start / stop / upload / the safety desk / the sweep backend/src/safety/ride-recordings.service.ts, ride-recordings.controller.ts
Storage tables migration 1700000109000-RideRecordings (ride_recordings, rides.rider_recording_since, rides.driver_recording_since)
Permission migration 1700000110000-RecordingListenPermission (recording.listen)
Phone engine (identical in both apps) mobile/{rider,driver}/src/lib/trip-recording.ts
Phone UI (identical in both apps) mobile/{rider,driver}/src/components/TripRecording.tsx
Safety desk player admin/src/components/trip/TripRecordings.tsx (trip detail page)
Market setting Admin → Markets → (country) → KYC tab → Trip audio recording

Recording. Mono AAC at 32 kbit/s (about 240 KB a minute), uploaded in pieces of three minutes, so a phone that dies mid-trip loses at most the last few minutes. A phone without signal keeps its pieces and keeps retrying for up to 30 minutes; the server accepts the last pieces for 30 minutes after the trip ends. A piece the server refuses is dropped and the app says "Part of the recording couldn't be sent."

Upload checks. Only the rider or driver of that ride; only while it is live (or just ended); at most 8 MB per piece and 240 pieces per person per ride; the bytes must be an MPEG-4 audio file (checked from the content, never the file name); a session belongs to the person who started it; a retried piece is stored once.

Encryption. Every piece is sealed with its own random AES-256-GCM key before it reaches storage (local disk or S3/R2). Only that key — itself encrypted with the server's secret key (APP_SECRET_KEY, or the JWT secret when unset) — is kept in the database. A copy of the bucket alone is unreadable. Objects are always private.

Listening. Only staff holding recording.listen see the Trip audio card on a trip and can play it. This is deliberately separate from incident.view / incident.manage: working the safety queue does not by itself let someone hear riders' and drivers' conversations. Only super_admin has it after install; grant it on the Roles page to the people who investigate complaints. Every playback writes an audit row (ride.recording.play) with who, which piece and when — refused attempts included. The audio is decrypted on request and played from memory in the browser: no download link, nothing cached (Cache-Control: no-store).

Retention. Each piece is stamped with its expiry when it is uploaded (the market's retentionDays, default 7), so later changes to the setting do not move existing deadlines. An hourly job erases expired pieces — the stored object and its row. A piece is held past its expiry while any safety case (incident) on that ride is open, and for retentionDays after the case is resolved; the safety desk shows "Held by a safety case". If deleting the stored object fails, the row (and with it the only copy of the key) is erased anyway: what remains in storage can no longer be decrypted.

Market settings

config.rideRecording on the market, edited in Admin → Markets:

Field Default Range
enabled India, Mexico, Brazil and the US true; everywhere else false
retentionDays 7 1–90
maxMinutes 120 10–480
consentModel one_party one_party or all_party
allPartyRegions US: CA, CT, DE, FL, IL, MD, MA, MI, MT, NV, NH, OR, PA, WA; elsewhere none region codes from Zones

Built: 2026-11-04.

In some places everyone in a conversation must agree before it is recorded. Telling the other person is not enough there. These include several US states, such as California, Florida, Illinois, Washington and Pennsylvania. On a ride whose pickup is in one of these places, the flow is:

  1. Asking. One person presses Record. The confirmation tells them the other person will be asked first. The other person sees "Your rider asks to record this trip" on their trip screen, with Allow and Decline. They also get a push notification, in their own language, in case the app is closed. The microphone is not opened while the question is waiting.
  2. The answer.
    • Allow: the recording starts by itself on the phone of the person who asked. From here it works as described above.
    • Decline: the person who asked sees "Your driver declined recording on this trip." They cannot ask again on that ride.
    • No answer: after two minutes the question lapses and may be asked again.
  3. Enforced by the server. In these places, the server turns away any audio sent without an Allow, before it is stored.
  4. Kept as evidence. Every request and answer is stored in ride_recording_consents, with who asked whom and when. The safety desk sees them on the trip page (Trip audio → Consent to record, permission recording.listen), even when nothing was recorded.

Who must agree is decided per ride:

  • If consentModel is all_party, every ride needs everyone's agreement.
  • Otherwise, a ride needs it only when its pickup is in a Zones region whose code is listed in allPartyRegions.
  • For the US, name your regions by state (CA, FL …) so the default list applies. Edit it in Admin → Markets → (country) → KYC → Trip audio recording.
Piece Where
Rules ride-recording.ts: consentNeeded, consentStatus, US_ALL_PARTY_STATES
Service ride-recordings.service.ts: askConsent, answerConsent, assertConsent, consentsForRide
Routes POST /rides/:id/recording/consent {allow}; GET /admin/rides/:id/recording-consents
Table migration 1700000199000-RecordingConsent
Socket ride:recording_consent { rideId, consentId, by, status }
Push recording_consent_by_rider, recording_consent_by_driver
Apps trip-recording.ts (answerConsent, the consent states); TripRecording.tsx (rec-consent-ask, rec-consent-allow, rec-consent-decline, rec-consent-waiting, rec-consent-declined)

Confirm with local counsel. These defaults are researched, not legal advice.

  • India records with one party's consent and the other told; the default is on. The recording is personal data under the DPDP Act: the in-app privacy notice lists "Trip audio you choose to record" under the Safety purpose (notice version 2026-11.2), and the 7-day retention is the "erase once the purpose is served" duty in practice.
  • All-party-consent places (several US states including California, Florida, Illinois, Washington and Pennsylvania; parts of Canada and Europe depending on context): telling the other person is not the same as their consent. List these places in allPartyRegions, or set consentModel to all_party, so the other person is asked first (see All-party consent above). The state list is the commonly cited one: Michigan, Oregon and Nevada are argued. Confirm it with counsel.
  • Put the feature in your privacy policy: what is recorded, who can listen, how long it is kept, and how someone asks for a copy or its deletion.

Store declarations (every app build, even if a market has it off)

The driver app also records video (the dashcam) where a market allows it. Its camera declarations are in in-trip-video.md.

Google Play — Data safety (rider and driver app): Audio → Voice or sound recordings: collected, not shared, optional, purpose App functionality (safety), encrypted in transit, deletable on request.

Google Play — Foreground service permissions (rider and driver app): declare FOREGROUND_SERVICE_MICROPHONE with the use case "a trip recording the user started keeps running while the phone is locked or another app is in front"; the video should show tapping Record, the confirmation, the running notification, and Stop.

Apple — App Privacy (both apps): Audio Data: collected, linked to the user, not used for tracking, purpose App Functionality. The microphone purpose text in app.config.ts already names both uses: "…during in-app calls with your driver, and to record trip audio when you turn it on for your safety. Calls are never recorded; trip recordings are encrypted and deleted after a few days." The audio background mode is declared for calls and recording.

Testing notes

Verified on a physical iPhone 11 (rider: permission prompt, recording with real speech, upload, the driver told on Android, automatic stop and last-piece upload when the trip completed), on the Android emulator (driver: permission refused and allowed, recording, the three-minute piece, stop, trip-end stop, the stale-state recovery after a restart), in Chrome (admin player, the permission split, playback audit), and against the live API (every refusal above). The iOS simulator on a Mac without a microphone cannot record at all ("Failed to prepare recorder"); the app handles that by announcing nothing. Push notifications need real devices with push credentials and are covered by unit tests only.

Against the August 2026 requirements

Requirement Done
Table with expiry written at upload yes (expires_at)
Consent from both parties told + push; all-party decline flow not built (off by default where needed; US plan)
Encryption with a key the app never holds yes (envelope, per piece)
Upload never buffers a whole recording pieces of ≤ 8 MB, never a whole trip
Retention job, holds for disputes yes (hourly, held by open/recent cases); a failed object delete is made unreadable rather than retried
Separate listen permission yes (recording.listen)
Audit on every access yes (ride.recording.play, including refusals)
Visible indicator, one-tap stop, auto-stop at trip end yes
Driver told yes (both directions)
Market config, off by default yes, except India (on)
Operator documentation this page
source: docs/safety-audio-recording.md (ships identically in the product zip)