Skip to content

Live video preview

Purpose

Show how the phone requests synchronized video + audio streams from the glasses and renders NV21 previews locally.

Entry points

Phone home:

  • MainPhoneActivityVideoReceiveActivity

Sample screen:

  • com.rokid.phone.VideoReceiveActivity

Platform

  • Phone

Main file

Flow

  1. User configures FPS + bitrate guard rails.
  2. requestVideoStream() primes the outbound lane.
  3. requestAudioStream() parallels audio.
  4. IMessageListener.onNv21Data() feeds NV21 frames into GLSurfaceView.
  5. onClassicBTAudioStream() hands PCM-ish buffers to playback helpers.

SDK capabilities exercised

  • Start/stop video pull
  • Start/stop audio pull
  • Live NV21 callback plumbing

FAQ

Good for what?

Live preview QA, bitrate sweeps, and transport smoke tests—not finished recording UX.

What format arrives?

RAW NV21 planes rendered client-side—not a packaged .mp4 download.

Caveats

  • FPS clamps 5–30; bitrate clamps 500k–10Mbps.
  • Activity pauses aggressively stop streaming when leaving foreground.