Preview track
GET /v0/tracks/:trackId/stream
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.
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.
Path Parameters
- trackId string required
Track id
- 200
- 400
- 401
- 404
- 429
Information about the stream url
- application/json
- Schema
- Example (from schema)
- Example
Schema
- url string required
- expires string required
{
"url": "string",
"expires": "string"
}
{
"url": "https://hls-storage.epidemicsite.com/hls/v1/q4MImKW47D/daefecd205c01496b42ae6950c446c6e/master.m3u8",
"expires": "2022-12-22T11:01:48Z"
}
Bad request.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- message string required
Human readable message
errors object[]
Array [key string requiredError key
messages string[] requiredError 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
- message string required
Human readable message
errors object[]
Array [key string requiredError key
messages string[] requiredError messages
]
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Invalid credentials"
}
Track was not found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- message string required
Human readable message
errors object[]
Array [key string requiredError key
messages string[] requiredError messages
]
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Track was not found"
}
Rate limit exceeded.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- message string required
Human readable message
errors object[]
Array [key string requiredError key
messages string[] requiredError messages
]
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Rate limit exceeded"
}