-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into worker-timers
- Loading branch information
Showing
29 changed files
with
279 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@stream-io/video-client", | ||
"version": "1.10.3", | ||
"version": "1.10.5", | ||
"packageManager": "[email protected]", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.es.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@stream-io/video-react-bindings", | ||
"version": "1.1.14", | ||
"version": "1.1.16", | ||
"packageManager": "[email protected]", | ||
"main": "./dist/index.cjs.js", | ||
"module": "./dist/index.es.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
...ative-sdk/docusaurus/docs/reactnative/05-ui-cookbook/19-call-quality-rating.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
id: call-quality-rating | ||
title: Call Quality Rating | ||
--- | ||
|
||
## Introduction | ||
|
||
In this guide, we are going to show how one can build a call quality rating form on top of our React Native Video SDK. | ||
It is a good practice to ask your end users about their overall experience after the end of the call or, while being in a call. | ||
|
||
Here is a preview of the component we are going to build: | ||
![Preview of the UI](../assets/05-ui-cookbook/19-call-quality-rating/feedback.png) | ||
|
||
## Submit Feedback API | ||
|
||
Our React Native Video SDK provides an API for collecting this feedback which later can be seen in the call stats section of our dashboard. | ||
|
||
```ts | ||
await call.submitFeedback( | ||
rating, // a rating grade from 1 - 5, | ||
{ | ||
reason: '<no-message-provided>', // optional reason message | ||
custom: { | ||
// ... any extra properties that you wish to collect | ||
}, | ||
} | ||
); | ||
``` | ||
|
||
## Implementation | ||
|
||
```tsx | ||
import React, { useState } from 'react'; | ||
import { | ||
View, | ||
Text, | ||
TouchableOpacity, | ||
StyleSheet, | ||
Modal, | ||
Image, | ||
} from 'react-native'; | ||
import { useCall } from '@stream-io/video-react-native-sdk'; | ||
import Star from '../assets/Star'; | ||
import Close from '../assets/Close'; | ||
|
||
const FeedbackModal: = () => { | ||
const call = useCall(); | ||
const [selectedRating, setSelectedRating] = useState<number | null>(null); | ||
|
||
const handleRatingPress = (rating: number) => { | ||
setSelectedRating(rating); | ||
await call | ||
?.submitFeedback(Math.min(Math.max(1, rating), 5), { | ||
reason: '<no-message-provided>', | ||
}) | ||
.catch((err) => console.warn('Failed to submit call feedback', err)); | ||
}; | ||
|
||
return ( | ||
<Modal | ||
transparent | ||
visible={visible} | ||
onRequestClose={onClose} | ||
> | ||
<TouchableOpacity style={styles.overlay} onPress={onClose}> | ||
<View style={[styles.modal]}> | ||
<View style={styles.top}> | ||
<View style={styles.topRight}> | ||
<TouchableOpacity onPress={onClose} style={[styles.closeButton]}> | ||
<IconWrapper> | ||
<Close | ||
color={colors.typeSecondary} | ||
size={variants.roundButtonSizes.sm} | ||
/> | ||
</IconWrapper> | ||
</TouchableOpacity> | ||
</View> | ||
</View> | ||
<Image source={require('../assets/feedbackLogo.png')} /> | ||
<View style={styles.textContainer}> | ||
<Text style={styles.title}>We Value Your Feedback!</Text> | ||
<Text style={styles.subtitle}> | ||
Tell us about your video call experience. | ||
</Text> | ||
</View> | ||
<View style={styles.ratingContainer}> | ||
{[1, 2, 3, 4, 5].map((rating) => ( | ||
<TouchableOpacity | ||
key={rating} | ||
onPress={() => handleRatingPress(rating)} | ||
style={[styles.ratingButton]} | ||
> | ||
<Star | ||
color={ | ||
selectedRating && selectedRating >= rating | ||
? colors.iconAlertSuccess | ||
: colors.typeSecondary | ||
} | ||
/> | ||
</TouchableOpacity> | ||
))} | ||
</View> | ||
<View style={styles.bottom}> | ||
<View style={styles.left}> | ||
<Text style={styles.text}>Very Bad</Text> | ||
</View> | ||
<View style={styles.right}> | ||
<Text style={styles.text}>Very Good</Text> | ||
</View> | ||
</View> | ||
</View> | ||
</TouchableOpacity> | ||
</Modal> | ||
); | ||
}; | ||
``` | ||
|
||
:::note | ||
For simplicity, the StyleSheet is not included in this guide. | ||
::: |
Binary file added
BIN
+188 KB
...urus/docs/reactnative/assets/05-ui-cookbook/19-call-quality-rating/feedback.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@stream-io/video-react-native-sdk", | ||
"version": "1.2.12", | ||
"version": "1.2.14", | ||
"packageManager": "[email protected]", | ||
"main": "dist/commonjs/index.js", | ||
"module": "dist/module/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@stream-io/video-react-sdk", | ||
"version": "1.7.9", | ||
"version": "1.7.12", | ||
"packageManager": "[email protected]", | ||
"main": "./dist/index.cjs.js", | ||
"module": "./dist/index.es.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.