In addition to the information given here, I want to mention that in Chrome, if you use https or not, this will affect the availability of the navigator.requestMediaKeySystemAccess function.
In your development environment, which probably runs on http , navigator.requestMediaKeySystemAccess will return undefined for Chrome , while the same code will return the function in Firefox .
In your prod environment that has https , navigator.requestMediaKeySystemAccess will return the function in both Chrome and Firefox.
source share