passthrough not present in video.asset.track.ready event
Closed this issue · 5 comments
Mux allows defining a passthrough
value when creating an asset, and the value is returned in webhook payloads for all successful events types except video.asset.track.ready
. Is this omission consistent with the API or is this an omission at the sdk level.
passthrough: string
Arbitrary user-supplied metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. Max: 255 characters.
video.asset.track.ready event
{
"type": "video.asset.track.ready",
"request_id": null,
"object": {
"type": "track",
"id": "..."
},
"id": "...",
"environment": {
"name": "Development",
"id": "..."
},
"data": {
"type": "text",
"text_type": "subtitles",
"text_source": "generated_vod",
"status": "ready",
"name": "English",
"language_code": "en",
"id": "...",
"asset_id": "..."
},
"created_at": "2023-12-07T00:31:21.855000Z",
"attempts": [],
"accessor_source": null,
"accessor": null
}
video.asset.ready event
{
"type": "video.asset.ready",
"request_id": null,
"object": {
"type": "asset",
"id": "..."
},
"id": "...",
"environment": {
"name": "Development",
"id": "..."
},
"data": {
"tracks": [...],
"status": "ready",
"static_renditions": {
"status": "preparing"
},
"resolution_tier": "720p",
"playback_ids": [
{
"policy": "signed",
"id": "..."
}
],
"passthrough": "vM2kKlWMPnlB",
"mp4_support": "standard",
"max_stored_resolution": "HD",
"max_stored_frame_rate": 23.976,
"max_resolution_tier": "1080p",
"master_access": "none",
"id": "...",
"encoding_tier": "smart",
"duration": 274.190589,
"created_at": 1701909065,
"aspect_ratio": "16:9"
},
"created_at": "2023-12-07T00:31:07.795000Z",
"attempts": [],
"accessor_source": null,
"accessor": null
}
Hi @nwaughachukwuma, thanks for raising this.
This is actually an API limitation at the moment. We're discussing internally at the moment the best way to handle this for generated captions tracks, but for the moment you'd need to use data.asset_id
in the video.asset.track.ready
event to get back to correlate this event back to the appropriate asset.
Thanks, and apologies I don't have a better answer at the moment.
Thanks for the quick response @philcluff. The thing is that passthrough
is mapped to the id of a video on our platform, and it's not the same as asset_id
. There's also no way to retrieve this value from get-asset endpoint.
Thanks for the info @nwaughachukwuma, we do recommend that you store both asset and playback IDs in your own CMS integrations so you can lookup assets if needed, which do contain the passthrough
value.
I'll let you know when we have a more elegant solution on these tracks.
Thanks
Ok, thanks
Closing cause it looks like the confusion here was cleaned up. Thanks @nwaughachukwuma :)