@100mslive/roomkit-react 0.2.6 → 0.2.7-alpha.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.
Files changed (28) hide show
  1. package/README.md +30 -33
  2. package/dist/{HLSView-A5DVXKEU.js → HLSView-4B5MUDFR.js} +2 -2
  3. package/dist/Prebuilt/common/constants.d.ts +4 -3
  4. package/dist/Prebuilt/components/AudioVideoToggle.d.ts +9 -0
  5. package/dist/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.d.ts +11 -0
  6. package/dist/Prebuilt/components/hooks/useAudioOutputTest.d.ts +8 -0
  7. package/dist/{chunk-KUVM2TEZ.js → chunk-KST24BRA.js} +4227 -3807
  8. package/dist/chunk-KST24BRA.js.map +7 -0
  9. package/dist/index.cjs.js +5518 -5092
  10. package/dist/index.cjs.js.map +4 -4
  11. package/dist/index.js +1 -1
  12. package/dist/meta.cjs.json +666 -597
  13. package/dist/meta.esbuild.json +673 -604
  14. package/package.json +7 -6
  15. package/src/Prebuilt/common/constants.ts +7 -4
  16. package/src/Prebuilt/components/AppData/useUISettings.js +1 -1
  17. package/src/Prebuilt/components/AudioVideoToggle.tsx +308 -0
  18. package/src/Prebuilt/components/Footer/RoleOptions.tsx +1 -0
  19. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +159 -0
  20. package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +0 -2
  21. package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +13 -2
  22. package/src/Prebuilt/components/Notifications/Notifications.tsx +1 -18
  23. package/src/Prebuilt/components/Settings/DeviceSettings.jsx +10 -17
  24. package/src/Prebuilt/components/hooks/useAudioOutputTest.tsx +20 -0
  25. package/dist/chunk-KUVM2TEZ.js.map +0 -7
  26. package/src/Prebuilt/components/AudioVideoToggle.jsx +0 -171
  27. package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.jsx +0 -121
  28. /package/dist/{HLSView-A5DVXKEU.js.map → HLSView-4B5MUDFR.js.map} +0 -0
@@ -0,0 +1,20 @@
1
+ import { useEffect, useRef, useState } from 'react';
2
+
3
+ export const useAudioOutputTest = ({ deviceId }: { deviceId: string }) => {
4
+ const audioRef = useRef<HTMLAudioElement | null>(null);
5
+ const [playing, setPlaying] = useState(false);
6
+ useEffect(() => {
7
+ if (audioRef.current && deviceId) {
8
+ try {
9
+ // @ts-ignore
10
+ if (typeof audioRef.current.setSinkId !== 'undefined') {
11
+ // @ts-ignore
12
+ audioRef.current.setSinkId(deviceId);
13
+ }
14
+ } catch (error) {
15
+ console.log(error);
16
+ }
17
+ }
18
+ }, [deviceId]);
19
+ return { playing, setPlaying, audioRef };
20
+ };