A heartwarming hello to the awesome Shaka Team,
I have a situation now, where I need to pass headers, keyMessage (provided by player) and JSON to license server call and it will return a JSON response then I have to parse the license key from the response and convert it to ArrayBuffer and pass to the player.
I am trying to figure out how to JSON data and parse the response. Is there any way to do that like we can pass a function that will call and return the ArrayBuffer instead of passing the license url?
Many thanks in advance,
A Fan,
Vikas Bansal
You'll want to take a look at the License Wrapping tutorial:
https://github.com/google/shaka-player/blob/master/docs/tutorials/license-wrapping.md
@bansalvks, as @chrisfillmore suggested, you can follow our license wrapping tutorial which will walk you through registering request and response filters.
Request and response filters will allow you to intercept the request and modify it as you described without the player needing to know anything.
Does that answer your question?
Yes @vaage
Many thanks for your kind answer @chrisfillmore I am grateful to you.
Thank you for your guidance and support.