Overview
APIs
- Asset
- Livestream
- Generate
- Multistream target
- Session
- Access control
- Webhook
- Task
- Playback
- Transcode
- Viewership
Retrieve Playback Info
import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.playback.get("<id>");
// Handle the result
console.log(result);
}
run();
{
"type": "vod",
"meta": {
"live": 0,
"playbackPolicy": {
"type": "webhook",
"webhookId": "1bde4o2i6xycudoy",
"webhookContext": {
"streamerId": "my-custom-id"
},
"refreshInterval": 600,
"allowedOrigins": [
"<string>"
]
},
"source": [
{
"hrn": "MP4",
"type": "html5/video/mp4",
"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4",
"size": 494778,
"width": 204,
"height": 360,
"bitrate": 449890
}
],
"dvrPlayback": [
{
"hrn": "MP4",
"type": "html5/video/mp4",
"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4",
"error": "<string>"
}
],
"attestation": {
"id": "5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0",
"primaryType": "VideoAttestation",
"domain": {
"name": "Verifiable Video",
"version": "1"
},
"message": {
"video": "5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0",
"attestations": [
{
"role": "creator",
"address": 1311768467294899700
}
],
"signer": 1311768467294899700,
"timestamp": 1587667174725
},
"signature": 1311768467294899700,
"createdAt": 1587667174725,
"signatureType": "eip712",
"storage": {
"ipfs": {
"$ref": "<any>",
"updatedAt": 1587667174725
},
"status": {
"phase": "ready",
"progress": 0.5,
"errorMessage": "Failed to update storage",
"tasks": {
"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"last": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"
}
}
}
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The playback ID from the asset or livestream, e.g. eaw4nk06ts2d0mzb
.
Response
live
, vod
, recording
Human Readable Name
HLS (TS)
, MP4
, WebRTC (H264)
, FLV (H264)
, Thumbnail (JPEG)
, Thumbnail (PNG)
, Thumbnails
html5/application/vnd.apple.mpegurl
, html5/video/mp4
, html5/video/h264
, video/x-flv
, image/jpeg
, image/png
, text/vtt
0
, 1
Whether the playback policy for an asset or stream is public or signed
public
, jwt
, webhook
ID of the webhook to use for playback policy
User-defined webhook context
Interval (in seconds) at which the playback policy should be refreshed (default 600 seconds)
List of allowed origins for CORS playback (<scheme>://<hostname>:<port>, <scheme>://<hostname>)
Video Metadata EIP-712 primaryType
VideoAttestation
Video Metadata EIP-712 message content
Video Metadata EIP-712 message signature
Timestamp (in milliseconds) at which the object was created
eip712
, flow
Phase of the asset storage
waiting
, processing
, ready
, failed
, reverted
Current progress of the task updating the storage.
Error message if the last storage changed failed.
Was this page helpful?
import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.playback.get("<id>");
// Handle the result
console.log(result);
}
run();
{
"type": "vod",
"meta": {
"live": 0,
"playbackPolicy": {
"type": "webhook",
"webhookId": "1bde4o2i6xycudoy",
"webhookContext": {
"streamerId": "my-custom-id"
},
"refreshInterval": 600,
"allowedOrigins": [
"<string>"
]
},
"source": [
{
"hrn": "MP4",
"type": "html5/video/mp4",
"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4",
"size": 494778,
"width": 204,
"height": 360,
"bitrate": 449890
}
],
"dvrPlayback": [
{
"hrn": "MP4",
"type": "html5/video/mp4",
"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4",
"error": "<string>"
}
],
"attestation": {
"id": "5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0",
"primaryType": "VideoAttestation",
"domain": {
"name": "Verifiable Video",
"version": "1"
},
"message": {
"video": "5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0",
"attestations": [
{
"role": "creator",
"address": 1311768467294899700
}
],
"signer": 1311768467294899700,
"timestamp": 1587667174725
},
"signature": 1311768467294899700,
"createdAt": 1587667174725,
"signatureType": "eip712",
"storage": {
"ipfs": {
"$ref": "<any>",
"updatedAt": 1587667174725
},
"status": {
"phase": "ready",
"progress": 0.5,
"errorMessage": "Failed to update storage",
"tasks": {
"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"last": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"
}
}
}
}
}
}