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