Bug 1493982 accept only sinkIds exposed via enumerateDevices() r=jib

and reject with NotFoundError otherwise.

Depends on D118444

Differential Revision: https://phabricator.services.mozilla.com/D118445
This commit is contained in:
Karl Tomlinson
2021-07-06 23:37:33 +00:00
parent 5bdd503601
commit da8ba7f503
4 changed files with 53 additions and 32 deletions

View File

@@ -7560,9 +7560,6 @@ already_AddRefed<Promise> HTMLMediaElement::SetSinkId(const nsAString& aSinkId,
"The object can not be found here.");
break;
}
case NS_ERROR_DOM_MEDIA_NOT_ALLOWED_ERR:
promise->MaybeReject(NS_ERROR_DOM_NOT_ALLOWED_ERR);
break;
default:
MOZ_ASSERT_UNREACHABLE("Invalid error.");
}