@skooldev/skool-stream-layout 1.0.6 → 1.0.7

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/index.cjs.js CHANGED
@@ -66,7 +66,8 @@ const CustomParticipantViewUI = () => {
66
66
  const hasPausedVideo = (0,external_react_namespaceObject.useMemo)(() => { var _a; return !!((_a = participant.pausedTracks) === null || _a === void 0 ? void 0 : _a.includes(video_react_sdk_namespaceObject.SfuModels.TrackType.VIDEO)); }, [participant]);
67
67
  return ((0,jsx_runtime_namespaceObject.jsxs)("div", { className: "participant-label", children: [(0,jsx_runtime_namespaceObject.jsx)("span", { children: participant.name }), !(0,video_react_sdk_namespaceObject.hasAudio)(participant) && (0,jsx_runtime_namespaceObject.jsx)("span", { className: "mute-icon" }), (0,video_react_sdk_namespaceObject.isPinned)(participant) && (0,jsx_runtime_namespaceObject.jsx)("span", { className: "pin-icon" }), hasPausedVideo && (0,jsx_runtime_namespaceObject.jsx)(video_react_sdk_namespaceObject.Icon, { icon: "low-bandwidth" })] }));
68
68
  };
69
- const SkoolStreamLayoutComponent = () => {
69
+ const SkoolStreamLayoutComponent = (props) => {
70
+ const { excludeLocalParticipant = false } = props;
70
71
  const call = (0,video_react_sdk_namespaceObject.useCall)();
71
72
  const { useParticipants, useHasOngoingScreenShare } = (0,video_react_sdk_namespaceObject.useCallStateHooks)();
72
73
  const participants = useParticipants();
@@ -80,10 +81,16 @@ const SkoolStreamLayoutComponent = () => {
80
81
  }
81
82
  : undefined;
82
83
  if (hasOngoingScreenshare || (participants.length > 2 && hasPinnedParticipant)) {
83
- return ((0,jsx_runtime_namespaceObject.jsx)(video_react_sdk_namespaceObject.SpeakerLayout, { ParticipantViewUIBar: CustomParticipantViewUI, ParticipantViewUISpotlight: CustomParticipantViewUI, filterParticipants: participantsFilter }));
84
+ return ((0,jsx_runtime_namespaceObject.jsx)(video_react_sdk_namespaceObject.SpeakerLayout, { ParticipantViewUIBar: CustomParticipantViewUI, ParticipantViewUISpotlight: CustomParticipantViewUI, filterParticipants: participantsFilter, excludeLocalParticipant: excludeLocalParticipant }));
84
85
  }
85
- return ((0,jsx_runtime_namespaceObject.jsx)(video_react_sdk_namespaceObject.PaginatedGridLayout, { groupSize: 12, ParticipantViewUI: CustomParticipantViewUI, filterParticipants: participantsFilter }));
86
- }, [hasOngoingScreenshare, participants, hasPinnedParticipant, isWebinar]);
86
+ return ((0,jsx_runtime_namespaceObject.jsx)(video_react_sdk_namespaceObject.PaginatedGridLayout, { groupSize: 12, ParticipantViewUI: CustomParticipantViewUI, filterParticipants: participantsFilter, excludeLocalParticipant: excludeLocalParticipant }));
87
+ }, [
88
+ excludeLocalParticipant,
89
+ hasOngoingScreenshare,
90
+ participants,
91
+ hasPinnedParticipant,
92
+ isWebinar,
93
+ ]);
87
94
  return ((0,jsx_runtime_namespaceObject.jsx)("div", { "data-participants": numParticipantsInView, className: "skool-stream-layout", children: mainLayout }));
88
95
  };
89
96
  const SkoolStreamLayout = (0,external_react_namespaceObject.memo)(SkoolStreamLayoutComponent);
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  import React from "react";
2
2
  import "./styles.scss";
3
- export declare const SkoolStreamLayout: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
3
+ export declare const SkoolStreamLayout: React.MemoExoticComponent<(props: {
4
+ excludeLocalParticipant?: boolean;
5
+ }) => import("react/jsx-runtime").JSX.Element>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skooldev/skool-stream-layout",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Skool Stream Layout",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",