-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(react-native): live stream components for host and viewer #1135
feat(react-native): live stream components for host and viewer #1135
Conversation
packages/react-native-sdk/docusaurus/docs/reactnative/02-tutorials/03-livestream.mdx
Show resolved
Hide resolved
...ages/react-native-sdk/src/components/Livestream/LiveStreamControls/HostStartStreamButton.tsx
Outdated
Show resolved
Hide resolved
...ges/react-native-sdk/src/components/Livestream/LiveStreamControls/HostLiveStreamControls.tsx
Outdated
Show resolved
Hide resolved
...s/react-native-sdk/src/components/Livestream/LiveStreamControls/ViewerLiveStreamControls.tsx
Outdated
Show resolved
Hide resolved
refactor: change component names refactor: change component names refactor: remove livestream dir to solve case issue refactor: remove livestream dir to solve case issue refactor: change component names refactor: change component names and directory structure
a0bc93c
to
251f33d
Compare
...react-native-sdk/docusaurus/docs/reactnative/04-ui-components/livestream/host-livestream.mdx
Outdated
Show resolved
Hide resolved
...act-native-sdk/docusaurus/docs/reactnative/04-ui-components/livestream/viewer-livestream.mdx
Outdated
Show resolved
Hide resolved
...react-native-sdk/docusaurus/docs/reactnative/04-ui-components/livestream/host-livestream.mdx
Outdated
Show resolved
Hide resolved
- A complete live stream UI with ability to stream host's video. | ||
- Duration of the live stream with live indicator. | ||
- Whether the stream is live and number of participant's watching the stream. | ||
- Media controls to control publish and un-publish stream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Media controls to control publish and un-publish stream. | |
- Media controls to start and end the livestream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✅
...act-native-sdk/docusaurus/docs/reactnative/04-ui-components/livestream/viewer-livestream.mdx
Outdated
Show resolved
Hide resolved
...react-native-sdk/docusaurus/docs/reactnative/04-ui-components/livestream/host-livestream.mdx
Outdated
Show resolved
Hide resolved
call?.off('call.live_started', handleLiveStarted); | ||
call?.off('call.updated', handleLiveEnded); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of off
, use the unsubscribe functions returned by on
function. We ran into some issue with current approach on chat in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @vishalnarkhede
packages/react-native-sdk/src/components/Livestream/LivestreamTopView/DurationBadge.tsx
Outdated
Show resolved
Hide resolved
…hal87/react-native-livestream-components
{ | ||
backgroundColor: colors.static_grey, | ||
}, | ||
hostLiveStream.container, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hostLiveStream.container, | |
hostLivestream.container, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if there are any more such instances needed to be fixed
|
||
const onStartStreamButtonPress = async () => { | ||
if (onStartStreamHandler) { | ||
onStartStreamHandler(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we return after this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the other handler related props that we have in SDK, are implemented with purpose of being able to replace default logic. So I think we should be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Thanks for spotting it. 😄
height: iconSizes.sm, | ||
width: iconSizes.sm, | ||
}, | ||
liveStreamAudioControlButton.icon, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
liveStreamAudioControlButton.icon, | |
livestreamAudioControlButton.icon, |
@@ -0,0 +1,5 @@ | |||
Component to customize the leave stream button on the viewer's end live stream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Component to customize the leave stream button on the viewer's end live stream. | |
Component to customize the leave stream button for the viewer. |
Just simplifying the language
@@ -0,0 +1,5 @@ | |||
Handler to be called when the viewer's leave stream button is called. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handler to be called when the viewer's leave stream button is called. | |
Handler to be called when the leave stream button is pressed by the viewer. |
This PR focuses on introducing the LiveStream components for RN SDK.
This focuses on two main components:
HostLiveStream
- https://staging.getstream.io/video/docs/reactnative/ui-components/livestream/host-live-stream/ViewerLiveStream
- https://staging.getstream.io/video/docs/reactnative/ui-components/livestream/viewer-live-stream/Almost all of the subcomponents within the above two components are customizable. The components are mainly divided into the TopView, Layout, and Controls components.
The TopView component internally consists of
DurationBadge
,LiveIndicator
, andFollowerCount
component that displays the duration of the live stream, whether the live stream is active and the follower count displays the number of people lives in the call.The Controls View consists of
HostStartStreamButton
,ViewerLeaveStreamButton
, and theLiveStreamMediaControls
.The
LiveStreamLayout
component is responsible for showing the screen sharing and the video stream of the host.The component docs are also added.