Skip to content

Commit 88ebf30

Browse files
authored
Bugfix/documentation
1 parent c69e77d commit 88ebf30

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: api.video Android Databus
3+
meta:
4+
description: The official api.video Android Databus library for
5+
api.video. [api.video](https://api.video/) is the video infrastructure for product builders.
6+
Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live
7+
streaming features in your app.
8+
---
9+
<!--
10+
THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT!
11+
IF YOU NEED TO CHANGE THIS FILE, CREATE A PR IN THE SOURCE REPOSITORY.
12+
-->
13+
14+
15+
## Project description
16+
17+
This library sends player events from the player to api.video.
18+
19+
## Getting started
20+
21+
### Installation
22+
23+
#### Gradle
24+
25+
For ExoPlayer, add the following code in your module `build.gradle`:
26+
27+
```groovy
28+
dependencies {
29+
implementation 'video.api.databus:android-databus-exoplayer:0.9.0'
30+
}
31+
```
32+
33+
### Code sample
34+
35+
Register the ExoPlayer Databus agent with:
36+
37+
```kotlin
38+
import androidx.media3.exoplayer.ExoPlayer
39+
import video.api.databus.exoplayer.extensions.addDatabusAgent
40+
41+
val exoplayer = ExoPlayer.Builder(context).build()
42+
val agent =
43+
exoplayer.addDatabusAgent() // Register the Databus agent so it sends player events to api.video.
44+
45+
// Remove the Databus agent when you don't need it anymore.
46+
exoplayer.removeAnalyticsListener(agent)
47+
```
48+
49+
For a custom domain collector, use:
50+
51+
```kotlin
52+
val agent =
53+
exoplayer.addDatabusAgent(collectorUrl = "https://collector.mycustomdomain.com") // Register the Databus agent so it sends player events to api.video.
54+
```
55+
56+
## FAQ
57+
58+
If you have any questions, ask us in the [community](https://community.api.video).

0 commit comments

Comments
 (0)