Alaznah

Stable @alaznah/calling 0.1.0 — breaking display names, PiP, and background calling.

What's new

Current release: @alaznah/calling@0.1.0 (stable). Protocol: @alaznah/protocol@0.1.1.

bash
npm install @alaznah/calling@0.1.0

This is the first non-beta SDK. It replaces 0.1.0-beta.2 on the npm latest tag.

Breaking API (display names)

API0.1.0-beta.20.1.0
config.displayNameOptionalRequiredCallingProvider throws if empty
startCall({ calleeDisplayName })OptionalRequired — throws if empty
Missing peer name in UIOften showed raw userIdDefault UI shows Unknown caller, never the raw id
tsx
<CallingProvider
  config={{
    userId: currentUser.id,
    displayName: currentUser.name, // required
    getAuthToken: fetchCallingToken,
  }}
>
ts
await client.startCall({
  calleeId: peer.id,
  calleeDisplayName: peer.name, // required
  mediaType: 'video',
});

Native incoming (CallKit / Android full-screen) uses callerDisplayName from the invite — that string is config.displayName of the caller.

Picture-in-Picture

Connected video calls:

  • Android Home — host MainActivity system PiP (manifest merged; no Kotlin for standard RN)
  • Android Minimize — companion AlaznahPipActivity + TextureView overlay
  • iOS Home / Minimize — one AVKit controller on the remote RTCView
  • Voice — in-app floating bubble (also the iOS Simulator path)

You must apply the react-native-webrtc patch shipped in node_modules/@alaznah/calling/patches/ (patch-package postinstall). Guide: Picture in Picture · Native Modules.

Remote camera off shows an avatar in the PiP window (remoteVideoEnabled + optional participants[].avatarUrl).

Native incoming & background

ChangeWhy it matters
CallMessagingReceiver merged; default RN Firebase receiver removed for call payloadsKill-state invite/cancel is handled natively first
ActiveCallKeepAliveService / incoming FGS types include microphone, camera, mediaPlaybackPiP + background audio survive Android 14 FGS rules
CallingProvider always connect() + syncPendingCalls() on foregroundFixes wake-Accept stuck on ringing
Signaling reconnectFresh() when the socket is a zombie after DozeMid-call WS recovery without reload
Server reconnect grace 120s; heartbeat timeout 90sPiP / throttled JS timers no longer drop live calls as fast

Kill-state ring is still push + CallKit / full-screen — Background Calling. Force-kill still ends media; PiP is not kill-state.

Media & UI

Field / behaviorUse
ActiveCall.remoteVideoEnabledRemote camera intent; hide last frame, show avatar
ActiveCall.remoteMutedPeer mic mute from call.mute
CallParticipant.avatarUrlOptional image when video is off / PiP placeholder
torchOn / torchAvailableFlash; setTorch
Release buildsrn-webrtc:pc:DEBUG spam is silenced (__DEV__ still verbose)

Host native extras

  • Expo plugin now also injects FOREGROUND_SERVICE_MEDIA_PLAYBACK and FOREGROUND_SERVICE_PHONE_CALL
  • AAR ships consumer-rules.pro (keep WebRTC / PiP reflection) — release minify should pick this up
  • androidx.activity:activity-ktx for PiP mode listener (no host Activity subclass)

Full checklist: Native Modules.