1
0
mirror of git://f0xx.org/ac/ac-be-issues synced 2026-07-29 03:38:19 +03:00
Files
ac-be-issues/views/live_education.php
2026-07-12 13:53:36 +02:00

65 lines
3.0 KiB
PHP

<?php
declare(strict_types=1);
$bp = Auth::basePath();
$projectBase = Auth::projectBasePath();
$issuesBase = rtrim((string) cfg('links.crashes', $projectBase . '/issues'), '/');
$navUser = trim((string) (Auth::user()['username'] ?? ''));
?>
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Education demo — <?= h(cfg('app_name')) ?></title>
<script>
(function () {
var t = localStorage.getItem('crash_console_theme');
if (t === 'light' || t === 'dark') document.documentElement.setAttribute('data-theme', t);
var l = localStorage.getItem('crash_console_lang');
if (l === 'en' || l === 'ru') document.documentElement.setAttribute('lang', l);
})();
</script>
<link rel="stylesheet" href="<?= h($bp) ?>/assets/css/app.css">
<script src="<?= h($bp) ?>/assets/js/nav_shell.js" defer></script>
<script src="<?= h($bp) ?>/assets/js/i18n.js" defer></script>
<script src="<?= h($bp) ?>/assets/js/cookie_consent.js" defer></script>
<?php AnalyticsHead::render('live_education'); ?>
<script src="<?= h($bp) ?>/assets/js/live_cast_webrtc.js" defer></script>
<script src="<?= h($bp) ?>/assets/js/live_education.js" defer></script>
</head>
<body class="live-page" data-base-path="<?= h($bp) ?>" data-view="live_education">
<div class="shell">
<?php platform_render_nav_shell([
'project_base' => $projectBase,
'issues_base' => $issuesBase,
'active' => 'education',
'username' => $navUser,
]); ?>
<main class="main-pane" id="live-education-app">
<section class="card card--lift live-card">
<header class="live-header">
<span class="tag-pill">Education demo</span>
</header>
<h1>Try screen sharing in your browser</h1>
<p class="muted">Free demo up to 5 minutes. No install required — great for first-time visitors.</p>
<p id="edu-status" class="reports-status muted" aria-live="polite">Ready when you are.</p>
<p class="live-timer-label">Time left: <strong id="edu-timer">5:00</strong></p>
<video id="edu-preview" class="live-preview" playsinline muted autoplay hidden></video>
<div id="edu-share" class="live-share card card--lift" hidden></div>
<pre id="edu-stats" class="live-stats-nerds" hidden aria-live="polite"></pre>
<div class="live-actions">
<button type="button" class="btn btn--primary" id="edu-start">Start screen share</button>
<button type="button" class="btn" id="edu-stop">Stop</button>
<button type="button" class="btn btn--ghost" id="edu-notify">Enable notifications</button>
</div>
<p class="muted graphs-footnote">
WebRTC P2P (no SFU): share the viewer link or QR. Same REST signaling API supports future mobile cast to browser on LAN.
</p>
</section>
</main>
</div>
<?php require __DIR__ . '/partials/cookie_consent.php'; ?>
<?php platform_render_footer(); ?>
</body>
</html>