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.
npm install @alaznah/calling@0.1.0This is the first non-beta SDK. It replaces 0.1.0-beta.2 on the npm latest tag.
Breaking API (display names)
| API | 0.1.0-beta.2 | 0.1.0 |
|---|---|---|
config.displayName | Optional | Required — CallingProvider throws if empty |
startCall({ calleeDisplayName }) | Optional | Required — throws if empty |
| Missing peer name in UI | Often showed raw userId | Default UI shows Unknown caller, never the raw id |
<CallingProvider
config={{
userId: currentUser.id,
displayName: currentUser.name, // required
getAuthToken: fetchCallingToken,
}}
>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
MainActivitysystem 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
| Change | Why it matters |
|---|---|
CallMessagingReceiver merged; default RN Firebase receiver removed for call payloads | Kill-state invite/cancel is handled natively first |
ActiveCallKeepAliveService / incoming FGS types include microphone, camera, mediaPlayback | PiP + background audio survive Android 14 FGS rules |
CallingProvider always connect() + syncPendingCalls() on foreground | Fixes wake-Accept stuck on ringing |
Signaling reconnectFresh() when the socket is a zombie after Doze | Mid-call WS recovery without reload |
| Server reconnect grace 120s; heartbeat timeout 90s | PiP / 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 / behavior | Use |
|---|---|
ActiveCall.remoteVideoEnabled | Remote camera intent; hide last frame, show avatar |
ActiveCall.remoteMuted | Peer mic mute from call.mute |
CallParticipant.avatarUrl | Optional image when video is off / PiP placeholder |
torchOn / torchAvailable | Flash; setTorch |
| Release builds | rn-webrtc:pc:DEBUG spam is silenced (__DEV__ still verbose) |
Host native extras
- Expo plugin now also injects
FOREGROUND_SERVICE_MEDIA_PLAYBACKandFOREGROUND_SERVICE_PHONE_CALL - AAR ships
consumer-rules.pro(keep WebRTC / PiP reflection) — release minify should pick this up androidx.activity:activity-ktxfor PiP mode listener (no host Activity subclass)
Full checklist: Native Modules.