Skip to content

Commit e347d29

Browse files
Merge pull request #170 from apivideo/documentation-android-player-analytics
[SDK README - api.video-android-player-analytics] README to documentation synchro
2 parents ba59911 + af4bffb commit e347d29

File tree

1 file changed

+51
-21
lines changed

1 file changed

+51
-21
lines changed

sdks/player/apivideo-android-player-analytics.md

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ title: api.video Android Player analytics plugin
33
meta:
44
description: The official api.video Android Player analytics plugin for api.video. [api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
55
---
6+
<!--
7+
THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT!
8+
IF YOU NEED TO CHANGE THIS FILE, CREATE A PR IN THE SOURCE REPOSITORY.
9+
-->
610

711
# api.video Android Player analytics plugin
812

9-
[api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast
10-
video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in
11-
your app.
13+
[api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
1214

1315
## Project description
1416

1517
Android library to manually call the api.video analytics collector.
1618

1719
This is useful if you are using a video player for which we do not yet provide a ready-to-use
18-
monitoring module.
19-
20-
This module also supports ExoPlayer analytics.
20+
monitoring module.
2121

2222
## Getting started
2323

@@ -29,7 +29,7 @@ In your module `build.gradle`, add the following code in `dependencies`:
2929

3030
```groovy
3131
dependencies {
32-
implementation 'video.api:android-player-analytics:1.4.0'
32+
implementation 'video.api:android-player-analytics:2.0.2'
3333
}
3434
```
3535

@@ -71,25 +71,55 @@ events.
7171

7272
### ApiVideoPlayerAnalytics API
7373

74-
- Event time or current time
74+
#### Event time or current time
7575

7676
If you know the event timestamp, you can use it as the `eventTime` parameter. If you don't know the
7777
event timestamp, you can set the `currentTime` parameter with a scheduler.
7878

79-
#### Methods
79+
**`play(eventTime: Float = currentTime): Future<void>`**
80+
81+
method to call when the video starts playing for the first time (in the case of a resume after
82+
83+
paused, use `resume()`)
84+
85+
**`resume(eventTime: Float = currentTime): Future<void>`**
86+
87+
method to call when the video playback is resumed after a pause
88+
89+
90+
**`ready(eventTime: Float = currentTime): Future<void>`**
91+
92+
method to call once the player is ready to play the media
93+
94+
95+
**`end(eventTime: Float = currentTime): Future<void>`**
96+
97+
method to call when the video is ended
98+
8099

81-
| Method | Description |
82-
|----------|----------|
83-
| `play(eventTime: Float = currentTime): Future<void>` | method to call when the video starts playing for the first time (in the case of a resume after paused, use `resume()`) |
84-
| `resume(eventTime: Float = currentTime): Future<void>` | method to call when the video playback is resumed after a pause |
85-
| `ready(eventTime: Float = currentTime): Future<void>` | method to call once the player is ready to play the media |
86-
| `end(eventTime: Float = currentTime): Future<void>` | method to call when the video is ended |
87-
| `seek(from: Float, to: Float): Future<void>` | method to call when a seek event occurs, the `from` and `to` parameters are mandatory and should contain the seek start & end times in seconds |
88-
| `pause(eventTime: Float = currentTime): Future<void>` | method to call when the video is paused |
89-
| `destroy(eventTime: Float = currentTime): Future<void>` | method to call when the video player is disposed (eg. when the use closes the navigation tab) |
90-
| `currentTime` | field to call each time the playback time changes (it should be called often, the accuracy of the collected data depends on it) if you don't know event time. |
100+
**`seek(from: Float, to: Float): Future<void>`**
101+
102+
method to call when a seek event occurs, the `from` and `to` parameters are mandatory and should
103+
104+
contains the seek start & end times in seconds
105+
106+
**`pause(eventTime: Float = currentTime): Future<void>`**
107+
108+
method to call when the video is paused
109+
110+
111+
**`destroy(eventTime: Float = currentTime): Future<void>`**
112+
113+
method to call when the video player is disposed (eg. when the use closes the navigation tab)
114+
115+
116+
**`currentTime`**
117+
118+
field to call each time the playback time changes (it should be called often, the accuracy of the
119+
120+
collected data depends on it) if you don't know event time.
91121

92122
### API documentation
93123

94-
A complete [API documentation](https://apivideo.github.io/api.video-android-player-analytics/) is
95-
available.
124+
A complete [API documentation](https://apivideo.github.io/api.video-android-player-analytics/) is available.
125+

0 commit comments

Comments
 (0)