Preview track using cookies
GET/v0/tracks/:trackId/hls
We recommend using HLS to allow users to play/preview a track. The main benefits of this compared to MP3 are smaller file transfers and alternate qualities, allowing the HLS client library to switch to a lower quality when necessary.
The audio is encoded using the AAC coding standard, which results in a smaller footprint for a similar quality compared to MP3. The primary manifest refers to two variant quality streams. HLS client libraries typically choose the optimal quality automatically, based on download speed.
The format consists of audio files split into smaller chunks and manifests that refer to these audio files. Since the format is made up of multiple files, access to these are controlled using cookies.
We provide an example app for iOS that plays HLS streams. Users do not need to connect their account or have an active Epidemic Sound subscription to play any track using HLS streaming. That allows your users to listen to all tracks before they connect their account.
Request
Path Parameters
Track id
Responses
- 200
- 400
- 401
- 404
- 429
HLS download details for the track
- application/json
- Schema
- Example (from schema)
- Example
Schema
cookie
object
required
{
"url": "string",
"cookie": {
"name": "string",
"domain": "string",
"path": "string",
"value": "string",
"expires": "string"
}
}
{
"url": "https://hls-storage.epidemicsite.com/hls/v1/q4MImKW47D/daefecd205c01496b42ae6950c446c6e/master.m3u8",
"cookie": {
"name": "Cloud-CDN-Cookie",
"domain": "hls-storage.epidemicsite.com",
"path": "/",
"value": "URLPrefix=aHR0cHM6Ly9obHMtaW52ZXN0aWdhdGlvbi5lcGlkZW1pY3NpdGUuY29tL2hscy92MS9xNE1JbUtXNDdEL2RhZWZlY2QyMDVjMDE0OTZiNDJhZTY5NTBjNDQ2YzZlLw==:Expires=1638185196:KeyName=KeyName:Signature=S0QZ20ijEWKA-w9B9MycB0yTca0=",
"expires": "2021-11-29T11:26:36Z"
}
}
Bad request.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Human readable message
errors
object[]
Error key
Error messages
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Bad request"
}
Unauthorized. Most likely your access token has expired.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Human readable message
errors
object[]
Error key
Error messages
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Invalid credentials"
}
Track was not found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Human readable message
errors
object[]
Error key
Error messages
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Track was not found"
}
Rate limit exceeded.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Human readable message
errors
object[]
Error key
Error messages
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Rate limit exceeded"
}