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": {
"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
}
],
"live": 0,
"playbackPolicy": {
"type": "webhook",
"webhookId": "1bde4o2i6xycudoy",
"webhookContext": {
"streamerId": "my-custom-id"
},
"refreshInterval": 600,
"allowedOrigins": [
"<string>"
]
},
"dvrPlayback": [
{
"hrn": "MP4",
"type": "html5/video/mp4",
"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4",
"error": "<string>"
}
],
"attestation": {
"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,
"id": "5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0",
"createdAt": 1587667174725,
"signatureType": "eip712",
"storage": {
"ipfs": {
"updatedAt": 1587667174725
},
"status": {
"phase": "ready",
"tasks": {
"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"last": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"
},
"progress": 0.5,
"errorMessage": "Failed to update storage"
}
}
}
}
}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": {
"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
}
],
"live": 0,
"playbackPolicy": {
"type": "webhook",
"webhookId": "1bde4o2i6xycudoy",
"webhookContext": {
"streamerId": "my-custom-id"
},
"refreshInterval": 600,
"allowedOrigins": [
"<string>"
]
},
"dvrPlayback": [
{
"hrn": "MP4",
"type": "html5/video/mp4",
"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4",
"error": "<string>"
}
],
"attestation": {
"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,
"id": "5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0",
"createdAt": 1587667174725,
"signatureType": "eip712",
"storage": {
"ipfs": {
"updatedAt": 1587667174725
},
"status": {
"phase": "ready",
"tasks": {
"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"last": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"
},
"progress": 0.5,
"errorMessage": "Failed to update storage"
}
}
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The playback ID from the asset or livestream, e.g. eaw4nk06ts2d0mzb.
Successful response
live, vod, recording "vod"
Show child attributes
Show child attributes
Human Readable Name
HLS (TS), MP4, WebRTC (H264), FLV (H264), Thumbnail (JPEG), Thumbnail (PNG), Thumbnails "MP4"
html5/application/vnd.apple.mpegurl, html5/video/mp4, html5/video/h264, video/x-flv, image/jpeg, image/png, text/vtt "html5/video/mp4"
"https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4"
494778
204
360
449890
0, 1 0
Whether the playback policy for an asset or stream is public or signed
Show child attributes
public, jwt, webhook "webhook"
ID of the webhook to use for playback policy
"1bde4o2i6xycudoy"
User-defined webhook context
{ "streamerId": "my-custom-id" }Interval (in seconds) at which the playback policy should be refreshed (default 600 seconds)
600
List of allowed origins for CORS playback (
Show child attributes
HLS (TS) "MP4"
html5/application/vnd.apple.mpegurl "html5/video/mp4"
"https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4"
Show child attributes
Video Metadata EIP-712 primaryType
VideoAttestation "VideoAttestation"
Video Metadata EIP-712 message content
Show child attributes
"5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0"
1311768467294899700
1587667174725
Video Metadata EIP-712 message signature
1311768467294899700
"5b9e63bb-6fd0-4bea-aff2-cc5d4eb9cad0"
Timestamp (in milliseconds) at which the object was created
1587667174725
eip712, flow "eip712"
Show child attributes
Show child attributes
Phase of the asset storage
waiting, processing, ready, failed, reverted "ready"
Show child attributes
ID of any currently running task that is exporting this asset to IPFS.
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
ID of the last task to run successfully, that created the currently saved data.
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
ID of the last task to fail execution.
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
Current progress of the task updating the storage.
0.5
Error message if the last storage changed failed.
"Failed to update storage"
Was this page helpful?