@stream-io/video-react-sdk 1.39.3 → 1.40.0
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/CHANGELOG.md +18 -1
- package/dist/css/embedded.css +69 -0
- package/dist/css/embedded.css.map +1 -1
- package/dist/css/styles.css +69 -0
- package/dist/css/styles.css.map +1 -1
- package/dist/embedded.cjs.js +20 -3
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +20 -3
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +22 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +22 -5
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.d.ts +14 -1
- package/dist/src/translations/index.d.ts +2 -0
- package/package.json +6 -6
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +49 -0
- package/src/translations/en.json +3 -0
package/dist/embedded.cjs.js
CHANGED
|
@@ -1210,7 +1210,7 @@ const SpeakerTest = (props) => {
|
|
|
1210
1210
|
const audioElementRef = react.useRef(null);
|
|
1211
1211
|
const [isPlaying, setIsPlaying] = react.useState(false);
|
|
1212
1212
|
const { t } = videoReactBindings.useI18n();
|
|
1213
|
-
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.
|
|
1213
|
+
const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.40.0"}/assets/piano.mp3`, } = props;
|
|
1214
1214
|
// Update audio output device when selection changes
|
|
1215
1215
|
react.useEffect(() => {
|
|
1216
1216
|
const audio = audioElementRef.current;
|
|
@@ -1896,15 +1896,30 @@ const DefaultScreenShareOverlay = () => {
|
|
|
1896
1896
|
};
|
|
1897
1897
|
return (jsxRuntime.jsxs("div", { className: "str-video__screen-share-overlay", children: [jsxRuntime.jsx(Icon, { icon: "screen-share-off" }), jsxRuntime.jsx("span", { className: "str-video__screen-share-overlay__title", children: t('You are presenting your screen') }), jsxRuntime.jsxs("button", { onClick: stopScreenShare, type: "button", className: "str-video__screen-share-overlay__button", children: [jsxRuntime.jsx(Icon, { icon: "close" }), " ", t('Stop Screen Sharing')] })] }));
|
|
1898
1898
|
};
|
|
1899
|
-
|
|
1899
|
+
/**
|
|
1900
|
+
* Rendered over a remote participant's tile when the browser's autoplay policy
|
|
1901
|
+
* has blocked their audio. Selecting it calls `call.resumeAudio()`, unblocking
|
|
1902
|
+
* every blocked element at once.
|
|
1903
|
+
*/
|
|
1904
|
+
const DefaultAudioBlockedNotification = () => {
|
|
1905
|
+
const call = videoReactBindings.useCall();
|
|
1906
|
+
const { t } = videoReactBindings.useI18n();
|
|
1907
|
+
return (jsxRuntime.jsx("button", { type: "button", className: "str-video__audio-blocked-notification", onClick: call?.resumeAudio, "aria-live": "polite", children: jsxRuntime.jsxs("span", { className: "str-video__audio-blocked-notification__message", children: [jsxRuntime.jsx(Icon, { icon: "speaker" }), jsxRuntime.jsxs("span", { className: "str-video__audio-blocked-notification__text", children: [jsxRuntime.jsx("span", { className: "str-video__audio-blocked-notification__title", children: t('Audio is blocked by your system') }), jsxRuntime.jsx("span", { className: "str-video__audio-blocked-notification__subtitle", children: t('Click or tap to play audio') })] })] }) }));
|
|
1908
|
+
};
|
|
1909
|
+
const DefaultParticipantViewUI = ({ indicatorsVisible = true, menuPlacement = 'bottom-start', showMenuButton = true, ParticipantActionsContextMenu: ParticipantActionsContextMenu$1 = ParticipantActionsContextMenu, AudioBlockedNotification = DefaultAudioBlockedNotification, }) => {
|
|
1900
1910
|
const { participant, trackType } = useParticipantViewContext();
|
|
1911
|
+
const { useAutoplayBlockedSessionIds } = videoReactBindings.useCallStateHooks();
|
|
1912
|
+
const blockedSessionIds = useAutoplayBlockedSessionIds();
|
|
1901
1913
|
const isScreenSharing = videoClient.hasScreenShare(participant);
|
|
1914
|
+
const shouldShowAudioBlockedNotification = !participant.isLocalParticipant &&
|
|
1915
|
+
trackType !== 'screenShareTrack' &&
|
|
1916
|
+
blockedSessionIds.includes(participant.sessionId);
|
|
1902
1917
|
if (participant.isLocalParticipant &&
|
|
1903
1918
|
isScreenSharing &&
|
|
1904
1919
|
trackType === 'screenShareTrack') {
|
|
1905
1920
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DefaultScreenShareOverlay, {}), jsxRuntime.jsx(ParticipantDetails, { indicatorsVisible: indicatorsVisible })] }));
|
|
1906
1921
|
}
|
|
1907
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showMenuButton && (jsxRuntime.jsx(MenuToggle, { strategy: "fixed", placement: menuPlacement, ToggleButton: ToggleButton, children: jsxRuntime.jsx(ParticipantActionsContextMenu$1, {}) })), jsxRuntime.jsx(Reaction, { participant: participant }), jsxRuntime.jsx(ParticipantDetails, { indicatorsVisible: indicatorsVisible })] }));
|
|
1922
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showMenuButton && (jsxRuntime.jsx(MenuToggle, { strategy: "fixed", placement: menuPlacement, ToggleButton: ToggleButton, children: jsxRuntime.jsx(ParticipantActionsContextMenu$1, {}) })), jsxRuntime.jsx(Reaction, { participant: participant }), jsxRuntime.jsx(ParticipantDetails, { indicatorsVisible: indicatorsVisible }), AudioBlockedNotification && shouldShowAudioBlockedNotification && (jsxRuntime.jsx(AudioBlockedNotification, {}))] }));
|
|
1908
1923
|
};
|
|
1909
1924
|
const ParticipantDetails = ({ indicatorsVisible = true, }) => {
|
|
1910
1925
|
const { participant, trackType } = useParticipantViewContext();
|
|
@@ -2061,6 +2076,8 @@ var en = {
|
|
|
2061
2076
|
"You have no permission to share your audio": "You have no permission to share your audio",
|
|
2062
2077
|
"You are presenting your screen": "You are presenting your screen",
|
|
2063
2078
|
"Stop Screen Sharing": "Stop Screen Sharing",
|
|
2079
|
+
"Audio is blocked by your system": "Audio is blocked by your system",
|
|
2080
|
+
"Click or tap to play audio": "Click or tap to play audio",
|
|
2064
2081
|
Allow: Allow,
|
|
2065
2082
|
Revoke: Revoke,
|
|
2066
2083
|
Dismiss: Dismiss,
|