-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
353 additions
and
229 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
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
File renamed without changes.
55 changes: 55 additions & 0 deletions
55
docusaurus/docs/Android/05-ui-cookbook/16-watching-livestream.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,55 @@ | ||
# Watching a Livestream | ||
|
||
This guide describes how to watch a livestream using our SDK. | ||
|
||
:::note | ||
- Read our [tutorial](https://getstream.io/video/sdk/android/tutorial/livestreaming) for more info on how to implement livestreaming host and viewer apps. | ||
- Go to the [HLS section](https://getstream.io/video/sdk/android/tutorial/livestreaming/#optional-viewing-a-livestream-with-hls) of our tutorial to find out how to view a HLS livestream. | ||
::: | ||
|
||
If you want to watch a WebRTC livestream, then you can either use our `LivestreamPlayer`, or build your own component. | ||
|
||
## LivestreamPlayer UI component | ||
|
||
The `LivestreamPlayer` component shows the following information: | ||
|
||
- _live_ indicator | ||
- number of participants | ||
- duration | ||
- _pause/resume_ on tap functionality | ||
- _mute/unmute_ incoming sound | ||
|
||
### Basic usage | ||
|
||
For standard usage, you just need to pass a `call` object: | ||
|
||
```kotlin | ||
LivestreamPlayer(call = call) | ||
``` | ||
|
||
![watching-livestream-1.png](../assets/cookbook/watching-livestream-1.png) | ||
|
||
### Customization | ||
|
||
This is the full signature of the component: | ||
|
||
```kotlin | ||
@Composable | ||
public fun LivestreamPlayer( | ||
modifier: Modifier = Modifier, | ||
call: Call, | ||
enablePausing: Boolean, | ||
onPausedPlayer: ((isPaused: Boolean) -> Unit)?, | ||
backstageContent: @Composable BoxScope.(Call) -> Unit, | ||
rendererContent: @Composable BoxScope.(Call) -> Unit, | ||
overlayContent: @Composable BoxScope.(Call) -> Unit | ||
) | ||
``` | ||
|
||
- `modifier`: Used to apply styling to the component, such as extra borders, background, elevation, size or shape and more. | ||
- `call`: The livestream call to watch. | ||
- `enablePausing`: Controls the _pause/resume_ on tap functionality. | ||
- `onPausedPlayer`: Event handler for the _pause/resume_ on tap event. | ||
- `backstageContent`: Content to show when the call is in backstage mode (i.e. the host has not started the livestream yet) | ||
- `rendererContent`: Used to control how the video feed is rendered on screen. By default, it uses the `VideoRenderer` component under the hood. | ||
- `overlayContent`: Used for customizing the overlay that contains participant count, duration and other info. |
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
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
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.