Skip to content
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

New generated_vod text source not present in Track model #75

Closed
martinbean opened this issue Oct 5, 2023 · 7 comments
Closed

New generated_vod text source not present in Track model #75

martinbean opened this issue Oct 5, 2023 · 7 comments
Assignees

Comments

@martinbean
Copy link

I’ve been playing with auto-generated captions for on-demand video. I’ve managed to successfully generate a subtitles text track for a video asset, but then when using the Mux PHP SDK to list assets, I get the following error:

Invalid value 'generated_vod' for 'text_source', must be one of 'uploaded', 'embedded', 'generated_live', 'generated_live_final'

The error seems to stem from here:

$allowedValues = $this->getTextSourceAllowableValues();
if (!is_null($text_source) && !in_array($text_source, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value '%s' for 'text_source', must be one of '%s'",
$text_source,
implode("', '", $allowedValues)
)
);
}

The issue seems to be, that there’s no constant representing the value generated_vod in the getTextSourceAllowableValues method: https://github.com/muxinc/mux-php/blob/c69f2d4c84f2be3d50f3f44895468535e0a7266d/MuxPhp/Models/Track.php#L352C21-L360

So seems this just needs updating with a new self::TEXT_SOURCE_GENERATED_VOD constant.

@jsanford8
Copy link
Contributor

hey @martinbean - thanks for this! We're actively working on a release of our SDKs for these new features, and hope to have one out within a few days.

@dylanjha
Copy link

dylanjha commented Nov 1, 2023

@martinbean is this resolved for you as of 3.12?

@martinbean
Copy link
Author

@martinbean is this resolved for you as of 3.12?

Unfortunately not. A constant for generated_vod is still missing, even in v3.12.0:

https://github.com/muxinc/mux-php/blob/3.12.0/MuxPhp/Models/Track.php#L352-L360

@philcluff
Copy link
Contributor

Hey @martinbean, sorry for the oversight here, I'm working on a release that'll address this over the next day or so.

Thanks

@philcluff philcluff self-assigned this Nov 6, 2023
@philcluff
Copy link
Contributor

Hey @martinbean, this is fixed in 3.12.1 - please can you upgrade and let us know if you continue to see issues.

Thanks!

@martinbean
Copy link
Author

@philcluff Yup, that’s working now 👍

I would have submitted the code change myself, but thought I’d read the code was automatically generated from an API spec or something. Looking at the referenced PR, is that not the case?

@philcluff
Copy link
Contributor

@martinbean Yep, you're spot on, most our SDKs are generated form our OpenAPI specification, so it's best we update them.

Thanks!

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

4 participants