Currently the default getLicense() functions are permissive in that they won't pass an error to the callback if the request returns something in the 4/500 range. The reason being that in some cases, a license server might return a valid license even if the server sends a code in that range.
We decided it makes sense to fix the default behavior to callback with an error for such status codes. If a developer wants to use the old behavior, they can override the default getLicense() function by passing their own with keySystems.
Specific additions
For status codes >= 400 && <= 599, an empty object is passed as the error (callback({})) and emeError() has been modified to call player.error({code: 5, message: null}) in that case, which will use the default MEDIA_ERR_ENCRYPTED message ("The media is encrypted and we do not have the keys to decrypt it.")
Description
Currently the default
getLicense()
functions are permissive in that they won't pass an error to the callback if the request returns something in the 4/500 range. The reason being that in some cases, a license server might return a valid license even if the server sends a code in that range.We decided it makes sense to fix the default behavior to callback with an error for such status codes. If a developer wants to use the old behavior, they can override the default
getLicense()
function by passing their own withkeySystems
.Specific additions
For status codes >= 400 && <= 599, an empty object is passed as the error (
callback({})
) andemeError()
has been modified to callplayer.error({code: 5, message: null})
in that case, which will use the defaultMEDIA_ERR_ENCRYPTED
message ("The media is encrypted and we do not have the keys to decrypt it.")