Chert
Back to Writing

How iMoggle uses two FaceTime cameras for one game

Chert TeamProduct and engineering
Diagram of iMoggle’s two call flows. Two cameras feed a shared stage and a privately saved edit. In solo play, one camera feeds the game, and a voice request sends a clip via iMessage.
The two-player test saved its clip privately. The solo demo sends an edit to Messages on request.

In a solo iMoggle call, a mesh appears over the caller’s camera feed. A drumroll plays, and a score lands on the beat. The caller can ask to play again or say “send the edit” to get a clip in Messages.

We then tried to add a second player. Each person would get their own panel, both would see the same countdown, and the game would record a combined clip. The caller-facing idea was simple. Getting a usable picture into each panel took more work.

Two camera tiles and no frames

Chert routes the call through LiveKit. In iMoggle, a browser reads the incoming camera tracks and sends its canvas and game audio back to FaceTime. For two players, the stage needs one camera track for each person so it can measure the two faces independently and keep the same player in each panel.

In early testing, FaceTime had already drawn both participants’ tiles, but the bridge read both as invisible. The fix was to accept a tile only when it could be matched unambiguously to a visible region. Track startup then ran into a second problem. Publication waited for the camera dimensions, and the first frame that would supply those dimensions was being held until publication finished. We passed the first real frame to LiveKit before waiting for the track to publish.

What the two-phone call showed

On November 28, both feeds appeared in the stage during a supervised FaceTime call. LiveKit reported two distinct 640 × 360 tracks. The players finished a shared scan, and iMoggle saved the result and the combined edit. The score is a game mechanic based on facial geometry, with no validated meaning as a measure of attractiveness.

In the solo demo, asking for the edit triggers a separate delivery step. iMoggle packages the beat-cut clip as an iMessage video and can send an expiring private link if the attachment can’t be delivered. The two-phone test ended with a single edit saved privately for the round.

Related guides

Build your first conversation.

Choose a plan, connect your agent, and test the complete flow.

Start building