Skip to content

passthrough not present in video.asset.track.ready event #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nwaughachukwuma opened this issue Dec 7, 2023 · 5 comments
Closed

passthrough not present in video.asset.track.ready event #321

nwaughachukwuma opened this issue Dec 7, 2023 · 5 comments
Assignees

Comments

@nwaughachukwuma
Copy link

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
}
@philcluff
Copy link
Collaborator

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.

@philcluff philcluff self-assigned this Dec 7, 2023
@nwaughachukwuma
Copy link
Author

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.

@philcluff
Copy link
Collaborator

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

@nwaughachukwuma
Copy link
Author

Ok, thanks

@dylanjha
Copy link
Collaborator

Closing cause it looks like the confusion here was cleaned up. Thanks @nwaughachukwuma :)

jsanford8 pushed a commit that referenced this issue Feb 25, 2025
* chore: rebuild project due to codegen change (#523)

* docs: remove suggestion to use `npm` call out (#525)

* chore: remove redundant word in comment (#526)

* feat(internal): make git install file structure match npm (#527)

* chore(internal): remove unnecessary getRequestClient function (#528)

* chore(internal): bump cross-spawn to v7.0.6 (#529)

Note: it is a dev transitive dependency.

* chore(types): nicer error class types + jsdocs (#530)

* chore(internal): update isAbsoluteURL (#531)

* feat: generate more types that are used as request bodies (#532)

* feat(api): api update (#533)

* trigger CI

* chore(internal): fix some typos (#534)

* codegen metadata

* fix(client): normalize method (#535)

* feat: Add video.asset.non_standard_input_detected webhook (#317) (#536)

* docs: minor formatting changes (#537)

* chore(internal): codegen related update (#538)

* chore(internal): codegen related update (#539)

* chore(internal): codegen related update (#541)

* feat(client): send `X-Stainless-Timeout` header (#542)

* feat: Add passthrough field on static renditions (#320) (#543)

* feat: Additional Standard Dimensions (#319) (#544)

* fix(client): fix export map for index exports (#545)

* chore!: deprecate `mp4_support` option (#321) (#547)

* chore(internal): fix devcontainers setup (#548)

* codegen metadata

* release: 10.0.0

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Samuel El-Borai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants