daef7ea190
Helper functions (matrix-mas capability group): - mas_client_register_bash_infra: register/sync OAuth clients via mas-cli - mas_syn2mas_migration_bash_infra: dry-run + apply user migration to MAS - synapse_msc3861_enable_go_infra: edit homeserver.yaml MSC3861 block (with diff) - wellknown_oidc_patch_go_infra: patch well-known JSON with msc2965.authentication - synapse_login_flows_check_go_infra: health-check post-migration login flows Flows + issues for custom Matrix clients (PC + Android): - 0010 matrix-client-pc: Wails + React+Mantine (issues 0147-0153) - 0011 matrix-client-android: Kotlin + Compose (issues 0154-0161) - 0162 enable MAS as auth provider (Synapse delegate) — EXECUTED on VPS - 0163 custom admin panel propio (sustituye synapse-admin) Production state (organic-machine.com): - Synapse migrated SQLite -> Postgres - MSC3861 active, password_config disabled - 21 users + 41 access_tokens migrated via syn2mas - 4 MAS clients registered (element, matrix_pc, matrix_android, admin_panel) - synapse-admin container removed + Coolify route deleted - well-known patched with org.matrix.msc2965.authentication Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3.5 KiB
3.5 KiB
id, title, status, priority, created, related_flows, related_issues, dependencies, tags
| id | title | status | priority | created | related_flows | related_issues | dependencies | tags | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0158 | matrix-client-android calls LiveKit nativo: mic/cam/screen + PiP | pending | high | 2026-05-24 |
|
|
|
|
Objetivo
Llamadas nativas via io.livekit:livekit-android SDK oficial. Codecs HW (H.264/VP9 hardware decoder), audio focus + AEC/NS nativos, MediaSession para controls en lockscreen, Picture-in-Picture mode Android nativo. Soporta 1:1 + grupales (limite 16 del LiveKit config actual).
Tareas
- Backend (compartido con cliente PC):
- Reusar
livekit_token_gen_go_infraque esta en flow 0010. - Cliente Android pide token al mismo endpoint
/api/call/tokenque el cliente PC.
- Reusar
- ViewModel:
CallViewModel(matrixClient, roomId):joinCall()— pide token + conectaRoom.connect().toggleMic(),toggleCamera(),toggleScreenShare().hangup().Flow<CallState>con participants, tracks, connection state.
- Compose:
CallScreenfullscreen:- Grid tiles participantes (
Flowlayout responsive 1/2/4/9/16). - Tile principal: active speaker (track audio level del SDK).
- Controles bottom: mic, cam, screen, raise hand, hangup.
- Grid tiles participantes (
IncomingCallScreenfullscreen con accept/decline (system overlay activity).CallTilecomposable conVideoView(SurfaceViewRenderer del SDK).
- PiP (Picture-in-Picture):
ActivityconsetPictureInPictureParams().- Auto-enter PiP al minimizar la app durante call.
- PiP tile: video remoto + boton hangup.
- Audio routing:
AudioFocusRequest(Android 8+) — focus exclusivo durante call.- Switch speaker/earpiece/bluetooth via
AudioManager.setSpeakerphoneOn()+ connection state listeners para audifonos BT. - Echo cancellation + noise suppression: SDK los habilita por defecto, verificar.
- ICE/TURN: igual que cliente PC, depende del LiveKit config server-side.
- Tests:
- Instrumented
Call1to1Testcon emulator + segundo cliente (PC) — connect, video, hangup. - Manual
ScreenShareTestcon device fisico. - Manual
4ParticipantsTest. - Manual
PiPTest— call activa + Home button -> PiP aparece.
- Instrumented
Funciones del registry a crear
livekit_call_kotlin_infra— wrapperRoomSDK + permission helpers.audio_routing_kotlin_infra— speaker/earpiece/BT switching.CallScreen_kotlin_ui— fullscreen call UI.CallTile_kotlin_ui— tile con VideoView.IncomingCallScreen_kotlin_ui— accept/decline overlay activity.
Acceptance
- Start call desde Android -> PC Wails recibe y conecta.
- 30s call con video+audio nativo (verificar HW codec via
adb shell dumpsys media.codec). - Mute mic + apagar cam refleja en otro cliente.
- Screen share desde Android (con
MediaProjection) visible en PC. - PiP: minimizar app durante call -> tile flotante con video remoto.
- Bluetooth headphones: cambio automatico al conectar/desconectar.
- Battery: call 30min con AC + WiFi <15% drain.
Notas
- Permissions runtime:
RECORD_AUDIO,CAMERA,POST_NOTIFICATIONS(Android 13+),FOREGROUND_SERVICE,FOREGROUND_SERVICE_MEDIA_PROJECTION(Android 14+). - Foreground service requerido para mantener call con app en background (issue 0161).
- E2EE en call (insertable streams): TBD post-DoD, igual que en cliente PC.
- Connection service Android (sistema): TBD, opcional. Permite integracion con dialer system + Bluetooth Car. Valorar coste/beneficio.