Sardius MediaSupport

Get Public Asset Links

Updated

Sardius provides a public URL that returns the media link for any asset in your account. By default, it returns the asset's default media. You can also use it to return a specific file on the asset, such as an MP4, MP3, PDF, or thumbnail.


How It Works

  • The URL redirects to the requested file, so no viewing stats are lost.
  • If no file type is requested, it returns the asset's default media (media.url).
  • If the requested file is not found, it returns a 404.
  • If the returned media is an m3u8 file hosted on storage.sardius.media and the asset has a VTT caption file, the VTT file is automatically included on the URL.

URL Format

https://watch.sardius.media/assets/{accountId}/{assetType}/{assetId}
ParameterDescription
accountIdYour Sardius account ID
assetTypeHow you're identifying the asset (see Supported Asset Types)
assetIdThe asset's ID or PID, matching the assetType you chose

Supported Asset Types

Asset TypeDescription
idThe asset's ID. In Sardius Player, this is called the assetUID.
assetUIDSame as id
pidThe asset's PID

Requesting a Specific File Type

To return a specific file instead of the default media, add a type query parameter to the URL:

?type={fileType}

If the file extension you provide is found in the asset's media URL, bitrates, or files, that file is returned.

TypeWhat It Returns
mp4The asset's MP4 file
mp3The asset's MP3 file
pdfThe asset's PDF file
thumbnailThe asset's default thumbnail. Unlike other types, this doesn't check the file extension. It returns the file marked as the default thumbnail. If none is set, no file is returned.
jsonThe full asset data as JSON. This returns the data directly (a 200 response) instead of redirecting (a 302 response).

Examples

Default media by Asset ID (an m3u8 includes the VTT file automatically if one exists)

https://watch.sardius.media/assets/{accountId}/id/{assetId}

Default media by Asset PID

https://watch.sardius.media/assets/{accountId}/pid/{assetPID}

MP4

https://watch.sardius.media/assets/{accountId}/id/{assetId}?type=mp4

MP3

https://watch.sardius.media/assets/{accountId}/id/{assetId}?type=mp3

Thumbnail

https://watch.sardius.media/assets/{accountId}/id/{assetId}?type=thumbnail

Asset data as JSON

https://watch.sardius.media/assets/{accountId}/id/{assetId}?type=json

Related articles