Add Conferences and audio-only Rooms, plus mobile schedule icon.
Deploy Ladill Meet / deploy (push) Successful in 1m29s
Deploy Ladill Meet / deploy (push) Successful in 1m29s
Split town_hall into a Conferences sidebar flow and Spaces-style Rooms with host/speaker/listener roles; enforce audio-only LiveKit UI for rooms; show schedule icon on mobile meetings index. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -262,8 +262,11 @@ class SessionService
|
||||
$isHost = $participant->isHost();
|
||||
$breakoutService = app(BreakoutService::class);
|
||||
$webinarService = app(WebinarService::class);
|
||||
$spaceService = app(\App\Services\Meet\SpaceService::class);
|
||||
$mediaRoom = $breakoutService->mediaRoomForParticipant($participant);
|
||||
$canPublish = $webinarService->canPublish($room, $participant) && $participant->canPublishMedia();
|
||||
$canPublish = ($room->isSpace()
|
||||
? $spaceService->canPublish($room, $participant)
|
||||
: $webinarService->canPublish($room, $participant)) && $participant->canPublishMedia();
|
||||
|
||||
return $this->media->generateToken(
|
||||
$mediaRoom,
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Meet;
|
||||
|
||||
use App\Models\Participant;
|
||||
use App\Models\Room;
|
||||
use App\Models\User;
|
||||
|
||||
class SpaceService
|
||||
{
|
||||
/**
|
||||
* Resolve participant role for a Spaces-style room join.
|
||||
*/
|
||||
public function resolveJoinRole(Room $room, ?User $user, string $fallbackRole = 'guest'): string
|
||||
{
|
||||
if ($room->type !== 'space') {
|
||||
return $fallbackRole;
|
||||
}
|
||||
|
||||
if ($user && $user->ownerRef() === $room->host_user_ref) {
|
||||
return 'host';
|
||||
}
|
||||
|
||||
$speakerRefs = (array) $room->setting('speaker_refs', []);
|
||||
|
||||
if ($user && in_array($user->ownerRef(), $speakerRefs, true)) {
|
||||
return 'panelist';
|
||||
}
|
||||
|
||||
return 'attendee';
|
||||
}
|
||||
|
||||
public function canPublish(Room $room, Participant $participant): bool
|
||||
{
|
||||
if ($room->type !== 'space') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return in_array($participant->role, ['host', 'co_host', 'panelist'], true);
|
||||
}
|
||||
|
||||
public function isListener(Room $room, Participant $participant): bool
|
||||
{
|
||||
return $room->type === 'space' && $participant->role === 'attendee';
|
||||
}
|
||||
|
||||
public function isAudioOnly(Room $room): bool
|
||||
{
|
||||
return $room->isSpace() || (bool) $room->setting('audio_only', false);
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ class WebinarService
|
||||
|
||||
public function canPublish(Room $room, Participant $participant): bool
|
||||
{
|
||||
if ($room->type !== 'webinar') {
|
||||
if (! in_array($room->type, ['webinar', 'town_hall'], true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user