You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In all cases where data is sanitized, the next steps says, "If the previous step failed, reject promise..." This should probably say, "If the previous step failed or the sanitized data is empty, reject promise..."
For init data, the issue is a little more complex. The sanitization step says to "remove entries that are not needed by the CDM," which could result in an empty sanitized init data. If the promise is rejected there, InvalidAccessError would be used. However, the original intent before sanitization and currently-defined behavior would be for the CDM to reject the promise with NotSupportedError, which is more accurate - the initData did not contain data supported by this CDM.
The text was updated successfully, but these errors were encountered:
I agree with both proposals: empty sanitized data should reject the promise with InvalidAccessError in normal cases, and Not SupportedError for sanitized init data.
Shouldn't it be up to the CDM whether empty data is valid or not ? I know all existing CDMs expect something in the initData, but I don't see any reason why a CDM could not be made which accepted empty initData as valid.
I agree with @jdsmith3000. NotSupportedError communicates the correct information to the application if all init data was sanitized away.
I've had discussions about this very thing with app developers who were confused about InvalidAccessError and couldn't understand that they were passing only unusable init data. A specific error to indicate that the init data wasn't invalid per se, but merely not supported by this CDM, would allow an app developer to recognize their own mistake and fix their app without several round trips to a CDM vendor's support people.
@mwatson2 I don't see any reason empty data should be considered valid without a specific use-case for this. It doesn't seem to add any value, and nobody seems to do it or need it today.
In all cases where data is sanitized, the next steps says, "If the previous step failed, reject promise..." This should probably say, "If the previous step failed or the sanitized data is empty, reject promise..."
For init data, the issue is a little more complex. The sanitization step says to "remove entries that are not needed by the CDM," which could result in an empty sanitized init data. If the promise is rejected there,
InvalidAccessError
would be used. However, the original intent before sanitization and currently-defined behavior would be for the CDM to reject the promise withNotSupportedError
, which is more accurate - theinitData
did not contain data supported by this CDM.The text was updated successfully, but these errors were encountered: