Methods: enable | info | enabledefault | enableautoplay | upload | download
enable
Enable or disable subtitles
Input parameters:
Required parameters:
- String apikey (API key of your project)
- String media_code (Your media key)
- Boolean enable (Enable/disable subtitles, values: 1 or 0)
Output parameters
- String Message (Status message)
- String enable (Subtitles status: "yes" or "no")
Example request:
https://boomstream.com/api/subtitles/enable?apikey=[API_KEY]&code=[MEDIA_CODE]&format=json&enable=1
Example response:
{
"Message": "Changes have been successfully saved",
"enable": "yes",
"Status": "Success",
"Version": "1.0"
}
info
Subtitles information
Input parameters:
- String apikey (API key of your project)
- String media_code (Your media key)
Output parameters
- String enabled (Subtitles status: "yes" or "no")
- Array languages (List of subtitle languages)
Example request:
https://boomstream.com/api/subtitles/info?apikey=[API_KEY]&code=[MEDIA_CODE]&format=json
Example response:
{
"enabled": "yes",
"languages": [
{
"index": 1,
"lang_code": "en",
"lang_title": "English",
"subtitles": [
{
"title": "first",
"time_from": "00:00:00.000",
"time_to": "00:00:05.000"
},
{
"title": "second",
"time_from": "00:00:05.000",
"time_to": "00:00:20.000"
},
{
"title": "third",
"time_from": "00:00:20.000",
"time_to": "00:00:30.000"
},
{
"title": "fourth",
"time_from": "00:00:30.000",
"time_to": "00:00:45.000"
}
],
"is_default": "no",
"is_autoplay": "no"
}
],
"Status": "Success",
"Version": "1.0"
}
enabledefault
Select default subtitle language
Input parameters:
Required parameters:
- String apikey (API key of your project)
- String media_code (Your media key)
- Boolean enable (Enable/disable, values: 1 or 0)
- String lang_code (Language code)
Output parameters
- String Message (Operation result message)
Example request:
https://boomstream.com/api/subtitles/enabledefault?apikey=[API_KEY]&code=[MEDIA_CODE]&format=json&lang_code=en&enable=1
Example response:
{
"Message": "The default language selected is English",
"Status": "Success",
"Version": "1.0"
}
enableautoplay
Select subtitle language for autoplay
Input parameters:
Required parameters:
- String apikey (API key of your project)
- String media_code (Your media key)
- Boolean enable (Enable/disable, values: 1 or 0)
- String lang_code (Language code)
Output parameters
- String Message (Operation result message)
Example request:
https://boomstream.com/api/subtitles/enableautoplay?apikey=[API_KEY]&code=[MEDIA_CODE]&format=json&lang_code=en&enable=1
Example response:
{
"Message": "The default language selected is English",
"Status": "Success",
"Version": "1.0"
}
upload
Upload subtitles using POST method
Note: This is a POST method. To use it, you need to upload a file with subtitles.
Example request:
https://boomstream.com/api/subtitles/upload
download
Download subtitles
Input parameters:
- String apikey (API key of your project)
- String media_code (Your media key)
- String lang_code (Language code)
Example request:
https://boomstream.com/api/subtitles/download?apikey=[API_KEY]&code=[MEDIA_CODE]&lang_code=ru
