shaka-project / shaka-player-embedded

Shaka Player in a C++ Framework
Apache License 2.0
236 stars 63 forks source link

Additional ShakaPlayerError arguments #197

Open okycelt opened 4 years ago

okycelt commented 4 years ago

As per docs, Shaka Player's shaka.util.Error has varArgs. However, there is no way to access these arguments in Shaka Player Embedded's ShakaPlayerError except parsing the ShakaPlayerError.message string, which is far from ideal. We use it e.g. to get the actual response from Widevine proxy when the player throws the 6007 LICENSE_REQUEST_FAILED error. Would it be possible to somehow support varArgs in ShakaPlayerError?

Thanks in advance

TheModMaker commented 4 years ago

We could add that. One problem is that in JavaScript, these are any kind of value, but that doesn't work well in C++. We'd probably just convert these to strings. So there'd be an array of strings for the data field.

okycelt commented 3 years ago

That should probably be sufficient. Thank you.