@selfcommunity/react-ui 0.8.0-live.66 → 0.8.0-live.67
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/lib/cjs/assets/liveStream/event.d.ts +2 -0
- package/lib/cjs/assets/liveStream/event.js +3 -0
- package/lib/cjs/assets/liveStream/live.d.ts +2 -0
- package/lib/cjs/assets/liveStream/live.js +3 -0
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +1 -0
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +38 -81
- package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.js +1 -1
- package/lib/cjs/components/LiveStreamForm/constants.d.ts +4 -0
- package/lib/cjs/components/LiveStreamForm/constants.js +4 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +10 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +20 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +28 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +21 -2
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +1 -2
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +7 -2
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +11 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +104 -0
- package/lib/cjs/components/LiveStreamRoom/constants.d.ts +10 -0
- package/lib/cjs/components/LiveStreamRoom/constants.js +11 -1
- package/lib/cjs/components/Notification/LiveStream/LiveStream.d.ts +15 -0
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +82 -0
- package/lib/cjs/components/Notification/LiveStream/index.d.ts +3 -0
- package/lib/cjs/components/Notification/LiveStream/index.js +5 -0
- package/lib/cjs/components/Notification/Notification.js +3 -0
- package/lib/esm/assets/liveStream/event.d.ts +2 -0
- package/lib/esm/assets/liveStream/event.js +1 -0
- package/lib/esm/assets/liveStream/live.d.ts +2 -0
- package/lib/esm/assets/liveStream/live.js +1 -0
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +1 -0
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +34 -78
- package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.js +1 -1
- package/lib/esm/components/LiveStreamForm/constants.d.ts +4 -0
- package/lib/esm/components/LiveStreamForm/constants.js +4 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +10 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +20 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +23 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +22 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +1 -2
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +7 -2
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +11 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +100 -0
- package/lib/esm/components/LiveStreamRoom/constants.d.ts +10 -0
- package/lib/esm/components/LiveStreamRoom/constants.js +10 -0
- package/lib/esm/components/Notification/LiveStream/LiveStream.d.ts +15 -0
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +79 -0
- package/lib/esm/components/Notification/LiveStream/index.d.ts +3 -0
- package/lib/esm/components/Notification/LiveStream/index.js +2 -0
- package/lib/esm/components/Notification/Notification.js +3 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLivestreamCheck = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const api_services_1 = require("@selfcommunity/api-services");
|
|
6
|
+
const components_react_1 = require("@livekit/components-react");
|
|
7
|
+
const LiveStreamProvider_1 = require("./LiveStreamProvider");
|
|
8
|
+
const notistack_1 = require("notistack");
|
|
9
|
+
const react_intl_1 = require("react-intl");
|
|
10
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
11
|
+
const constants_1 = require("../constants");
|
|
12
|
+
/**
|
|
13
|
+
* Custom hook for monitoring livestream.
|
|
14
|
+
* @param {number} warningThreshold
|
|
15
|
+
* @param showWarnings
|
|
16
|
+
* @param performDisconnect
|
|
17
|
+
*/
|
|
18
|
+
function useLivestreamCheck(warningThreshold = constants_1.WARNING_THRESHOLD_EXPIRING_SOON, showWarnings = true, performDisconnect = true) {
|
|
19
|
+
// HOOKS
|
|
20
|
+
const scUserContext = (0, react_core_1.useSCUser)();
|
|
21
|
+
const participants = (0, components_react_1.useParticipants)();
|
|
22
|
+
const { liveStream } = (0, LiveStreamProvider_1.useLiveStream)();
|
|
23
|
+
const { buttonProps } = (0, components_react_1.useDisconnectButton)({});
|
|
24
|
+
const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
|
|
25
|
+
const __DEBUG = (0, react_1.useRef)(true);
|
|
26
|
+
// STATE
|
|
27
|
+
const [timeRemaining, setTimeRemaining] = (0, react_1.useState)(60);
|
|
28
|
+
const [isExpiringSoon, setIsExpiringSoon] = (0, react_1.useState)(false);
|
|
29
|
+
const [isExpired, setIsExpired] = (0, react_1.useState)(false);
|
|
30
|
+
const intervalRef = (0, react_1.useRef)(null);
|
|
31
|
+
// INTL
|
|
32
|
+
const intl = (0, react_intl_1.useIntl)();
|
|
33
|
+
const fetchLivestreamStatus = () => {
|
|
34
|
+
api_services_1.LiveStreamApiClient.getMonthlyDuration()
|
|
35
|
+
.then((r) => {
|
|
36
|
+
setTimeRemaining(r.remaining_minutes);
|
|
37
|
+
if (r.remaining_minutes > 0 && r.remaining_minutes <= warningThreshold) {
|
|
38
|
+
setIsExpiringSoon(true);
|
|
39
|
+
if (!isExpiringSoon && !isExpired && liveStream.host.id === scUserContext.user.id && showWarnings) {
|
|
40
|
+
__DEBUG && console.log('Warning: ');
|
|
41
|
+
enqueueSnackbar(intl.formatMessage({ id: 'ui.liveStreamRoom.check.fewMinutesRemaining', defaultMessage: 'ui.liveStreamRoom.check.fewMinutesRemaining' }), {
|
|
42
|
+
variant: 'warning',
|
|
43
|
+
autoHideDuration: 30000
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else if (r.remaining_minutes <= 0) {
|
|
48
|
+
__DEBUG && console.log('Livestream ');
|
|
49
|
+
setIsExpired(true);
|
|
50
|
+
clearInterval(intervalRef.current);
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
.catch((error) => {
|
|
54
|
+
console.error('Error fetching live status:', error);
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
const check = (0, react_1.useCallback)(() => {
|
|
58
|
+
if (__DEBUG) {
|
|
59
|
+
console.log('Checking live status');
|
|
60
|
+
console.log(participants.length);
|
|
61
|
+
console.log('isExpiringSoon: ', isExpiringSoon);
|
|
62
|
+
console.log('isExpired: ', isExpired);
|
|
63
|
+
console.log('Checking participants...');
|
|
64
|
+
}
|
|
65
|
+
if (participants.length <= 1) {
|
|
66
|
+
isExpiringSoon ? setIsExpired(true) : setIsExpiringSoon(true);
|
|
67
|
+
if (!isExpiringSoon && !isExpired && showWarnings) {
|
|
68
|
+
enqueueSnackbar(intl.formatMessage({ id: 'ui.liveStreamRoom.check.youAreAloneInTheRoom', defaultMessage: 'ui.liveStreamRoom.check.youAreAloneInTheRoom' }), { variant: 'warning', autoHideDuration: 20000 });
|
|
69
|
+
}
|
|
70
|
+
else if (isExpired && performDisconnect) {
|
|
71
|
+
// Leave the room
|
|
72
|
+
__DEBUG && console.log('Leave the room: no participants');
|
|
73
|
+
buttonProps.onClick();
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
__DEBUG && console.log('Checking live speaker...');
|
|
78
|
+
const speaker = participants.find((pt) => {
|
|
79
|
+
return pt.name === liveStream.host.username;
|
|
80
|
+
});
|
|
81
|
+
if (!speaker) {
|
|
82
|
+
isExpiringSoon ? setIsExpired(true) : setIsExpiringSoon(true);
|
|
83
|
+
if (!isExpiringSoon && !isExpired && liveStream.host.id !== scUserContext.user.id && showWarnings) {
|
|
84
|
+
enqueueSnackbar(intl.formatMessage({ id: 'ui.liveStreamRoom.check.hostMissing', defaultMessage: 'ui.liveStreamRoom.check.hostMissing' }), {
|
|
85
|
+
variant: 'warning',
|
|
86
|
+
autoHideDuration: 20000
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else if (isExpired && performDisconnect) {
|
|
90
|
+
// Leave the room
|
|
91
|
+
__DEBUG && console.log('Leave the room: no host');
|
|
92
|
+
buttonProps.onClick();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
__DEBUG && console.log('Checking live status resources...');
|
|
96
|
+
fetchLivestreamStatus();
|
|
97
|
+
}, [isExpired, isExpiringSoon, buttonProps]);
|
|
98
|
+
(0, react_1.useEffect)(() => {
|
|
99
|
+
intervalRef.current = setInterval(check, constants_1.LIVE_CHECKING_INTERVAL * 1000);
|
|
100
|
+
return () => intervalRef.current && clearInterval(intervalRef.current);
|
|
101
|
+
}, [isExpired, isExpiringSoon]);
|
|
102
|
+
return { timeRemaining, isExpiringSoon, isExpired };
|
|
103
|
+
}
|
|
104
|
+
exports.useLivestreamCheck = useLivestreamCheck;
|
|
@@ -3,3 +3,13 @@ export declare const defaultVideoOptions: {
|
|
|
3
3
|
readonly hq: true;
|
|
4
4
|
readonly codec: "vp9";
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Checking live status on VideoLiveConference
|
|
8
|
+
* In minutes
|
|
9
|
+
*/
|
|
10
|
+
export declare const LIVE_CHECKING_INTERVAL = 50;
|
|
11
|
+
/**
|
|
12
|
+
* Warning threshold expiring soon
|
|
13
|
+
* In minutes
|
|
14
|
+
*/
|
|
15
|
+
export declare const WARNING_THRESHOLD_EXPIRING_SOON = 5;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultVideoOptions = exports.PREFIX = void 0;
|
|
3
|
+
exports.WARNING_THRESHOLD_EXPIRING_SOON = exports.LIVE_CHECKING_INTERVAL = exports.defaultVideoOptions = exports.PREFIX = void 0;
|
|
4
4
|
exports.PREFIX = 'SCLiveStreamRoom';
|
|
5
5
|
exports.defaultVideoOptions = {
|
|
6
6
|
hq: true,
|
|
7
7
|
codec: 'vp9'
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Checking live status on VideoLiveConference
|
|
11
|
+
* In minutes
|
|
12
|
+
*/
|
|
13
|
+
exports.LIVE_CHECKING_INTERVAL = 50;
|
|
14
|
+
/**
|
|
15
|
+
* Warning threshold expiring soon
|
|
16
|
+
* In minutes
|
|
17
|
+
*/
|
|
18
|
+
exports.WARNING_THRESHOLD_EXPIRING_SOON = 5;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SCNotificationLiveStreamActivityType } from '@selfcommunity/types';
|
|
2
|
+
import { NotificationItemProps } from '../../../shared/NotificationItem';
|
|
3
|
+
export interface NotificationLiveStreamProps extends Pick<NotificationItemProps, Exclude<keyof NotificationItemProps, 'image' | 'disableTypography' | 'primary' | 'primaryTypographyProps' | 'secondary' | 'secondaryTypographyProps' | 'actions' | 'footer' | 'isNew'>> {
|
|
4
|
+
/**
|
|
5
|
+
* Notification obj
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
notificationObject: SCNotificationLiveStreamActivityType;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This component render the content of the notification of type event
|
|
12
|
+
* @constructor
|
|
13
|
+
* @param props
|
|
14
|
+
*/
|
|
15
|
+
export default function LiveStreamNotification(props: NotificationLiveStreamProps): JSX.Element;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
|
+
const react_intl_1 = require("react-intl");
|
|
10
|
+
const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
|
|
11
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
|
+
const types_1 = require("../../../types");
|
|
13
|
+
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
14
|
+
const lab_1 = require("@mui/lab");
|
|
15
|
+
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
16
|
+
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
17
|
+
const constants_1 = require("../constants");
|
|
18
|
+
const Event_1 = tslib_1.__importDefault(require("../../Event"));
|
|
19
|
+
const classes = {
|
|
20
|
+
root: `${constants_1.PREFIX}-event-root`,
|
|
21
|
+
avatar: `${constants_1.PREFIX}-avatar`,
|
|
22
|
+
actions: `${constants_1.PREFIX}-actions`,
|
|
23
|
+
seeButton: `${constants_1.PREFIX}see-button`,
|
|
24
|
+
activeAt: `${constants_1.PREFIX}-active-at`,
|
|
25
|
+
snippetTime: `${constants_1.PREFIX}-snippet-time`,
|
|
26
|
+
username: `${constants_1.PREFIX}-username`
|
|
27
|
+
};
|
|
28
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
29
|
+
name: constants_1.PREFIX,
|
|
30
|
+
slot: 'EventRoot'
|
|
31
|
+
})(() => ({}));
|
|
32
|
+
/**
|
|
33
|
+
* This component render the content of the notification of type event
|
|
34
|
+
* @constructor
|
|
35
|
+
* @param props
|
|
36
|
+
*/
|
|
37
|
+
function LiveStreamNotification(props) {
|
|
38
|
+
// PROPS
|
|
39
|
+
const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_1.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
|
|
40
|
+
// CONTEXT
|
|
41
|
+
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
42
|
+
// STATE
|
|
43
|
+
const [openAlert, setOpenAlert] = (0, react_1.useState)(false);
|
|
44
|
+
// CONST
|
|
45
|
+
const isSnippetTemplate = template === types_1.SCNotificationObjectTemplateType.SNIPPET;
|
|
46
|
+
const isToastTemplate = template === types_1.SCNotificationObjectTemplateType.TOAST;
|
|
47
|
+
const intl = (0, react_intl_1.useIntl)();
|
|
48
|
+
// RENDER
|
|
49
|
+
if (isSnippetTemplate || isToastTemplate) {
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
51
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
52
|
+
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
53
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
54
|
+
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.event.${notificationObject.type}`, defaultMessage: `ui.notification.event.${notificationObject.type}`, values: {
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }),
|
|
58
|
+
event: notificationObject.live_stream.title,
|
|
59
|
+
link: (...chunks) => (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
|
|
60
|
+
} })] }), secondary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.event.dateTime", defaultMessage: "ui.notification.event.dateTime", values: {
|
|
61
|
+
date: intl.formatDate(notificationObject.live_stream.created_at, {
|
|
62
|
+
weekday: 'long',
|
|
63
|
+
day: 'numeric',
|
|
64
|
+
year: 'numeric',
|
|
65
|
+
month: 'long'
|
|
66
|
+
}),
|
|
67
|
+
hour: intl.formatDate(notificationObject.live_stream.created_at, { hour: 'numeric', minute: 'numeric' })
|
|
68
|
+
} }) })) }), footer: isToastTemplate ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.event.button.see", defaultMessage: "ui.notification.event.button.see" }) })) }))] }))) : ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
|
|
69
|
+
}
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
71
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
72
|
+
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar }) })) })), primary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
73
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
74
|
+
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
76
|
+
// @ts-ignore
|
|
77
|
+
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }),
|
|
78
|
+
event: notificationObject.live_stream.title,
|
|
79
|
+
link: (...chunks) => (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
|
|
80
|
+
} }), (0, jsx_runtime_1.jsx)(Event_1.default, { event: notificationObject.live_stream, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), elevation: 0 })] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ color: 'primary', variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.event.button.see", defaultMessage: "ui.notification.event.button.see" }) }))] })) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
81
|
+
}
|
|
82
|
+
exports.default = LiveStreamNotification;
|
|
@@ -308,6 +308,9 @@ function UserNotification(inProps) {
|
|
|
308
308
|
n.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT) {
|
|
309
309
|
return (0, jsx_runtime_1.jsx)(Event_1.default, { notificationObject: n }, i);
|
|
310
310
|
}
|
|
311
|
+
else if (n.type === types_1.SCNotificationTypologyType.LIVE_STREAM_STARTED) {
|
|
312
|
+
return (0, jsx_runtime_1.jsx)(Event_1.default, { notificationObject: n }, i);
|
|
313
|
+
}
|
|
311
314
|
return null;
|
|
312
315
|
}
|
|
313
316
|
/**
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAARAElEQVR4nO1dCVRUSZbNqenpmZ6ZrpnuMzN9ps/MmTkz3VNtldqlImpZlpYbssgqCK4o7uKC+1ouJYi7gvuKuOICiruIqCCyyOKKoFKKoCz5Iz6LiCl657wgMxsoliQzWcR/z3mH+BGf/Blx/4sX8eJFpEqlQIECBQoUKFCgQIECBQoUKFCgQIECBQqq4tWrV//AGGsvSdIAWZZdSTjnvQoLC/8PwC+q3a7A3ADw15IkWXPOt3DO0xhj7znnqEkYY2WMsTjO+XJJkr5S2DAjCgoKfs0YW8A5z66NgLqEMfaBMXaFMTYQwGcKOcZrxF9xzscyxtQNIaC4uFgIpYuKilBYWCiE8kpKSh5rNJoJAPpqZRyAOQDstdcWCmE1oKCg4PeMsciGagM1vEajEULpt2/f4vXr10LevXsnRKPRfCgvL88EEAngGQA1gHgAEQB21vR9PmnIsmzJGMszpnuqSUpKSgQh9Jc0RkdQaWlpRnl5+TStlvy+uevdIiHLcl/OeYm5yCApLS0VmkJ/iRRKV5ICAEEAvmjuurc4SJLU3RxkUMOXlZXVK2/evBF2paysTAKwAEAPAP5amaP6lCFJ0n8yxvLNoRHa7qheofuoC9Om0wB0ADBXKyNUn/L8gnMea85uykhZ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MSzO3s0Qev5AAAAABJRU5ErkJggg==";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAALEUlEQVR4nO1dWWwbWxke4CLE8gI8cMUuARK8IAQI3hAXhARcAbogIVbBlRBCSCwPCKkUb5M4aZLuO71dk6Zu1bRJ9y1dkm5pSxeq3m7QLW2auvb8/7hNepvFOeg79VS+zozjZY7HceeTfjl2JrbnfOdfz39ONM2HDx8+fPjw4cOHDx8+fPjw4cOHDx8+fPioKggh3mma5leY+e/MvIOZL9MzjBPRCH5g5jeJqJOZI8z8TSHEe7z+3jWHVCr1OWZeQkQGM4tiBBwR0b+Y+cte38e0BxF9EbOdiNLFEuEge5j5S17f17SDEOLdRBSEGXKJiGyNgXmb19/f/16v73NagJk/TUTn3CYiV27duvVmS0vL1kgk8jASiTzWdT2h63rrzJkzP+X1GFQNksnkF5j5rmoyLl68KFpaWkRHR4c4ceKEOHXqlHzctGnTmK7rZigU+pr2osM0za8SUVI1Gf39/aK5uVkcPHhQEpEr3d3dQtd1mjFjxke0FxXxePxlZr6vmgwItGLjxo22ZFjS1tY2Ho1G5wQCgVd1XT8bDAZHwuHwiK7r50Oh0I+1WoYQ4iVm7qkEGRBox5EjR/IScujQIREKhUYbGhoeb9u2TRw/flwKfm5oaBjSdX2xVqtg5npVg3/nzh2xfv16DKKoq6sTq1atEuFw+LnfcJK+vj6xevXq8aNHj0763bFjx0R9ff1bgUDgNa3WkEwmP87MT1SQcfv2bakNME8Y2J6eHklOKBRy9B+FSmdnJwg+p9UamLlVlXa0tbUharI1RydPnhTt7e3yGjwWSwi0JBwOP9VqCYlE4vMuZuBSTp8+LZYtWybNU319vRw4uwGNxWJT+hEnwd+B6HA4PFpXV3coEAh8W6sFsMu+Y+vWraKxsVE6Xjjg3IHE7zdv3iw2bNggNaMUMnbu3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E3biA4RXHR2ieSbx1DdedikY2BKc0ruLGdOehAiNVQbe33sFvp86i3dyp55BkhaDxWRUhzc7PcfmxXAHS7+72QlqZsrZiiyeOKl4TcU0FId3e3zBtK3R/ipRDRVi8J6VVBSDk7qMoRa+ZP1SKbD+l0Ou4ZIVMlkJXeY8jeC5qvP+QlIb9WRYhZwi5cVVJoYyAR/UPzEolE4qPlRlpBF/epeynoR6iKE06J6FA5N9LY2CiduBsnOXgoA0pWDEsBEf2qnJvp7OyUZgkFy3LPOvFKM6qGjKya160ybkjAP0BLyj0NqMKSgs+oCjOVC2b+bRUMkHB55vcRUQdWA3GKUSYJvpI54P910zQ/qFUrcMQG9nB7PYjsngwR0fQ+2RqbHxGH14BmTBiG8TOtFsDMP3H7/EQufCBRfW4tZysF/paI/qLVEojoz14QYprm7/H5zPxaiUVPZNk/1WoRIKVSmkLPNvD/wSZhfaOQNZvMNWurKnRVZb4QGiomg/OdO5JMJj9GRH9k5l3Y4ZTRHBzY3M/MO3EcIa7RXhSYpvlZHIKpiIzDRPRJr+9x2iFz6txvMqeRukHEDdh6vK/X9zatga4+IvolER0s1r9k/j1RN8ygku7AFx3xePxl9C8x8zKYnszKo8xhnv3HO76dKVouxHWpVOrDXn9nHz58+PDhw4cPHz58+PDhw4cPHz58+PDhQ5uE/wMSzO3s0Qev5AAAAABJRU5ErkJggg==';
|
|
@@ -1,98 +1,39 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { Box, Typography, Button, Paper, Container, Radio } from '@mui/material';
|
|
5
|
+
import { Box, Typography, Button, Paper, Container, Radio, Alert } from '@mui/material';
|
|
6
6
|
import Icon from '@mui/material/Icon';
|
|
7
|
-
import { PREFIX } from '../constants';
|
|
8
7
|
import { useThemeProps } from '@mui/system';
|
|
9
8
|
import classNames from 'classnames';
|
|
10
9
|
import { LiveStreamType } from '../types';
|
|
11
10
|
import { useSnackbar } from 'notistack';
|
|
12
11
|
import { FormattedMessage } from 'react-intl';
|
|
12
|
+
import EventImage from '../../../assets/liveStream/event';
|
|
13
|
+
import LiveImage from '../../../assets/liveStream/live';
|
|
14
|
+
import { LiveStreamApiClient } from '@selfcommunity/api-services';
|
|
15
|
+
import { WARNING_THRESHOLD_EXPIRING_SOON } from '../../LiveStreamRoom/constants';
|
|
16
|
+
export const PREFIX = 'SCLiveStreamSelector';
|
|
13
17
|
const classes = {
|
|
14
18
|
root: `${PREFIX}-root`,
|
|
19
|
+
warning: `${PREFIX}-warning`,
|
|
15
20
|
options: `${PREFIX}-options`,
|
|
16
21
|
actions: `${PREFIX}-actions`
|
|
17
22
|
};
|
|
18
23
|
const Root = styled(Container, {
|
|
19
24
|
name: PREFIX,
|
|
20
25
|
slot: 'Root'
|
|
21
|
-
})(({ theme }) => ({
|
|
22
|
-
[`& .${classes.options}`]: {
|
|
23
|
-
display: 'flex',
|
|
24
|
-
justifyContent: 'center',
|
|
25
|
-
alignItems: 'center',
|
|
26
|
-
[theme.breakpoints.down('sm')]: {
|
|
27
|
-
display: 'block'
|
|
28
|
-
},
|
|
29
|
-
'& > div': {
|
|
30
|
-
width: '290px',
|
|
31
|
-
[theme.breakpoints.down('sm')]: {
|
|
32
|
-
margin: '0px auto',
|
|
33
|
-
marginBottom: theme.spacing(2)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
[`& .${classes.actions}`]: {
|
|
38
|
-
display: 'flex',
|
|
39
|
-
justifyContent: 'flex-end',
|
|
40
|
-
alignItems: 'flex-end',
|
|
41
|
-
marginTop: theme.spacing(4)
|
|
42
|
-
}
|
|
43
|
-
}));
|
|
26
|
+
})(({ theme }) => ({}));
|
|
44
27
|
// Styled components
|
|
45
28
|
const OptionCard = styled(Paper, {
|
|
29
|
+
name: PREFIX,
|
|
30
|
+
slot: 'optionCardRoot',
|
|
46
31
|
shouldForwardProp: (prop) => prop !== 'selected'
|
|
47
|
-
})(({ theme, selected }) => ({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
cursor: 'pointer',
|
|
53
|
-
transition: theme.transitions.create(['background-color', 'box-shadow'], {
|
|
54
|
-
duration: theme.transitions.duration.short
|
|
55
|
-
}),
|
|
56
|
-
backgroundColor: selected ? theme.palette.grey[100] : theme.palette.background.paper,
|
|
57
|
-
'&:hover': {
|
|
58
|
-
backgroundColor: theme.palette.grey[50],
|
|
59
|
-
boxShadow: theme.shadows[2]
|
|
60
|
-
},
|
|
61
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
62
|
-
[`& > div`]: {
|
|
63
|
-
display: 'flex',
|
|
64
|
-
justifyContent: 'space-between',
|
|
65
|
-
alignItems: 'center',
|
|
66
|
-
marginBottom: 2,
|
|
67
|
-
maxWidth: '300px'
|
|
68
|
-
},
|
|
69
|
-
[`& ul`]: {
|
|
70
|
-
marginTop: theme.spacing(2),
|
|
71
|
-
padding: 0,
|
|
72
|
-
listStyle: 'none'
|
|
73
|
-
}
|
|
74
|
-
}));
|
|
75
|
-
const RadioIndicator = styled(Radio, {
|
|
76
|
-
// shouldForwardProp: (prop) => prop !== 'selected'
|
|
77
|
-
})(({ theme, selected }) => ({
|
|
78
|
-
/* width: 16,
|
|
79
|
-
height: 16,
|
|
80
|
-
borderRadius: '50%',
|
|
81
|
-
border: `2px solid ${selected ? theme.palette.secondary.main : theme.palette.grey[300]}`,
|
|
82
|
-
backgroundColor: selected ? theme.palette.secondary.main : 'transparent',
|
|
83
|
-
transition: theme.transitions.create(['border-color', 'background-color'], {
|
|
84
|
-
duration: theme.transitions.duration.shortest
|
|
85
|
-
}) */
|
|
86
|
-
}));
|
|
87
|
-
const FeatureItem = styled(Box)(({ theme }) => ({
|
|
88
|
-
display: 'flex',
|
|
89
|
-
alignItems: 'flex-start',
|
|
90
|
-
gap: theme.spacing(1.5),
|
|
91
|
-
marginBottom: theme.spacing(2),
|
|
92
|
-
'&:last-child': {
|
|
93
|
-
marginBottom: 0
|
|
94
|
-
}
|
|
95
|
-
}));
|
|
32
|
+
})(({ theme, selected }) => ({}));
|
|
33
|
+
const FeatureItem = styled(Box, {
|
|
34
|
+
name: PREFIX,
|
|
35
|
+
slot: 'featureItemRoot'
|
|
36
|
+
})(({ theme }) => ({}));
|
|
96
37
|
/**
|
|
97
38
|
*> API documentation for the Community-JS LiveStreamSelector component. Learn about the available props and the CSS API.
|
|
98
39
|
*
|
|
@@ -123,9 +64,11 @@ export default function LiveStreamSelector(inProps) {
|
|
|
123
64
|
const { enqueueSnackbar } = useSnackbar();
|
|
124
65
|
// STATE
|
|
125
66
|
const [selectedOption, setSelectedOption] = useState(liveSelected);
|
|
67
|
+
const [timeRemaining, setTimeRemaining] = useState(null);
|
|
126
68
|
const options = [
|
|
127
69
|
{
|
|
128
70
|
title: 'Schedule a live event',
|
|
71
|
+
image: EventImage,
|
|
129
72
|
type: LiveStreamType.EVENT_LIVE,
|
|
130
73
|
features: [
|
|
131
74
|
'Schedule a live room or stream in your event space',
|
|
@@ -137,6 +80,7 @@ export default function LiveStreamSelector(inProps) {
|
|
|
137
80
|
},
|
|
138
81
|
{
|
|
139
82
|
title: 'Start a live stream',
|
|
83
|
+
image: LiveImage,
|
|
140
84
|
type: LiveStreamType.DIRECT_LIVE,
|
|
141
85
|
features: [
|
|
142
86
|
'Best for webinars, Q&As, AMAs, and for presentations',
|
|
@@ -162,13 +106,25 @@ export default function LiveStreamSelector(inProps) {
|
|
|
162
106
|
onNext && onNext(selectedOption);
|
|
163
107
|
}
|
|
164
108
|
};
|
|
165
|
-
|
|
109
|
+
const fetchLivestreamStatus = () => {
|
|
110
|
+
LiveStreamApiClient.getMonthlyDuration()
|
|
111
|
+
.then((r) => {
|
|
112
|
+
setTimeRemaining(r.remaining_minutes);
|
|
113
|
+
})
|
|
114
|
+
.catch((error) => {
|
|
115
|
+
console.error('Error fetching live status:', error);
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
fetchLivestreamStatus();
|
|
120
|
+
}, []);
|
|
121
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className), maxWidth: "lg", sx: { py: 4 } }, { children: [_jsx(Typography, Object.assign({ variant: "h4", component: "h1", align: "center", gutterBottom: true, sx: { mb: 4, fontWeight: 500 } }, { children: "How do you want to go live?" })), _jsx(Box, Object.assign({ className: classes.warning }, { children: _jsx(Alert, Object.assign({ variant: "filled", severity: "warning" }, { children: timeRemaining <= 1 ? (_jsx(FormattedMessage, { id: "ui.liveStreamRoom.selector.warningMinutesExausted", defaultMessage: "ui.liveStreamRoom.selector.warningMinutesExausted" })) : timeRemaining <= WARNING_THRESHOLD_EXPIRING_SOON ? (_jsx(FormattedMessage, { id: "ui.liveStreamRoom.selector.warningRemainingMinutes", defaultMessage: "ui.liveStreamRoom.selector.warningRemainingMinutes", values: { minutes: timeRemaining } })) : null })) })), _jsx(Box, Object.assign({ className: classes.options }, { children: options.map((option, index) => (_jsxs(OptionCard, Object.assign({ selected: selectedOption === option.type, onClick: () => handleOptionSelect(option.type), elevation: 0, role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
166
122
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
167
123
|
handleOptionSelect(index);
|
|
168
124
|
e.preventDefault();
|
|
169
125
|
}
|
|
170
|
-
}, theme: undefined }, { children: [_jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "h6", component: "h2", sx: { fontWeight: 500 } }, { children: option.title })), _jsx(Radio, { checked: selectedOption === option.type })] }), _jsx(Box, Object.assign({ component: "ul" }, { children: option.features.map((feature, featureIndex) => {
|
|
126
|
+
}, theme: undefined }, { children: [_jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "h6", component: "h2", sx: { fontWeight: 500 } }, { children: option.title })), _jsx(Radio, { checked: selectedOption === option.type })] }), _jsx("img", { src: option.image, alt: "logo" }), _jsx(Box, Object.assign({ component: "ul" }, { children: option.features.map((feature, featureIndex) => {
|
|
171
127
|
const _Icon = option.icons[featureIndex];
|
|
172
128
|
return (_jsxs(FeatureItem, Object.assign({ component: "li" }, { children: [_Icon, _jsx(Typography, Object.assign({ variant: "body2", color: "text.secondary", sx: { flex: 1 } }, { children: feature }))] }), featureIndex));
|
|
173
|
-
}) }))] }), index))) })), _jsx(Box, Object.assign({ className: classes.actions }, { children: _jsx(Button, Object.assign({ disabled: !selectedOption, variant: "contained", onClick: handleNext, color: "secondary" }, { children: "Next" })) }))] })));
|
|
129
|
+
}) }))] }), index))) })), _jsx(Box, Object.assign({ className: classes.actions }, { children: _jsx(Button, Object.assign({ disabled: !selectedOption || !timeRemaining, variant: "contained", onClick: handleNext, color: "secondary" }, { children: "Next" })) }))] })));
|
|
174
130
|
}
|
|
@@ -52,7 +52,7 @@ export default function LiveStreamSettingsForm(inProps) {
|
|
|
52
52
|
/**
|
|
53
53
|
* Renders root object
|
|
54
54
|
*/
|
|
55
|
-
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.muteParticipants), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['muteParticipants']: !(settings === null || settings === void 0 ? void 0 : settings.muteParticipants) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.muteParticipants", defaultMessage: "ui.liveStreamForm.muteParticipants" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.disableVideo), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableVideo']: !(settings === null || settings === void 0 ? void 0 : settings.disableVideo) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.disableVideo", defaultMessage: "ui.liveStreamForm.disableVideo" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.disableChat), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableChat']: !(settings === null || settings === void 0 ? void 0 : settings.disableChat) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.disableChat", defaultMessage: "ui.liveStreamForm.disableChat" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.disableShareScreen), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableShareScreen']: !(settings === null || settings === void 0 ? void 0 : settings.disableShareScreen) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.disableShareScreen", defaultMessage: "ui.liveStreamForm.disableShareScreen" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.hideParticipantsList), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['hideParticipantsList']: !(settings === null || settings === void 0 ? void 0 : settings.hideParticipantsList) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.hideParticipantsList", defaultMessage: "ui.liveStreamForm.hideParticipantsList" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.automaticallyNotifyFollowers), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['automaticallyNotifyFollowers']: !(settings === null || settings === void 0 ? void 0 : settings.automaticallyNotifyFollowers) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.automaticallyNotifyFollowers", defaultMessage: "ui.liveStreamForm.automaticallyNotifyFollowers" }) }))] })), _jsxs(FormControl, Object.assign({ className: classes.accessView }, { children: [_jsx(InputLabel, Object.assign({ id: "viewLabel" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.view.label", defaultMessage: "ui.liveStreamForm.view.label" }) })), _jsx(Select, Object.assign({ name: "view", label: _jsx(FormattedMessage, { id: "ui.liveStreamForm.view.label", defaultMessage: "ui.liveStreamForm.view.label" }), labelId: "viewLabel", fullWidth: true, value: (_a = settings === null || settings === void 0 ? void 0 : settings.view) !== null && _a !== void 0 ? _a : SCLiveStreamViewType.SPEAKER, onChange: (e) => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['view']: e.target.value })), displayEmpty: true, renderValue: (selected) => {
|
|
55
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.muteParticipants), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['muteParticipants']: !(settings === null || settings === void 0 ? void 0 : settings.muteParticipants) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.muteParticipants", defaultMessage: "ui.liveStreamForm.muteParticipants" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.disableVideo), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableVideo']: !(settings === null || settings === void 0 ? void 0 : settings.disableVideo) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.disableVideo", defaultMessage: "ui.liveStreamForm.disableVideo" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.disableChat), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableChat']: !(settings === null || settings === void 0 ? void 0 : settings.disableChat) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.disableChat", defaultMessage: "ui.liveStreamForm.disableChat" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.disableShareScreen), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableShareScreen']: !(settings === null || settings === void 0 ? void 0 : settings.disableShareScreen) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.disableShareScreen", defaultMessage: "ui.liveStreamForm.disableShareScreen" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.hideParticipantsList), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['hideParticipantsList']: !(settings === null || settings === void 0 ? void 0 : settings.hideParticipantsList) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.hideParticipantsList", defaultMessage: "ui.liveStreamForm.hideParticipantsList" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.automaticallyNotifyFollowers), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['automaticallyNotifyFollowers']: !(settings === null || settings === void 0 ? void 0 : settings.automaticallyNotifyFollowers) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.automaticallyNotifyFollowers", defaultMessage: "ui.liveStreamForm.automaticallyNotifyFollowers" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.showInProfile), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['showInProfile']: !(settings === null || settings === void 0 ? void 0 : settings.showInProfile) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.showInProfile", defaultMessage: "ui.liveStreamForm.showInProfile" }) }))] })), _jsxs(FormControl, Object.assign({ className: classes.accessView }, { children: [_jsx(InputLabel, Object.assign({ id: "viewLabel" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.view.label", defaultMessage: "ui.liveStreamForm.view.label" }) })), _jsx(Select, Object.assign({ name: "view", label: _jsx(FormattedMessage, { id: "ui.liveStreamForm.view.label", defaultMessage: "ui.liveStreamForm.view.label" }), labelId: "viewLabel", fullWidth: true, value: (_a = settings === null || settings === void 0 ? void 0 : settings.view) !== null && _a !== void 0 ? _a : SCLiveStreamViewType.SPEAKER, onChange: (e) => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['view']: e.target.value })), displayEmpty: true, renderValue: (selected) => {
|
|
56
56
|
return (_jsxs(_Fragment, { children: [_jsx(Icon, Object.assign({ className: classes.accessViewIcon }, { children: selected === SCLiveStreamViewType.SPEAKER ? 'upload' : 'category' })), "\u00A0", _jsx(FormattedMessage, { id: `ui.liveStreamForm.view.${selected}`, defaultMessage: `ui.liveStreamForm.view.${selected}` })] }));
|
|
57
57
|
} }, { children: Object.values(SCLiveStreamViewType).map((f) => (_jsx(MenuItem, Object.assign({ value: f }, { children: _jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsxs("b", { children: [_jsx(Icon, Object.assign({ className: classes.accessViewIcon }, { children: f === SCLiveStreamViewType.SPEAKER ? 'upload' : 'category' })), "\u00A0", _jsx(FormattedMessage, { id: `ui.liveStreamForm.view.${f}`, defaultMessage: `ui.liveStreamForm.view.${f}` })] }) })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: `ui.liveStreamForm.view.${f}.description`, defaultMessage: `ui.liveStreamForm.view.${f}.description` }) })] }) }), f))) }))] }))] })));
|
|
58
58
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { SCLiveStreamViewType } from '@selfcommunity/types';
|
|
2
2
|
export declare const PREFIX = "SCLiveStreamForm";
|
|
3
|
+
/**
|
|
4
|
+
* Default live stream settings
|
|
5
|
+
*/
|
|
3
6
|
export declare const LIVESTREAM_DEFAULT_SETTINGS: {
|
|
4
7
|
muteParticipants: boolean;
|
|
5
8
|
hideParticipantsList: boolean;
|
|
@@ -7,5 +10,6 @@ export declare const LIVESTREAM_DEFAULT_SETTINGS: {
|
|
|
7
10
|
disableVideo: boolean;
|
|
8
11
|
disableChat: boolean;
|
|
9
12
|
disableShareScreen: boolean;
|
|
13
|
+
showInProfile: boolean;
|
|
10
14
|
view: SCLiveStreamViewType;
|
|
11
15
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { SCLiveStreamViewType } from '@selfcommunity/types';
|
|
2
2
|
export const PREFIX = 'SCLiveStreamForm';
|
|
3
|
+
/**
|
|
4
|
+
* Default live stream settings
|
|
5
|
+
*/
|
|
3
6
|
export const LIVESTREAM_DEFAULT_SETTINGS = {
|
|
4
7
|
muteParticipants: true,
|
|
5
8
|
hideParticipantsList: false,
|
|
@@ -7,5 +10,6 @@ export const LIVESTREAM_DEFAULT_SETTINGS = {
|
|
|
7
10
|
disableVideo: true,
|
|
8
11
|
disableChat: false,
|
|
9
12
|
disableShareScreen: true,
|
|
13
|
+
showInProfile: true,
|
|
10
14
|
view: SCLiveStreamViewType.SPEAKER
|
|
11
15
|
};
|
|
@@ -17,6 +17,8 @@ import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
|
17
17
|
import { PreJoin } from './LiveStreamVideoConference/PreJoin';
|
|
18
18
|
import { LiveStreamContext } from './LiveStreamVideoConference/LiveStreamProvider';
|
|
19
19
|
import { useSnackbar } from 'notistack';
|
|
20
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
21
|
+
import BaseDialog from '../../shared/BaseDialog';
|
|
20
22
|
const classes = {
|
|
21
23
|
root: `${PREFIX}-root`,
|
|
22
24
|
content: `${PREFIX}-content`,
|
|
@@ -36,6 +38,11 @@ const Root = styled(Box, {
|
|
|
36
38
|
name: PREFIX,
|
|
37
39
|
slot: 'Root'
|
|
38
40
|
})(({ theme }) => ({}));
|
|
41
|
+
const DialogRoot = styled(BaseDialog, {
|
|
42
|
+
name: PREFIX,
|
|
43
|
+
slot: 'Root',
|
|
44
|
+
overridesResolver: (props, styles) => styles.dialogRoot
|
|
45
|
+
})(({ theme }) => ({}));
|
|
39
46
|
/**
|
|
40
47
|
*> API documentation for the Community-JS LiveStreamRoom component. Learn about the available props and the CSS API.
|
|
41
48
|
*
|
|
@@ -127,7 +134,7 @@ export default function LiveStreamRoom(inProps) {
|
|
|
127
134
|
_msg = intl.formatMessage({ id: _error, defaultMessage: _error });
|
|
128
135
|
}
|
|
129
136
|
setError(_msg);
|
|
130
|
-
enqueueSnackbar(_msg, { variant: 'error'
|
|
137
|
+
enqueueSnackbar(_msg, { variant: 'error' });
|
|
131
138
|
}
|
|
132
139
|
setLoading(false);
|
|
133
140
|
});
|
|
@@ -160,8 +167,8 @@ export default function LiveStreamRoom(inProps) {
|
|
|
160
167
|
/**
|
|
161
168
|
* Renders root object
|
|
162
169
|
*/
|
|
163
|
-
return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, rest, { children: scLiveStream.closed_at_by_host ? (_jsxs(
|
|
170
|
+
return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, rest, { children: scLiveStream.closed_at_by_host ? (_jsx(DialogRoot, Object.assign({ open: true, maxWidth: 'md', fullWidth: true }, { children: _jsxs(DialogContent, Object.assign({ className: classes.endConferenceWrap }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.conference.closed", defaultMessage: "ui.liveStreamRoom.conference.closed" }) })), _jsx(Button, Object.assign({ variant: "contained", color: "secondary", component: Link, to: '/', className: classes.btnBackHome }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.button.backHome", defaultMessage: "ui.liveStreamRoom.button.backHome" }) }))] })) }))) : (_jsx(Box, Object.assign({ className: classes.content, "data-lk-theme": "default" }, { children: connectionDetails === undefined || preJoinChoices === undefined ? (_jsxs(_Fragment, { children: [startPrejoinContent && _jsx(Box, Object.assign({ className: classes.startPrejoinContent }, { children: startPrejoinContent })), (scLiveStream === null || scLiveStream === void 0 ? void 0 : scLiveStream.title) && (_jsx(Typography, Object.assign({ component: 'div', variant: "h5", className: classes.title }, { children: scLiveStream === null || scLiveStream === void 0 ? void 0 : scLiveStream.title }))), (scLiveStream === null || scLiveStream === void 0 ? void 0 : scLiveStream.description) && (_jsx(Typography, Object.assign({ component: 'div', variant: "body1", className: classes.description }, { children: scLiveStream === null || scLiveStream === void 0 ? void 0 : scLiveStream.description }))), _jsxs(Box, Object.assign({ className: classNames(classes.preJoin, { [classes.preJoinLoading]: loading || error }) }, { children: [_jsx(LiveStreamContext.Provider, Object.assign({ value: { liveStream: scLiveStream } }, { children: _jsx(PreJoin, { defaults: preJoinDefaults, onSubmit: handlePreJoinSubmit, onError: handlePreJoinError }) })), loading && (_jsxs(Box, Object.assign({ className: classes.prejoinLoader }, { children: [_jsx(CircularProgress, {}), _jsx(Typography, Object.assign({ component: 'div', variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.connecting", defaultMessage: "ui.liveStreamRoom.connecting" }) }))] })))] })), _jsxs(Box, Object.assign({ className: classes.endPrejoinContent }, { children: [Boolean(scUserContext.user &&
|
|
164
171
|
scUserContext.user.id !== scLiveStream.host.id &&
|
|
165
172
|
scLiveStream &&
|
|
166
|
-
(((_a = scLiveStream.settings) === null || _a === void 0 ? void 0 : _a.muteParticipants) || (scLiveStream && ((_b = scLiveStream.settings) === null || _b === void 0 ? void 0 : _b.disableVideo)))) && (_jsxs(Stack, Object.assign({ sx: { width: '60%' }, spacing: 1 }, { children: [scLiveStream && ((_c = scLiveStream.settings) === null || _c === void 0 ? void 0 : _c.muteParticipants) && (_jsx(Alert, Object.assign({ variant: "
|
|
173
|
+
(((_a = scLiveStream.settings) === null || _a === void 0 ? void 0 : _a.muteParticipants) || (scLiveStream && ((_b = scLiveStream.settings) === null || _b === void 0 ? void 0 : _b.disableVideo)))) && (_jsxs(Stack, Object.assign({ sx: { width: '60%' }, spacing: 1 }, { children: [scLiveStream && ((_c = scLiveStream.settings) === null || _c === void 0 ? void 0 : _c.muteParticipants) && (_jsx(Alert, Object.assign({ variant: "filled", severity: "info", component: 'div' }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.hostDisableMicrophone", defaultMessage: "ui.liveStreamRoom.hostDisableMicrophone" }) }))), scLiveStream && ((_d = scLiveStream.settings) === null || _d === void 0 ? void 0 : _d.disableVideo) && (_jsx(Alert, Object.assign({ variant: "filled", severity: "info" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.hostDisableVideo", defaultMessage: "ui.liveStreamRoom.hostDisableVideo" }) })))] }))), endPrejoinContent] }))] })) : (_jsx(Box, Object.assign({ className: classes.conference }, { children: _jsx(LiveStreamContext.Provider, Object.assign({ value: { liveStream: scLiveStream } }, { children: _jsx(LiveStreamVideoConference, Object.assign({ connectionDetails: connectionDetails, userChoices: preJoinChoices }, LiveStreamVideoConferenceComponentProps)) })) }))) }))) })));
|
|
167
174
|
}
|