@stream-io/video-react-sdk 1.0.12 → 1.0.13
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 +7 -0
- package/dist/index.cjs.js +24 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +25 -3
- package/dist/index.es.js.map +1 -1
- package/dist/src/wrappers/LivestreamPlayer/LivestreamPlayer.d.ts +16 -0
- package/dist/src/wrappers/LivestreamPlayer/index.d.ts +1 -0
- package/dist/src/wrappers/index.d.ts +1 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/src/wrappers/LivestreamPlayer/LivestreamPlayer.tsx +49 -0
- package/src/wrappers/LivestreamPlayer/index.ts +1 -0
- package/src/wrappers/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [1.0.13](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.0.12...@stream-io/video-react-sdk-1.0.13) (2024-05-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* add LivestreamPlayer wrapper component ([#1372](https://github.com/GetStream/stream-video-js/issues/1372)) ([49e9b98](https://github.com/GetStream/stream-video-js/commit/49e9b980eff548f62f8aa45e6156cfa3dd40dcbd))
|
|
11
|
+
|
|
5
12
|
### [1.0.12](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.0.11...@stream-io/video-react-sdk-1.0.12) (2024-05-23)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -2569,7 +2569,29 @@ const VerticalScrollButtons = ({ scrollWrapper, }) => {
|
|
|
2569
2569
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [scrollPosition && scrollPosition !== 'top' && (jsxRuntime.jsx(IconButton, { onClick: scrollTopClickHandler, icon: "caret-up", className: "str-video__speaker-layout__participants-bar--button-top" })), scrollPosition && scrollPosition !== 'bottom' && (jsxRuntime.jsx(IconButton, { onClick: scrollBottomClickHandler, icon: "caret-down", className: "str-video__speaker-layout__participants-bar--button-bottom" }))] }));
|
|
2570
2570
|
};
|
|
2571
2571
|
|
|
2572
|
-
const
|
|
2572
|
+
const LivestreamPlayer = (props) => {
|
|
2573
|
+
const { callType, callId, layoutProps } = props;
|
|
2574
|
+
const client = videoReactBindings.useStreamVideoClient();
|
|
2575
|
+
const [call, setCall] = react.useState();
|
|
2576
|
+
react.useEffect(() => {
|
|
2577
|
+
if (!client)
|
|
2578
|
+
return;
|
|
2579
|
+
const myCall = client.call(callType, callId);
|
|
2580
|
+
setCall(myCall);
|
|
2581
|
+
myCall.join().catch((e) => {
|
|
2582
|
+
console.error('Failed to join call', e);
|
|
2583
|
+
});
|
|
2584
|
+
return () => {
|
|
2585
|
+
myCall.leave().catch((e) => {
|
|
2586
|
+
console.error('Failed to leave call', e);
|
|
2587
|
+
});
|
|
2588
|
+
setCall(undefined);
|
|
2589
|
+
};
|
|
2590
|
+
}, [callId, callType, client]);
|
|
2591
|
+
return (jsxRuntime.jsx(StreamCall, { call: call, children: jsxRuntime.jsx(LivestreamLayout, { ...layoutProps }) }));
|
|
2592
|
+
};
|
|
2593
|
+
|
|
2594
|
+
const [major, minor, patch] = ("1.0.13" ).split('.');
|
|
2573
2595
|
videoClient.setSdkInfo({
|
|
2574
2596
|
type: videoClient.SfuModels.SdkType.REACT,
|
|
2575
2597
|
major,
|
|
@@ -2614,6 +2636,7 @@ exports.GenericMenuButtonItem = GenericMenuButtonItem;
|
|
|
2614
2636
|
exports.Icon = Icon;
|
|
2615
2637
|
exports.IconButton = IconButton;
|
|
2616
2638
|
exports.LivestreamLayout = LivestreamLayout;
|
|
2639
|
+
exports.LivestreamPlayer = LivestreamPlayer;
|
|
2617
2640
|
exports.LoadingCallRecordingListing = LoadingCallRecordingListing;
|
|
2618
2641
|
exports.LoadingIndicator = LoadingIndicator;
|
|
2619
2642
|
exports.MenuToggle = MenuToggle;
|