wasm: fix mic and camera permissions on firefox
For whatever reason, exceptions are raised on Firefox when checkPermissions is called., "'camera' (value of 'name' member of PermissionDescriptor) is not a valid value for enumeration PermissionName." and "'microphone' (value of 'name' member of PermissionDescriptor) is not a valid value for enumeration PermissionName." so instead of changing to denied when this happens, just issue a silent warning and continue. Fixes: QTBUG-125381 Pick-to: 6.7 6.6 Change-Id: I03ee45297d28f4b99cc96f593cf529113747488b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
41cb01dc59
commit
d2fbcc4cfe
@ -51,9 +51,13 @@ namespace
|
||||
{
|
||||
updatePermission(permissionName, permissionState["state"].as<std::string>(), {});
|
||||
};
|
||||
callbacks.catchFunc = [permissionName](val)
|
||||
callbacks.catchFunc = [permissionName](val err)
|
||||
{
|
||||
updatePermission(permissionName, wapiDenied, {});
|
||||
if (err["name"].as<std::string>() == "NotAllowedError")
|
||||
return updatePermission(permissionName, wapiDenied, {});
|
||||
|
||||
qCInfo(lcPermissions, "'%s' '%s'", err["name"].as<std::string>().c_str(),
|
||||
err["message"].as<std::string>().c_str());
|
||||
};
|
||||
|
||||
val query = val::object();
|
||||
|
Loading…
x
Reference in New Issue
Block a user