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
Add values to VariantParams #89
Comments
The error you should be getting is:
This is because the append method on MasterPlaylist is func (p *MasterPlaylist) Append(uri string, chunklist *MediaPlaylist, params VariantParams) As Go is a strongly typed language, the only type that can be used for the 3rd argument is a type So you won't be able to do exactly what you want this way. If the HLS RFC does have this as a field, we can add it to the Side note, because the Append method already resets the cache, you don't need to do that. masterPlaylist.ResetCache() Removing the above line shouldn't change the output. |
I ended up adding what I needed by forking the repo here: Spuul@a418099 |
Yeah that would be the change that's required to add support for that field (to write that field, but you'll need to do more to read the field), I take it this isn't a field in the HLS RFC? If it is, we'll be happy to add that field ourselves. |
It's a custom field. We're also using a Javascript library https://github.com/tedconf/node-m3u8 which has a non-annoying item.set API. I am not sure how that works in a strongly typed sense.. |
If it's a custom field and you're OK with running a fork, then that'll be the best option until we support some kind of custom fields, such as |
There was another request for custom fields: #82. I think we need some time for clarifying needs for this and implementing it without breaking existent API. So thank for a question! |
Another field I need is AVERAGE-BANDWIDTH.. guess I will be adding it to my fork. https://github.com/Spuul/go-m3u8 |
Any field in the the HLS draft RFC can be added to this library by either asking if we can implement or sending a pull request. It's only custom fields that there's a limitation and a fork may be your best option. |
Ok, I'll try implement it and do a pull request spefically only upon AVERAGE-BANDWIDTH |
Sorry, I am a Golang newbie and my use case is to introduce a new key into the variant called 'rendition-id' to help clients create a rendition switcher.
Perhaps this is the same as #82. Anyway, just thought I'd convey my use case. My tact now is to fork and add the missing values.
The text was updated successfully, but these errors were encountered: