Files
ac-ms-sfu-signaling/public/health.php
Anton Afanasyeu 0658e26ae4 sfu-signaling: real Janus signaling service implementation
- JanusClient.php: HTTP REST client for Janus Gateway API
- SfuRoomRepository.php: room + participant + stats persistence
- bootstrap.php: PDO, auth, Janus client factory
- public/index.php: front-controller routing
- public/health.php: Janus online check
- public/api/rooms.php: list/create/destroy rooms
- public/api/join.php: SDP offer relay → Janus VideoRoom
- public/api/stats.php: bitrate/packet-loss analytics ingest
- public/dashboard.php: SFU rooms UI (common BE dark-theme styles)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 22:27:59 +02:00

23 lines
863 B
PHP

<?php
declare(strict_types=1);
require_once dirname(__DIR__) . '/src/bootstrap.php';
header('Content-Type: application/json; charset=utf-8');
$janus = janusClient();
$info = $janus->info();
$online = isset($info['janus']) && $info['janus'] === 'server_info';
echo json_encode([
'ok' => true,
'sfu' => [
'enabled' => true,
'status' => $online ? 'online' : 'unreachable',
'janus_version' => $info['version_string'] ?? null,
'janus_url' => sfuConfig('janus_url', 'http://10.7.16.237:8088/janus'),
'signaling_url' => sfuConfig('signaling_url', 'wss://apps.f0xx.org/app/androidcast_project/sfu/ws'),
'ws_url' => '/app/androidcast_project/sfu/ws',
'api_base' => '/app/androidcast_project/sfu/api',
],
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);