### Create Project Example
Source: https://developers.adilo.com/index
Example JSON payload for creating a project.
```JSON
{
"title": "My test project",
"locked": true,
"drm": false,
"password": "test12345"
}
```
--------------------------------
### Adilo Player Ready Event Example 2
Source: https://developers.adilo.com/player-events-demo
Another example of an Adilo player 'ready' event, showcasing a different player dimensions compared to the first example.
```json
{
"eventName": "ready",
"media": {
"id": "sMIQBA9J",
"title": "Adilo Player Event Listening Demo",
"duration": 164,
"thumbnail": "https://stream.adilo.com/adilo-encoding/LoacEwszroSFJ7UF/Qe8iMJmI4WR5phDg/thumb/1080_0.jpg"
},
"player": {
"videoWidth": 0,
"videoHeight": 0,
"offsetWidth": 1049,
"offsetHeight": 590,
"clientWidth": 1049,
"clientHeight": 590,
"currentTime": 0,
"playbackRate": 1,
"paused": true,
"muted": false
}
}
```
--------------------------------
### Create Project Response Example
Source: https://developers.adilo.com/index
Example JSON response after successfully creating a project.
```JSON
{
"status": "success",
"message": "Project created successfully",
"payload": {
"id": "KVIyP5sr",
"title": "My test project",
"description": null,
"private": false,
"archived": false,
"drm": false,
"locked": false,
"videos_sort_by": null,
"created_at": "2022-01-10 14:50:04",
"updated_at": "2022-01-10 14:50:04"
}
}
```
--------------------------------
### List Projects Response Example
Source: https://developers.adilo.com/index
Example JSON response when listing projects, including project details and metadata.
```JSON
{
"status": "success",
"message": "Data fetched successfully",
"payload": [
{
"id": "HbJZ_DzU",
"title": "Test",
"description": "no desc",
"private": false,
"archived": false,
"drm": false,
"locked": false,
"videos_sort_by": "date",
"created_at": "2021-11-30 08:02:04",
"updated_at": "2021-12-09 18:49:50"
},
{
"id": "RJNwMiTJ",
"title": "Geeuy",
"description": "tester",
"private": false,
"archived": false,
"drm": false,
"locked": false,
"videos_sort_by": "date",
"created_at": "2021-12-27 09:33:34",
"updated_at": "2021-12-28 05:12:49"
}
],
"meta": {
"total": 13,
"from": 1,
"to": 50
}
}
```
--------------------------------
### Adilo Video Player Event Listener Example
Source: https://developers.adilo.com/index
A JavaScript example demonstrating how to listen for messages from the Adilo video player. It logs all received messages and shows how to conditionally display an element (e.g., a buy button) based on the video's current time.
```JavaScript
```
--------------------------------
### List Contacts Response Example
Source: https://developers.adilo.com/index
Example JSON structure for a successful response when listing contacts.
```JSON
{
"status": "success",
"message": "Data fetched successfully",
"payload": [
{
"id": 212,
"email": "geotest@test.com",
"phone_number": null,
"photo_url": null,
"facebook_link": null,
"facebook_name": null,
"linked_in_link": null,
"linked_in_name": null,
"twitter_link": null,
"twitter_name": null,
"tags": [],
"created_at": "2022-01-13T10:09:32.000000Z",
"updated_at": "2022-01-13T10:09:33.000000Z",
"firstname": "Moshood",
"lastname": "Rafiu",
"job_title": null,
"organization": null,
"website": null,
"interests": null,
"location": "Lagos, NG",
"gender": "male",
"details": null
},
{
"id": 213,
"email": "test@gee.com",
"phone_number": null,
"photo_url": null,
"facebook_link": null,
"facebook_name": "",
"linked_in_link": null,
"linked_in_name": "",
"twitter_link": null,
"twitter_name": "",
"tags": [
"Okay test",
"New"
],
"created_at": "2022-01-13T10:30:04.000000Z",
"updated_at": "2022-01-13T11:30:30.000000Z",
"firstname": null,
"lastname": null,
"job_title": null,
"organization": null,
"website": null,
"interests": null,
"location": "Lagos, NG",
"gender": "male",
"details": null
}
],
"meta": {
"total": 18,
"from": 1,
"to": 50
}
}
```
--------------------------------
### Adilo Player Ready Event Example 1
Source: https://developers.adilo.com/player-events-demo
This JSON object represents a 'ready' event from the Adilo player. It includes details about the media being played and the initial state of the player.
```json
{
"eventName": "ready",
"media": {
"id": "sMIQBA9J",
"title": "Adilo Player Event Listening Demo",
"duration": 164,
"thumbnail": "https://stream.adilo.com/adilo-encoding/LoacEwszroSFJ7UF/Qe8iMJmI4WR5phDg/thumb/1080_0.jpg"
},
"player": {
"videoWidth": 0,
"videoHeight": 0,
"offsetWidth": 494,
"offsetHeight": 278,
"clientWidth": 494,
"clientHeight": 278,
"currentTime": 0,
"playbackRate": 1,
"paused": true,
"muted": false
}
}
```
--------------------------------
### Upload File using Presigned URL (Node.js)
Source: https://developers.adilo.com/index
Provides a Node.js example for uploading files using a presigned URL. It utilizes the 'request' library to send a PUT request with the file's binary content, specifying the 'Content-type' header.
```Node.js
var request = require('request');
var fs = require('fs');
// example signed url
let signedUrl = "put-your-signed-url-here";
// path to file
let filePath = './exampleFile.mp4';
// make request
request({
method: 'PUT',
url: signedUrl,
body: fs.readFileSync(filePath),
headers: {
'Content-type': 'video/mp4',
},
}, function (error, response, body) {
if (error) {
return console.error('upload failed: ', error);
}
console.log('Upload successful! Server responded with: ', body);
});
```
--------------------------------
### File Upload Process
Source: https://developers.adilo.com/index
Handles the process of uploading video or audio files. This involves three steps: initiating the upload, getting signed URLs for file parts, and completing the upload. File parts must be at least 5MB, except for the last part.
```APIDOC
1. Initiate file upload:
POST https://adilo-api.bigcommand.com/v1/files/upload/start
Body Parameters:
- filename (String, required): The name of the file to be uploaded.
- filesize (Float, required): The size in bytes of the file to be uploaded.
- duration_seconds (Integer, required): The duration in seconds of the file.
- duration_string (String, required): The duration in string format (e.g., "00:10:30").
- mime_type (String, required): The mime type of the file (e.g., video/mp4, audio/mp3).
- project_id (String, required): The ID of the project to upload the file to.
- drm_protection (Boolean, optional): Determines if the video will have DRM protection.
Responses:
- 200 OK: The file upload was initiated.
- 403 Forbidden: This action is not allowed.
- 422 Unprocessed Entity: The input data was invalid.
2. Get a signed upload URL for each part of your video:
GET https://adilo-api.bigcommand.com/v1/files/upload/get-signed-url/{uploadId}/{partNumber}
Query Parameters:
- key (String, required): The file upload key.
Responses:
- 200 OK: Signed URL generated.
- 403 Forbidden: This action is not allowed.
- 422 Unprocessed Entity: The input data was invalid.
3. Complete file upload:
POST https://adilo-api.bigcommand.com/v1/files/upload/complete
Body Parameters:
- key (String, required): The key of the file upload.
- uploadId (String, required): The uploadId of the file upload.
- parts (Array, required): An array of parts of the file uploaded.
- parts.PartNumber (Array, required): The part number.
- parts.ETag (String, required): The ETag gotten from the response header after uploading file part to signed URL.
Responses:
- 200 OK: The file upload was completed.
- 403 Forbidden: This action is not allowed.
- 422 Unprocessed Entity: The input data was invalid.
```
--------------------------------
### Adilo API - User Management
Source: https://developers.adilo.com/index
This section details the API endpoints for managing users within Adilo. It includes operations for deleting users and provides examples of request and response payloads for user creation and listing.
```APIDOC
DELETE /v1/users/{user_id}
Description: Delete a user by ID.
Path Parameters:
user_id (Integer): The ID of the user to delete.
Responses:
200 OK: User deleted successfully.
403 Forbidden: Action not allowed.
Create User Request Data:
{
"name": "Test user",
"email": "user@gmail.com",
"password": "test12345",
"permissions": [
"Create Project",
"Delete Project",
"Upload Video",
"Customize Video",
"Delete Video",
"Project Analytics",
"Experimentation",
"Collaboration",
"Playlists",
"Edit Stage",
"View Snaps",
"Edit Snaps",
"Delete Snaps",
"Create Snaps"
]
}
Create User Response Data:
{
"status": "success",
"message": "User created successfully",
"payload": {
"id": 670,
"name": "Test user",
"email": "user@gmail.com",
"photo_url": null,
"country_code": null,
"phone": null,
"team": {
"id": 239,
"name": "MyDefaultTeam48",
"photo_url": "https://www.gravatar.com/avatar/e65c7b6438883dbf9519d5e321a856b7.jpg?s=200&d=identicon",
"role": "subuser"
},
"current_billing_plan": null,
"billing_status": "Active",
"last_activity": "2022-01-25T08:27:50.856907Z",
"user_status": "Active",
"permissions": [
"Create Project",
"Delete Project",
"Upload Video",
"Customize Video",
"Delete Video",
"Project Analytics",
"Experimentation",
"Collaboration",
"Playlists",
"Edit Stage",
"View Snaps",
"Edit Snaps",
"Delete Snaps",
"Create Snaps"
],
"created_at": "2022-01-25T08:27:50.000000Z"
}
}
List Users Request Data:
{
"from": 1,
"to": 50
}
List Users Response Data:
{
"status": "success",
"message": "Data fetched successfully",
"payload": [
{
"id": 111,
"name": "Test User",
"email": "user@gmail.com",
"photo_url": null,
"country_code": null,
"phone": null,
"team": {
"id": 718,
"name": "MyDefaultTeam648",
"photo_url": "https://www.gravatar.com/avatar/2810fff3a1dc9ebc80eb41a3705bf8d9.jpg?s=200&d=identicon",
"role": "subuser"
},
"current_billing_plan": null,
"billing_status": "Active",
"last_activity": "2022-01-03 07:11:13",
"user_status": "Active",
"permissions": [
"Create Project",
"Delete Project",
"Upload Video",
"Customize Video",
"Delete Video",
"Project Analytics",
"Experimentation",
"Collaboration",
"Playlists",
"Edit Stage",
"View Snaps",
"Edit Snaps",
"Delete Snaps",
"Create Snaps",
"Request Snaps (Shared Snaps)",
"View Analytics",
"Notification",
"Global video settings",
"View Intergrations",
"Add Intergrations",
"Delete Intergrations",
"View Channels",
"Add Channels",
"Edit Channels",
"Delete Channels",
"View Domains",
"Add Domains",
"Edit Domains",
"Delete Domains",
"View Brands",
"Add Brands",
"Edit Brands",
"Delete Brands",
"View Contacts",
"Export Contacts",
"Edit Contacts",
"Delete Contacts"
],
"created_at": "2022-01-03T06:11:13.000000Z"
}
],
"meta": {
"total": 1,
"from": 1,
"to": 50
}
}
```
--------------------------------
### Player Play Event
Source: https://developers.adilo.com/index
This event logs when the visitor starts or resumes playing the video. It shows when the video playback begins or continues after a pause.
```json
{
"eventName": "play",
"media": {
"title": "My test video",
"description": "This is a dummy description",
"duration": 60
}
}
```
--------------------------------
### Get File Meta Response
Source: https://developers.adilo.com/index
Response containing metadata for a specific file, including its ID and other details.
```JSON
{
"status": "success",
"message": "Data fetched successfully",
"payload": {
"id": "3qwMKXTj"
}
}
```
--------------------------------
### Get Folder By ID
Source: https://developers.adilo.com/index
Retrieves a specific project folder using its unique ID. Requires the folder_id.
```APIDOC
GET https://adilo-api.bigcommand.com/v1/folders/{folder_id}
Path Parameters:
- folder_id (String, required): The ID of the folder to retrieve.
Responses:
- 200 OK: Folder fetched successfully.
- 403 Forbidden: Action not allowed.
```
--------------------------------
### Get Signed URL for File Upload
Source: https://developers.adilo.com/index
Requests a signed URL for uploading a file part. Requires the file key obtained from the initiation step.
```JSON
{
"key": "mjhvjgftrFGgdf/gCySfSsu/gCySfSsu.mp3"
}
```
--------------------------------
### Get Files By Project ID
Source: https://developers.adilo.com/index
Retrieves files associated with a specific project ID. Supports filtering results by a 'From' and 'To' range. Requires a valid project_id.
```APIDOC
GET https://adilo-api.bigcommand.com/v1/projects/{project_id}/files
Parameters:
- project_id (String, required): The ID of the project.
- From (Integer, optional): The start filter for results (default: 1).
- To (Integer, optional): The number of results to fetch (default: 50).
Responses:
- 200 OK: Project files fetched successfully.
- 403 Forbidden: Action not allowed.
```
```JSON
{
"from": 1,
"to": 50
}
```
--------------------------------
### Get File Update Signed URL Response
Source: https://developers.adilo.com/index
Response providing a pre-signed URL for updating a file. Includes the HTTP method (PUT) and the URL with necessary authentication parameters.
```JSON
{
"status": "success",
"message": "File upload initiated successfully",
"payload": {
"method": "PUT",
"url": "https://adilo-encoding.s3.us-east-2.wasabisys.com/mjhvjgftrFGgdf/BiL93G3tLgt9Zcba/MReP3nea.mp3?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=B3HSNGHP0MKECQHXBM22%2F20220124%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20220124T093103Z&X-Amz-SignedHeaders=host&X-Amz-Expires=7200&X-Amz-Signature=fa7fc02046ac4c4ec74c83ac1ccf9facf9581ff5485c27b929d8ef48423050c5"
}
}
```
--------------------------------
### Get File Update Signed URL
Source: https://developers.adilo.com/index
Requests a signed URL for updating an existing file. Requires file details like filename, size, duration, MIME type, and project ID.
```JSON
{
"filename": "song.mp3",
"filesize": 155942,
"duration_seconds": 19,
"duration_string": "00:00:19",
"mime_type": "audio/mpeg",
"drm_protection": false,
"clear_statistics": false,
"folder_id": "DncvXu"
}
```
--------------------------------
### Get Signed URL for File Upload Response
Source: https://developers.adilo.com/index
Response containing the HTTP method (PUT) and a pre-signed URL for uploading file parts. The URL includes parameters for authentication and expiration.
```JSON
{
"status": "success",
"message": "Part signed upload URL generated successfully, URL expires in 20 minutes",
"payload": {
"method": "PUT",
"url": "https://adilo-encoding.s3.us-east-2.wasabisys.com/mjhvjgftrFGgdf/gCdSgSsu/gCdSgSsu.mp3?partNumber=1&uploadId=3oj4R1F8tyjrns82scnorAfwR4E2jF2YtEsPA34TK8opZXSj3V3gKsOLL7BF1gRHs4l8ui0OnPKip9Im7DZizPwi_EGFw4dn70wydOaaTidl0JDR4yq9R58nMQk6jI8M&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=B3HSNGHP0MKECQHXBMdsfsaea22%2F20220124%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20220124T053944Z&X-Amz-SignedHeaders=host&X-Amz-Expires=1200&X-Amz-Signature=0be0b1dfbd24215b0d872960ed5a71e4ac7b3704d33b6cb294d52a304a9c1132"
}
}
```
--------------------------------
### Projects API
Source: https://developers.adilo.com/index
Covers the creation and listing of projects within the Adilo API. Includes details on request methods, parameters, and expected responses for each operation.
```APIDOC
Create Project:
**POST** https://adilo-api.bigcommand.com/v1/projects
Request Body Parameters:
- title* (String): The title of the project.
- description (String): The description of the project.
- locked (Boolean): Whether the project should be locked (default: false).
- drm (Boolean): Whether the project has DRM (default: false).
- private (Boolean): Whether the project is private (default: false).
- password (String): Password for the project if locked.
Responses:
- 200 OK: The project was created.
- 422 Unprocessed Entity: The input data was invalid.
List Projects:
**GET** https://adilo-api.bigcommand.com/v1/projects
Query Parameters:
- From (Integer): The start filter of the results (default: 1).
- To (Integer): The amount of the results to fetch (default: 50).
Responses:
- 200 OK: The projects were fetched.
```
--------------------------------
### Adilo API Reference
Source: https://developers.adilo.com/index
Comprehensive reference for Adilo's REST APIs, covering Projects, Folders, Files, Users, and Contacts. Includes details on authentication and various video player events such as playback control, subtitle changes, and CTA interactions.
```APIDOC
Adilo API Reference:
- Base URL: https://developers.adilo.com/
API Endpoints:
Projects: https://developers.adilo.com/#documenter-3-1
Folders: https://developers.adilo.com/#documenter-3-2
Files: https://developers.adilo.com/#documenter-3-3
Users: https://developers.adilo.com/#documenter-3-4
Contacts: https://developers.adilo.com/#documenter-3-5
Video Player Events:
Current Time: https://developers.adilo.com/#documenter-4-1
Ready State: https://developers.adilo.com/#documenter-4-2
Play: https://developers.adilo.com/#documenter-4-3
Paused: https://developers.adilo.com/#documenter-4-4
Ended: https://developers.adilo.com/#documenter-4-5
Subtitle Change: https://developers.adilo.com/#documenter-4-8
Volume Change: https://developers.adilo.com/#documenter-4-9
Resolution Change: https://developers.adilo.com/#documenter-4-10
Chapter Change: https://developers.adilo.com/#documenter-4-11
Playback Speed Change: https://developers.adilo.com/#documenter-4-12
CTA Display: https://developers.adilo.com/#documenter-4-13
CTA Interaction: https://developers.adilo.com/#documenter-4-14
CTA Skip: https://developers.adilo.com/#documenter-4-15
Authentication:
Details: https://developers.adilo.com/#documenter-2
Examples:
https://developers.adilo.com/#documenter-3-6
```
--------------------------------
### Upload File using Presigned URL (HTML & JavaScript)
Source: https://developers.adilo.com/index
This snippet shows how to implement file uploads using a presigned URL with HTML and the Fetch API. It includes an input for file selection and a button to trigger the upload, reading the file as binary data.
```HTML
```
```JavaScript
// example signed url
let signedUrl = "put-your-signed-url-here";
// get selected file from form data
document.querySelector('#upload-btn')
.addEventListener('click', function(){
if(document.querySelector('#file').value == ''){
console.log('No file selected');
return;
}
let file = document.querySelector('#file').files[0];
let reader = new FileReader();
reader.onload = function(e){
// binary data
let binaryData = e.target.result;
fetch(signedUrl, {
method: 'PUT',
headers: {
'Content-type': 'video/mp4'
},
body: binaryData
}).then(response => response.json())
.then(data => { console.log(data) });
}
reader.onerror = function(e){
// error occurred
console.log('Error reading file');
}
reader.readAsBinaryString(file);
});
```
--------------------------------
### Initiate File Upload
Source: https://developers.adilo.com/index
Initiates the file upload process by providing file details such as filename, size, duration, MIME type, and project ID. Returns an upload ID and a key for subsequent upload steps.
```JSON
{
"filename": "my audio file.mp3",
"filesize": 155942,
"duration_seconds": 19,
"duration_string": "00:00:19",
"mime_type": "audio/mpeg",
"project_id": "CdADtEMZ",
"drm_protection": false,
"folder_id": "DncvXu"
}
```
--------------------------------
### Create Folder
Source: https://developers.adilo.com/index
Creates a new folder within a specified project. Can optionally set a parent folder for subfolder creation. Requires folder name and project ID.
```APIDOC
POST https://adilo-api.bigcommand.com/v1/folders
Body Parameters:
- Name (String, required): The name of the folder.
- project_id (String, required): The ID of the project.
- parent_id (String, optional): The ID of the parent folder for subfolder creation.
Responses:
- 200 OK: Folder created successfully.
- 404 Not Found: Project or parent folder not found.
- 422 Unprocessed Entity: Invalid input data.
```
```JSON
{
"Name": "New Folder",
"project_id": "project123",
"parent_id": "parent456"
}
```
--------------------------------
### Initiate File Upload Response
Source: https://developers.adilo.com/index
Response from initiating a file upload, containing the status, a message, and payload with upload ID and key.
```JSON
{
"status": "success",
"message": "File upload initiated successfully",
"payload": {
"uploadId": "3oj4R1F8tyjrns82scnorAfwR4E2jF2YtEsPA34TK8opZXSj3V3gKsOLL7BF1gRHs4l8ui0OnPKip9Im7DZizPwi_EGFw4dn70wydOaaTidl0JDR4yq9R58nMQk6jI8M",
"key": "mjhvjgftrFGgdf/gCySfSsu/gCySfSsu.mp3"
}
}
```
--------------------------------
### List Files Response
Source: https://developers.adilo.com/index
Response containing a list of files, including their IDs, names, and types. Also includes metadata about the total number of files and the pagination range.
```JSON
{
"status": "success",
"message": "Data fetched successfully",
"payload": [
{
"id": "fjbStMxf",
"name": "sa",
"type": "video"
},
{
"id": "_ZsuA4w_",
"name": "Dua Lipa",
"type": "audio"
}
],
"meta": {
"total": 2,
"from": 1,
"to": 50
}
}
```
--------------------------------
### List Files
Source: https://developers.adilo.com/index
Retrieves a list of files within a project, with pagination support. Requires 'from' and 'to' parameters to specify the range of files.
```JSON
{
"from": 1,
"to": 50
}
```
--------------------------------
### Adilo Project Management API
Source: https://developers.adilo.com/index
This section details the API endpoints for managing projects in Adilo. It covers operations such as updating, retrieving, deleting, and searching projects, as well as fetching associated folders. Each endpoint specifies the HTTP method, URL, path parameters, request body (if applicable), and possible response statuses.
```APIDOC
Update Project:
HTTP Request: PUT https://adilo-api.bigcommand.com/v1/projects/{project_id}
Description: Updates a project by its ID.
Path Parameters:
project_id (String, required): The ID of the project to update.
Body Parameters:
Title (String): The new title of the project.
Description (String): The new description of the project.
Locked (Boolean, optional, default: false): Whether the project should be locked.
Drm (Boolean, optional, default: false): Whether the project has DRM enabled.
Private (Boolean, optional, default: false): Whether the project is private.
Password (String, optional): Password for the project if locked.
Responses:
200 OK: The project was updated.
403 Forbidden: The action is not allowed.
422 Unprocessed Entity: The input data was invalid.
Get Project By ID:
HTTP Request: GET https://adilo-api.bigcommand.com/v1/projects/{project_id}
Description: Retrieves a project by its ID.
Path Parameters:
project_id (String, required): The ID of the project to retrieve.
Responses:
200 OK: The project was fetched.
403 Forbidden: The action is not allowed.
Delete Project:
HTTP Request: DELETE https://adilo-api.bigcommand.com/v1/projects/{project_id}
Description: Deletes a project by its ID.
Path Parameters:
project_id (String, required): The ID of the project to delete.
Responses:
200 OK: The project was deleted.
403 Forbidden: The action is not allowed.
Search Project:
HTTP Request: GET https://adilo-api.bigcommand.com/v1/projects/search/{string}
Description: Searches for projects based on a string.
Path Parameters:
string (String, required): The value to search for within projects.
Query Parameters:
From (Integer, optional, default: 1): The starting index for the search results.
To (Integer, optional, default: 50): The maximum number of results to fetch.
Responses:
200 OK: The related projects were fetched.
Get Folders By Project ID:
HTTP Request: GET https://adilo-api.bigcommand.com/v1/projects/{project_id}/folders
Description: Retrieves folders associated with a specific project.
Path Parameters:
project_id (String, required): The ID of the project whose folders are to be fetched.
Query Parameters:
From (Integer, optional, default: 1): The starting index for the folders list.
To (Integer, optional, default: 50): The maximum number of folders to fetch.
Responses:
200 OK: The project folders were fetched.
403 Forbidden: The action is not allowed.
```
--------------------------------
### Adilo Video Player Events
Source: https://developers.adilo.com/index
This section details the various events emitted by the Adilo video player using the `postMessage` browser API. These events track player state, user interactions, and video progress, allowing for custom event handling.
```APIDOC
Adilo Video Player Events:
- currentTime: Tracks the current playback position of the video.
- ready: Indicates the video player has loaded and is ready for playback.
- play: Fired when the video playback starts or resumes.
- paused: Triggered when the video playback is paused.
- ended: Fired when the video playback reaches its end.
- subtitleChange: Notifies when the video subtitles are changed by the user.
- volumeChange: Tracks changes in the video player's volume.
- resolutionChange: Logs when the video playback resolution is altered.
- chapterChange: Records when the user navigates to a different video chapter.
- playbackSpeedChange: Tracks changes in the video playback speed.
- CTADisplay: Logs when a Call to Action (CTA) element is shown during playback.
- CTAInteraction: Captures user interaction with a CTA element.
- CTASkip: Records when a user dismisses or skips a CTA element.
```
--------------------------------
### Player Ready State Event
Source: https://developers.adilo.com/index
This event indicates that the video is fully loaded and ready for playback. It ensures that the video can be played without any interruptions.
```json
{
"eventName": "ready",
"media": {
"title": "My test video",
"description": "This is a dummy description",
"duration": 60
}
}
```
--------------------------------
### Upload File using Presigned URL (PHP)
Source: https://developers.adilo.com/index
Demonstrates how to upload a file to Adilo's storage using a presigned URL with the Guzzle HTTP client in PHP. It specifies the file path, sets necessary headers like 'Content-Type', and sends the file content via a PUT request.
```PHP
use GuzzleHttpClient;
// example signed url
$signedUrl = "put-your-signed-url-here";
// path to file
$filePath = './exampleFile.mp4';
$headers = [
'Content-Type' => 'video/mp4',
'accept' => 'application/json',
];
$client = new GuzzleHttpClient(['headers' => $headers]);
$result = $client->request('PUT', $signedUrl, [
'body' => file_get_contents($filePath)
]);
$response = $result->getBody()->getContents();
$data = json_decode($response, true);
```
--------------------------------
### Adilo File Subtitle and Translation API
Source: https://developers.adilo.com/index
This section details the API endpoints for generating subtitles, downloading subtitles, and generating translations for project files. It includes information on request methods, parameters, and expected responses.
```APIDOC
Generate Subtitle:
POST https://adilo-api.bigcommand.com/v1/files/subtitle/generate
Body:
file_id (String, required): The ID of the file.
language (string, required): The language of the subtitle file. Supported languages include English, Spanish, French, Chinese, Italian, Vietnamese, Portuguese, Arabic, German, Hindi, Javanese, Korean, Romanian, Polish, Irish, Dutch, Hebrew, Indonesian, Greek, Filipino, Czech, Thai, Urdu, Malay, Persian, Finnish, Turkish, Danish, Swedish.
Response:
200 OK: The subtitle is generating.
403 Forbidden: The action is not allowed.
Download Subtitle:
GET https://adilo-api.bigcommand.com/v1/files/{file_id}/subtitle/download
Path Parameter:
file_id (String, required): This is the ID of the file.
Response:
200 OK: The subtitle download url was generated.
403 Forbidden: The action is not allowed.
404 Not Found: No subtitle found for this file.
Generate Translation:
POST https://adilo-api.bigcommand.com/v1/files/translation/generate
Body:
file_id (String, required): This is the ID of the file.
language (string, required): This is the language of the subtitle file. Supported languages include English, Spanish, French, Chinese, Italian, Vietnamese, Portuguese, Arabic, German, Hindi, Javanese, Korean, Romanian, Polish, Irish, Dutch, Hebrew, Indonesian, Greek, Filipino, Czech, Thai, Urdu, Malay, Persian, Finnish, Turkish, Danish, Swedish.
Response:
200 OK: The translation was generated.
403 Forbidden: The action is not allowed.
404 Not Found: No translation found for this language.
```
--------------------------------
### Adilo Player Event Types
Source: https://developers.adilo.com/player-events-demo
Lists the various events that can be listened to from the Adilo player. These events cover playback status, user interactions, and media changes.
```APIDOC
Adilo Player Events:
- ready: Fired when the player is ready to play.
- play: Fired when playback starts.
- paused: Fired when playback is paused.
- ended: Fired when playback finishes.
- currentTime: Fired when the current playback time changes.
- subtitleChange: Fired when subtitles are changed.
- volumeChange: Fired when the volume is changed.
- resolutionChange: Fired when the video resolution changes.
- chapterChange: Fired when the chapter changes.
- playbackSpeedChange: Fired when the playback speed is altered.
- CTADisplay: Fired when a Call To Action (CTA) is displayed.
- CTAInteraction: Fired when a user interacts with a CTA.
- CTASkip: Fired when a user skips a CTA.
```
--------------------------------
### Adilo API - User Management
Source: https://developers.adilo.com/index
This section details the API endpoints for managing users within the Adilo platform. It includes operations for creating, listing, retrieving, and updating user information.
```APIDOC
Users:
Create User:
Information: Create a new user for your team
HTTP Request: POST https://adilo-api.bigcommand.com/v1/users
Body:
Parameter | Type | Description
---|---|---
name* | String | This is the name of the user
email* | String | This is the email of the user
password* | String | This is the password for the newly created user, this can be changed later by the user in their profile.
permissions* | Array | This is an array of permissions that the created user will have. Supported permissions are Create Project, Delete Project, Upload Video, Customize Video, Delete Video, Project Analytics, Experimentation, Collaboration, Playlists, Edit Stage, View Snaps, Edit Snaps, Delete Snaps, Create Snaps, Request Snaps (Shared Snaps), View Analytics, Notification, Global video settings, View Intergrations, Add Intergrations, Delete Intergrations, View Channels, Add Channels, Edit Channels, Delete Channels, View Domains, Add Domains, Edit Domains, Delete Domains, View Brands, Add Brands, Edit Brands, Delete Brands, View Contacts, Export Contacts, Edit Contacts, Delete Contacts
Response:
HTTP Status | Explanation
---|---
200 OK | The user was created
403 Forbidden | This action is not allowed
422 Unprocessed Entity | The input data was invalid
List Users:
Information: List all users on your team
HTTP Request: GET https://adilo-api.bigcommand.com/v1/users
Query Parameters:
Parameter | Type | Description
---|---|---
From | Integer | The start filter of the results, default is 1
To | Integer | The amount of the results to fetch, default is 50
Response:
HTTP Status | Explanation
---|---
200 OK | The users were fetched
Get User By ID:
Information: Get a user by ID
HTTP Request: GET https://adilo-api.bigcommand.com/v1/users/{user_id}
Path Parameters:
Parameter | Type | Description
---|---|---
user_id* | Integer | This is the ID of the user
Response:
HTTP Status | Explanation
---|---
200 OK | The user was fetched
403 Forbidden | This action is not allowed
Update User:
Information: Update a user on your team by ID
HTTP Request: PUT https://adilo-api.bigcommand.com/v1/users/{user_id}
Path Parameters:
Parameter | Type | Description
---|---|---
user_id* | Integer | This is the ID of the user
Body:
Parameter | Type | Description
---|---|---
name | String | This is the name of the user
email | String | This is the email of the user
password | String | This is the password for the newly created user, this can be changed later by the user in their profile.
permissions | Array | This is an array of permissions that the created user will have. Supported permissions are Create Project, Delete Project, Upload Video, Customize Video, Delete Video, Project Analytics, Experimentation, Collaboration, Playlists, Edit Stage, View Snaps, Edit Snaps, Delete Snaps, Create Snaps, Request Snaps (Shared Snaps), View Analytics, Notification, Global video settings, View Intergrations, Add Intergrations, Delete Intergrations, View Channels, Add Channels, Edit Channels, Delete Channels, View Domains, Add Domains, Edit Domains, Delete Domains, View Brands, Add Brands, Edit Brands, Delete Brands, View Contacts, Export Contacts, Edit Contacts, Delete Contacts
Response:
HTTP Status | Explanation
---|---
200 OK | The user was updated
403 Forbidden | This action is not allowed
422 Unprocessed Entity | The input data was invalid
```
--------------------------------
### Complete File Upload Response
Source: https://developers.adilo.com/index
Response indicating the file upload was successful. Includes the new file's ID, title, project details, and creation timestamps.
```JSON
{
"status": "success",
"message": "File upload successful",
"payload": {
"id": "MReP3nea",
"title": "song",
"description": "",
"tags": [],
"project": {
"id": "CdADtEMZ",
"title": "Muskeet",
"description": null,
"private": false,
"archived": false,
"drm": false,
"locked": false,
"videos_sort_by": "date",
"created_at": "2020-10-17 14:54:01",
"updated_at": "2021-09-20 02:44:28"
},
"drm_protection": false,
"visual_watermarking": false,
"duration_formatted": "0:19",
"views": 0,
"created_at": "2022-01-24 06:07:50",
"updated_at": "2022-01-24 06:07:50"
}
}
```
--------------------------------
### Adilo API Authentication
Source: https://developers.adilo.com/index
Details on how to authenticate with the Adilo API using public and secret API keys. It specifies the required headers for making authenticated requests.
```APIDOC
Base URL:
https://adilo-api.bigcommand.com/v1/
Authentication Headers:
'X-Public-Key: '
'X-Secret-Key: '
'Content-Type: application/json'
```