@livo-tv/sdk 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/studio/index.cjs +38 -15
- package/dist/studio/index.cjs.map +1 -1
- package/dist/studio/index.js +38 -15
- package/dist/studio/index.js.map +1 -1
- package/package.json +1 -1
package/dist/studio/index.js
CHANGED
|
@@ -2275,13 +2275,13 @@ function BubbleGroup({ className, ...props }) {
|
|
|
2275
2275
|
"div",
|
|
2276
2276
|
{
|
|
2277
2277
|
"data-slot": "bubble-group",
|
|
2278
|
-
className: cn("flex min-w-
|
|
2278
|
+
className: cn("flex min-w-min flex-col gap-2", className),
|
|
2279
2279
|
...props
|
|
2280
2280
|
}
|
|
2281
2281
|
);
|
|
2282
2282
|
}
|
|
2283
2283
|
var bubbleVariants = cva(
|
|
2284
|
-
"group/bubble relative flex w-fit min-w-
|
|
2284
|
+
"group/bubble relative flex w-fit min-w-min max-w-full flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",
|
|
2285
2285
|
{
|
|
2286
2286
|
variants: {
|
|
2287
2287
|
variant: {
|
|
@@ -2326,7 +2326,7 @@ function BubbleContent({
|
|
|
2326
2326
|
props: mergeProps(
|
|
2327
2327
|
{
|
|
2328
2328
|
className: cn(
|
|
2329
|
-
"w-auto max-w-full rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed [overflow-wrap:break-word] group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",
|
|
2329
|
+
"w-auto max-w-full whitespace-pre-wrap rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed [overflow-wrap:break-word] group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",
|
|
2330
2330
|
className
|
|
2331
2331
|
)
|
|
2332
2332
|
},
|
|
@@ -2510,7 +2510,7 @@ function StudioChatPanel({
|
|
|
2510
2510
|
const bubbles = group.rows.map((row) => /* @__PURE__ */ jsxs(
|
|
2511
2511
|
"div",
|
|
2512
2512
|
{
|
|
2513
|
-
className: group.mine ? "ml-auto flex
|
|
2513
|
+
className: group.mine ? "ml-auto flex max-w-[80%] flex-col gap-1 self-end" : "flex max-w-[80%] flex-col gap-1 self-start",
|
|
2514
2514
|
children: [
|
|
2515
2515
|
/* @__PURE__ */ jsx(
|
|
2516
2516
|
Bubble,
|
|
@@ -4869,7 +4869,11 @@ function isRecorder(participant) {
|
|
|
4869
4869
|
function resolvedName(participant, nameOverrides) {
|
|
4870
4870
|
return nameOverrides.get(participant.id) ?? (participant.userId ? nameOverrides.get(participant.userId) : void 0) ?? participant.name?.trim() ?? "Guest";
|
|
4871
4871
|
}
|
|
4872
|
-
function
|
|
4872
|
+
function resolveTileStageStatus(participant, stageEnabled, fallback) {
|
|
4873
|
+
if (!stageEnabled) return "ON_STAGE";
|
|
4874
|
+
return participant.stageStatus ?? fallback ?? "OFF_STAGE";
|
|
4875
|
+
}
|
|
4876
|
+
function tileFrom(participant, selfId, pinnedIds, chatSend, nameOverrides, stageStatus) {
|
|
4873
4877
|
return {
|
|
4874
4878
|
id: participant.id,
|
|
4875
4879
|
userId: participant.userId ?? "",
|
|
@@ -4879,7 +4883,7 @@ function tileFrom(participant, selfId, pinnedIds, chatSend, nameOverrides) {
|
|
|
4879
4883
|
videoEnabled: participant.videoEnabled === true,
|
|
4880
4884
|
screenShareEnabled: participant.screenShareEnabled === true,
|
|
4881
4885
|
picture: participant.picture ?? null,
|
|
4882
|
-
stageStatus
|
|
4886
|
+
stageStatus,
|
|
4883
4887
|
pinned: participant.isPinned === true || pinnedIds.has(participant.id),
|
|
4884
4888
|
chatCanSend: chatSend.get(participant.id) ?? true
|
|
4885
4889
|
};
|
|
@@ -5421,7 +5425,7 @@ function studioMeetingFromRtk(raw) {
|
|
|
5421
5425
|
notifyStage();
|
|
5422
5426
|
},
|
|
5423
5427
|
async joinStage() {
|
|
5424
|
-
if (
|
|
5428
|
+
if (meeting.self?.stageStatus === "ON_STAGE") {
|
|
5425
5429
|
notifyStage();
|
|
5426
5430
|
return;
|
|
5427
5431
|
}
|
|
@@ -5430,14 +5434,15 @@ function studioMeetingFromRtk(raw) {
|
|
|
5430
5434
|
notifyStage();
|
|
5431
5435
|
return;
|
|
5432
5436
|
}
|
|
5437
|
+
const userId = meeting.self?.userId;
|
|
5438
|
+
if (userId) {
|
|
5439
|
+
await meeting.stage?.grantAccess?.([userId]);
|
|
5440
|
+
}
|
|
5433
5441
|
try {
|
|
5434
5442
|
await meeting.stage?.join?.();
|
|
5435
|
-
} catch {
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
await meeting.stage?.grantAccess?.([userId]);
|
|
5439
|
-
}
|
|
5440
|
-
await meeting.stage?.join?.();
|
|
5443
|
+
} catch (error) {
|
|
5444
|
+
notifyStage();
|
|
5445
|
+
throw error;
|
|
5441
5446
|
}
|
|
5442
5447
|
joinedStageLocally = true;
|
|
5443
5448
|
await republishCameraIfOn();
|
|
@@ -5445,6 +5450,7 @@ function studioMeetingFromRtk(raw) {
|
|
|
5445
5450
|
},
|
|
5446
5451
|
async leaveStage() {
|
|
5447
5452
|
await meeting.stage?.leave?.();
|
|
5453
|
+
joinedStageLocally = false;
|
|
5448
5454
|
notifyStage();
|
|
5449
5455
|
},
|
|
5450
5456
|
stageStatus() {
|
|
@@ -5526,10 +5532,27 @@ function studioMeetingFromRtk(raw) {
|
|
|
5526
5532
|
participants() {
|
|
5527
5533
|
const self = meeting.self;
|
|
5528
5534
|
const pinned = pinnedIdSet();
|
|
5529
|
-
const
|
|
5535
|
+
const stageEnabled = self?.permissions?.stageEnabled !== false;
|
|
5536
|
+
const joinedRows = asList(meeting.participants?.joined).filter((row) => row.id !== self?.id && !isRecorder(row)).map(
|
|
5537
|
+
(row) => tileFrom(
|
|
5538
|
+
row,
|
|
5539
|
+
self?.id,
|
|
5540
|
+
pinned,
|
|
5541
|
+
chatSend,
|
|
5542
|
+
nameOverrides,
|
|
5543
|
+
resolveTileStageStatus(row, stageEnabled)
|
|
5544
|
+
)
|
|
5545
|
+
);
|
|
5530
5546
|
if (self?.id && !isRecorder(self)) {
|
|
5531
5547
|
joinedRows.unshift(
|
|
5532
|
-
tileFrom(
|
|
5548
|
+
tileFrom(
|
|
5549
|
+
self,
|
|
5550
|
+
self.id,
|
|
5551
|
+
pinned,
|
|
5552
|
+
chatSend,
|
|
5553
|
+
nameOverrides,
|
|
5554
|
+
resolveTileStageStatus(self, stageEnabled, meeting.stage?.status)
|
|
5555
|
+
)
|
|
5533
5556
|
);
|
|
5534
5557
|
}
|
|
5535
5558
|
return joinedRows;
|