Transcript
The Elastic Encoder Player enables you to send transcript files to the video.
Programming Interface (APIs)
Access JWT Request
Make an authenticated POST request command in /api/auth
POST https://api.elasticencoder.videolib.live/dev/auth
Headers to GET for /api/asset.
Header Value
Ocp-Apim-Subscription-Key microservice authorization key.
Content-Type application/json.
In the body of the request, send the JSON below:
{
"app":"aplicação", // Application code (submitted for activation)
"key":"chave",// Authentication key (sent for activation)
"userName":"idUsuaro", // Source System User ID - Audience ID
"name":"Nome Usuario", // Source System Username - Audience ID
"group":"100", // (Optional) Source System Group ID - Audience ID
"email":"uusuario@email.com.br", // (Optional) email of the user from the source system - audience ID
"documentId":"num documento - ex: cpf", // (Optional) source system user document
"department":"nome departamento", // (Optional) Source System User Department
"timeoutMinutes":"20" // Token duration time
}
As a return of the command, the following JSON will be generated:
{
"token":"eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyTmFtZSI6ImlkVXN1YXJvIiwibmFtZSI6Ik5vbWUgVXN1YXJpbyIsImRhdGFUb2tlbiI6IjIwMjQtMDEtMjdUMjI6MjI6MjcuOTI0NzU1LTAzOjAwIiwiZ3JvdXAiOiIxMDAiLCJlbWFpbCI6InV1c3VhcmlvQGVtYWlsLmNvbS5iciIsImRvY3VtZW50SWQiOiJudW0gZG9jdW1lbnRvIC0gZXg6IGNwZiIsImRlcGFydG1lbnQiOiJub21lIGRlcGFydGFtZW50byIsIm1hdGNoIjoiODAyYmVjOGZkNTMxODE5MmIwYTc1IiwiaWRVc2VyUXVldWUiOiIwRTQ5RDM2ODMxNEM0NUJBMjJBQzYxRDY3MzA0MDYwREU1RDhFODE1OENBRjlFRDM4RDIyMjY1NzMwOTBDRDA4Iiwicm9sZXMiOiJHZXN0b3IifQ.yChC56edU1zmCua7sodHGVCD-rrMp5SCeIerkeK2llI",
"dataToken":"2024-01-27T22:22:27.924755-03:00",
"userName":"User ID",
"name":"Username"
,"tokenType":"jwt",
"idUserQueue":"0E49D368314C45BA22AC61D67304060DE5D8E8158CAF9ED38D2226573090CD08",
"group":"100",
"roles":"",
"email":"uusuario@email.com.br",
"documentId":"Document Number - ex: CPF",
"department":"Department Name",
"status_ret":null,
"erro":null
}
where the token field corresponds to the authentication key that will be used in the jwt field in the player's opening route.
To Watch a Video
To send a transcript, make an authenticated POST request command in /api/transcript
POST https://api.elasticencoder.videolib.live/dev/job
Headers for POST to /api/job.
Header Value
Ocp-Apim-Subscription-Key microservice authorization key.
Authorization Authorization JWT
Content-Type application/json.
In the body of the request, send the JSON below:
{
"assetName":"mezanino-4",
"name":"transcript2",
"language":"pt-BR",
"base64":"data:@file/plain;base64,V0VCVlRUDQoNCk5PVEUNCmlkaW9tYTpwdC1icg0KDQpOT1RFIENvbmZpZGVuY2U6IDAuOTA4MzIxMDIyOTg3MzY1Nw0KDQowMDowMDowMS4wMDAgLS0+IDAwOjAwOjA0Ljc4MQ0KT2zDoSwgbmVzdGUgdsOtZGVvIGZhbGUgc29icmUgYWxndW5zIGFzcGVjdG9zIGltcG9ydGFudGVzIHJlbGFjaW9uYWRvcw0KDQpOT1RFIENvbmZpZGVuY2U6IDAuOTA4MzIxMDIyOTg3MzY1Nw0KDQowMDowMDowNC44NDIgLS0+IDAwOjAwOjA3LjE2MA0Kw6AgcGVyc3BlY3RpdmEgZ2VuZXJhdGl2YSBkYSBsaW5ndWFnZW0uDQoNCk5PVEUgQ29uZmlkZW5jZTogMC45NjQ2OTAwMjk2MjExMjQzDQoNCjAwOjAwOjA3LjY4MCAtLT4gMDA6MDA6MDkuNzIwDQpPIHF1ZSB2b2PDqiBzYWJlIHNvYnJlIGEgZ3JhbcOhdGljYSB1bml2ZXJzYWw/DQoNCk5PVEUgQ29uZmlkZW5jZTogMC45MTQwNzIyNzUxNjE3NDMyDQoNCjAwOjAwOjExLjAzOSAtLT4gMDA6MDA6MTUuMjg1DQpEZSBhY29yZG8gY29tIGEgZ3JhbcOh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LjEyMA0Kw6kgY29uc2lzdGVudGUgY29tIG9zIGRhZG9zIHJlY2ViaWRvcy4NCg0KTk9URSBDb25maWRlbmNlOiAwLjc3MzcwMzE1NzkwMTc2MzkNCg0KMDA6MDE6NTMuNTIwIC0tPiAwMDowMTo1NS44MjUNCkJlbSwgZXNwZXJvIHF1ZSBhZ29yYSB2b2PDqiBwb3NzYSBlbnRlbmRlciBvIHF1ZSBvDQoNCk5PVEUgQ29uZmlkZW5jZTogMC43NzM3MDMxNTc5MDE3NjM5DQoNCjAwOjAxOjU1Ljg3NyAtLT4gMDA6MDE6NTcuMjM5DQpwZXJzcGVjdGl2YSBnZW5lcmF0aXZhIMOpLg0KDQpOT1RFIENvbmZpZGVuY2U6IDAuODg1MzY0OTQ5NzAzMjE2Ng0KDQowMDowMTo1Ny43NjAgLS0+IDAwOjAyOjAwLjIwMA0KQ29udGludWUgZXN0dWRhbmRvIGUgZXUgdm91IHRlIHZlciBkYSBwcsOzeGltYSB2ZXouDQoNCg=="
}
Where:
assetName - Asset id of the original file
name - Registry name (free description)
language - pt-BR, en-US
When a POST command is executed, the following JSON will be generated in return of the command:
{
"assetName": "mezanino-4",
"guid": "2516956744144161773-f41846cc-fde0-4768-a165-afb99f28df54",
"name": "transcript2",
"language": "pt-BR",
"creationTime": "2024-01-30T14:53:05.5839479+00:00",
"idStorage": "5ab5d5b73b35404092c74028a22e1779.vtt",
"base64": null,
"url": null,
"cod_erro": null,
"status_ret": null,
"erro": null
}