Skip to content

Commit

Permalink
Fix duplicate H1 headers
Browse files Browse the repository at this point in the history
  • Loading branch information
szekelyzol committed Oct 12, 2023
1 parent 28491ab commit f47bc0a
Show file tree
Hide file tree
Showing 24 changed files with 634 additions and 1,069 deletions.
23 changes: 11 additions & 12 deletions templates/documentation/delivery-analytics/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ metadata:
description: "Learn how you can get data insights for your videos and live streams using api.video's Analytics solution."
---

Analytics & data
=============
# Analytics & data

api.video enables you to collect play event data about your videos and live streams.

Expand All @@ -20,7 +19,7 @@ Use this data to understand your audience, or integrate the data directly into y

Visit the **[Analytics](https://dashboard.api.video/analytics)** page on the Dashboard to get started and see your data visualized!

# How it works
## How it works

api.video's solution uses playback data to analyze and segment your viewers.

Expand All @@ -33,7 +32,7 @@ api.video's solution uses playback data to analyze and segment your viewers.

After play events are collected, there is a short delay while the API processes the data. api.video recommends that you retrieve Analytics periodically, for example once every minute. This enables you to keep track of live stream engagement or manage user-generated content without delay.

## Requirements
### Requirements

{% capture content %}
The Analytics feature is available using api.video's video player. Check out the [Video Player SDK](/sdks/player/apivideo-player-sdk) for details about the implementation.
Expand All @@ -43,7 +42,7 @@ When using third-party players, you need to implement the [Video.js](/sdks/playe
{% include "_partials/callout.html" kind: "info", content: content %}


# Usage
## Usage

Api.video offers 2 dedicated API endpoints for analytics:

Expand All @@ -59,7 +58,7 @@ You can test the Analytics endpoints **in api.video's sandbox environment**. Che
{% endcapture %}
{% include "_partials/callout.html" kind: "info", content: content %}

## Request
### Request

The endpoints accept `GET` requests. You must provide 2 **required** query parameters in your requests: `from` and `dimension`. You can also provide 2 **optional** query parameters: `to`, and `filter`.

Expand All @@ -84,7 +83,7 @@ api.video retains play event data for 30 days. If you select a time period that
| `to` | `date` | `false` | Use this optional query parameter to set the end date for the time period that you want analytics for.<br> <br>- The API returns analytics data **excluding** the day you set in `to`.<br>- If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and **excluding** today.<br>- A valid date value is only **within the last 30 days**.<br>- The value you provide must follow the `YYYY-MM-DD` format. |
| `filter` | `key-value pair` | `false` | Use this parameter to filter your results to a specific video or live stream in a project that you want analytics for.<br><br>You must use the `videoId:` or `liveStreamId:` prefix when specifying an identifier for a video or a live stream.<br><br>Note that the **Get play events for videos** endpoint only accepts video `ID` as a filter, and the **Get play events for live streams** endpoint only accepts live stream `ID` as a filter. |

### Dimension
#### Dimension

This parameter enables you to define a single property that you want analytics for. You can select only **one property** in your request.

Expand All @@ -98,14 +97,14 @@ This parameter enables you to define a single property that you want analytics f
| `operatingSystem` | the operating system used during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. |
| `browser` | the browser used during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. |

## Response
### Response

Based on your request the Analytics API returns paginated play event data in an array of objects. Each object contains these analytics fields:

- `value`: shows a value for the property you have specified for `dimension` in your request. For example, if you requested `dimension=browser`, each `value` field in the response returns a type of browser that was used during the play events.
- `plays`: shows the number of play events for one specific `value`.

### Structure
#### Structure

```json
{
Expand Down Expand Up @@ -149,7 +148,7 @@ Based on your request the Analytics API returns paginated play event data in an
| `value` | `string` | The value of the dimension that you've selected in the request. You can find the possible [dimensions in the table above](#dimension). |
| `plays` | `int` | The number of play events that was returned for the dimension in question |

### Examples
#### Examples

You can find sample responses for some common analytics parameters here:

Expand Down Expand Up @@ -260,7 +259,7 @@ This example uses the sandbox environment's `{base_URL}`. Check out the [API env

<br>

# Best practices
## Best practices

To ensure that your Analytics implementation runs smoothly, make sure that you:

Expand All @@ -269,7 +268,7 @@ To ensure that your Analytics implementation runs smoothly, make sure that you:
- only select **one** property for `dimension` in your request.
- use the `videoId:` or `liveStreamId:` prefix appropriately when using the `filter` parameter.

# What's next
## What's next

Check out the **[API reference](/reference/api/Analytics)** for sample responses and errors, and more details about using the Analytics endpoint.

Expand Down
11 changes: 4 additions & 7 deletions templates/documentation/reference/invalid-query-parameter.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@
title: "Invalid Query Parameter"
slug: "invalid-query-parameter"
metadata:
title: "Invalid Attribute"
title: "Invalid Query Parameter"
description: "You sent in a query parameter that doesn't exist, isn't correct for the endpoint you're using, or has a bad value."
---

Invalid Query Parameter
=================
# Invalid Query Parameter

You sent in a query parameter that doesn't exist, isn't correct for the endpoint you're using, or has a bad value.

# Solution
## Solution

If you're not using one of our API clients, check our documentation for the endpoint you're using and make sure the parameters are set up correctly in your request.

If you are using one of our API clients, check the rules for how to format parameters within your client. They are not always identical to how they would be sent if you weren't using an API client.

# Learning resources
If you are using one of our API clients, check the rules for how to format parameters within your client. They are not always identical to how they would be sent if you weren't using an API client.

## Tools

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,19 @@ metadata:
description: "The official Flutter RTMP live stream client 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."
---

Flutter RTMP Live stream Client
============================
# Flutter RTMP Live stream Client

[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.

# Table of contents

- [Table of contents](#table-of-contents)
- [Project description](#project-description)
- [Getting started](#getting-started)
- [Installation](#installation)
- [Permissions](#permissions)
- [Code sample](#code-sample)
- [Example App](#example-app)
- [Setup](#setup)
- [Android](#android)
- [iOS](#ios)
- [Plugins](#plugins)
- [FAQ](#faq)

# Project description
## Project description

This module is made for broadcasting RTMP live stream from smartphone camera.

# Getting started
## Getting started

## Installation
### Installation

In your pubspec.yaml file, add the following:

Expand All @@ -49,7 +33,7 @@ In your dart file, import the package:
import 'package:apivideo_live_stream/apivideo_live_stream.dart';
```

## Permissions
### Permissions

To be able to broadcast, you must:

Expand All @@ -75,7 +59,7 @@ The library will require android.permission.CAMERA and android.permission.RECORD
<key>NSMicrophoneUsageDescription</key><string>Your own description of the purpose</string>
```

## Code sample
### Code sample

1. Creates a live stream controller

Expand Down Expand Up @@ -111,7 +95,7 @@ _controller.startStreaming("YOUR_STREAM_KEY");
_controller.stop();
```

### Manages application lifecycle
#### Manage application lifecycle

On the application side, you must manage application lifecycle:

Expand All @@ -126,13 +110,13 @@ void didChangeAppLifecycleState(AppLifecycleState state) {
}
```

# Example App
## Example App

You can try
our [example app](https://github.com/apivideo/api.video-flutter-live-stream/tree/master/example),
feel free to test it.

## Setup
### Setup

Be sure to follow the [Flutter installation steps](https://docs.flutter.dev/get-started/) before
anything.
Expand All @@ -148,11 +132,11 @@ [email protected]:apivideo/api.video-flutter-live-stream.git

Wait for the indexation to finish.

### Android
#### Android

Connect an Android device to your computer and click on the `Run main.dart` button.

### iOS
#### iOS

1) Connect an iOS device to your computer and click on the `Run main.dart` button.

Expand All @@ -163,7 +147,7 @@ the `YOUR_PROJECT_NAME/example/ios/Runner.xcworkspace` file.
<br />Click on Example, go in `Signin & Capabilities` tab, add your team and create a unique bundle
identifier.

# Plugins
## Plugins

api.video Flutter live stream library is using external native library:

Expand All @@ -172,7 +156,7 @@ api.video Flutter live stream library is using external native library:
| StreamPack | [StreamPack] |
| HaishinKit | [HaishinKit] |

# FAQ
## FAQ

If you have any questions, ask us in the [community](https://community.api.video). Or
use [issues](https://github.com/apivideo/api.video-flutter-live-stream/issues).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,13 @@ metadata:
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."
---

api.video Android Player analytics plugin
==============
# api.video Android Player analytics plugin

[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.

# Table of contents

- [Table of contents](#table-of-contents)
- [Project description](#project-description)
- [Getting started](#getting-started)
- [Installation](#installation)
- [Gradle](#gradle)
- [Permissions](#permissions)
- [Sample application](#sample-application)
- [Documentation](#documentation)
- [Options](#options)
- [ApiVideoPlayerAnalytics API](#apivideoplayeranalytics-api)
- [`play(): Future<void>`](#playeventtime-float--currenttime-futurevoid)
- [`resume(): Future<void>`](#resumeeventtime-float--currenttime-futurevoid)
- [`ready(): Future<void>`](#readyeventtime-float--currenttime-futurevoid)
- [`end(): Future<void>`](#endeventtime-float--currenttime-futurevoid)
- [`seek(from: Float, to: Float): Future<void>`](#seekfrom-float-to-float-futurevoid)
- [`pause(): Future<void>`](#pauseeventtime-float--currenttime-futurevoid)
- [`destroy(): Future<void>`](#destroyeventtime-float--currenttime-futurevoid)
- [`currentTime`](#currenttime)
- [API documentation](#api-documentation)

# Project description
## Project description

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

Expand All @@ -44,11 +21,11 @@ monitoring module.

This module also supports ExoPlayer analytics.

# Getting started
## Getting started

## Installation
### Installation

### Gradle
#### Gradle

In your module `build.gradle`, add the following code in `dependencies`:

Expand All @@ -58,7 +35,7 @@ dependencies {
}
```

## Permissions
### Permissions

In your `AndroidManifest.xml`, add the following code in `<manifest>`:

Expand All @@ -67,15 +44,15 @@ In your `AndroidManifest.xml`, add the following code in `<manifest>`:
<uses-permission android:name="android.permission.INTERNET" />
```

# Sample application
## Sample application

A demo application demonstrates how to use player analytics library.
See [`/example`](https://github.com/apivideo/api.video-android-player-analytics/tree/main/example)
folder.

# Documentation
## Documentation

## Options
### Options

The analytics module constructor takes a `Options` parameter that contains the following options:

Expand All @@ -94,49 +71,27 @@ Options instantiation is made with either mediaUrl or videoInfo.
Once the module is instantiated, the following methods have to be called to monitor the playback
events.

## ApiVideoPlayerAnalytics API
### ApiVideoPlayerAnalytics API

#### Event time or current time
- Event time or current time

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

#### `play(eventTime: Float = currentTime): Future<void>`
#### Methods

> method to call when the video starts playing for the first time (in the case of a resume after
> paused, use `resume()`)
| Method | Description |
|----------|----------|
| `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()`) |
| `resume(eventTime: Float = currentTime): Future<void>` | method to call when the video playback is resumed after a pause |
| `ready(eventTime: Float = currentTime): Future<void>` | method to call once the player is ready to play the media |
| `end(eventTime: Float = currentTime): Future<void>` | method to call when the video is ended |
| `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 |
| `pause(eventTime: Float = currentTime): Future<void>` | method to call when the video is paused |
| `destroy(eventTime: Float = currentTime): Future<void>` | method to call when the video player is disposed (eg. when the use closes the navigation tab) |
| `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. |

#### `resume(eventTime: Float = currentTime): Future<void>`

> method to call when the video playback is resumed after a pause
#### `ready(eventTime: Float = currentTime): Future<void>`

> method to call once the player is ready to play the media
#### `end(eventTime: Float = currentTime): Future<void>`

> method to call when the video is ended
#### `seek(from: Float, to: Float): Future<void>`

> method to call when a seek event occurs, the `from` and `to` parameters are mandatory and should
> contains the seek start & end times in seconds
#### `pause(eventTime: Float = currentTime): Future<void>`

> method to call when the video is paused
#### `destroy(eventTime: Float = currentTime): Future<void>`

> method to call when the video player is disposed (eg. when the use closes the navigation tab)
#### `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.
## API documentation
### API documentation

A complete [API documentation](https://apivideo.github.io/api.video-android-player-analytics/) is
available.
Loading

0 comments on commit f47bc0a

Please sign in to comment.