@extends('layouts.app') @section('title', 'Live Room') @section('content') @php $isLive = $video->status === 'live'; $isEnded = $video->status === 'ended'; $statusTone = $isLive ? 'danger' : ($isEnded ? 'neutral' : 'warning'); $statusLabel = $isLive ? 'Live now' : ucfirst($video->status); @endphp

{{ $video->title }}

{{ $class->name ?? 'Class' }} · {{ $subject->name ?? 'General' }} · {{ $teacher?->full_name ?? 'Teacher not assigned' }}
Back to classes @if($isLive) @if($canManage)
@csrf
@else Join room @endif @elseif($canManage)
@csrf
@endif

Room {{ $video->room_code }}

Scheduled {{ \Carbon\Carbon::parse($video->scheduled_at)->format('d M Y \a\t H:i') }} · {{ $video->duration }} minutes
@if($isLive)
Detecting webcam…
@endif
@if($isLive)
LIVE

{{ $video->title }}

{{ $video->description ?: 'The host has started this session.' }}

Started {{ $video->started_at?->format('H:i') }} · 00:00:00 elapsed
@if($canManage)
@csrf
@endif
@else

{{ $video->title }}

{{ $video->description ?: 'The live stream will appear here when the host starts the session.' }}

@if($isEnded)
Session ended {{ $video->ended_at?->format('d M Y H:i') }}
@endif
@if($canManage)
@csrf
@else Waiting for the host to start @endif
@endif
Expected learners
{{ num($students) }}
Duration
{{ $video->duration }} min
Room code
{{ $video->room_code }}

Participants

{{ num($students) }} learners expected
{{ $teacher?->full_name ?? 'Teacher not assigned' }}
Host
{{ $isLive ? 'Online' : 'Waiting' }}
@if($isLive)

Session in progress

{{ $class->name ?? 'The class' }} learners can join now using room code {{ $video->room_code }}.

@else

Waiting for learners

{{ $class->name ?? 'The class' }} will join with the room code above.

@endif

Session notes

@csrf
@endsection @push('scripts') @if($isLive) @endif @endpush