зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1698238 return default dictionary from GetUserMediaRequest#getConstraints() if no constraints are provided r=jib
For the case of a request constructed for "recording-device-stopped". Differential Revision: https://phabricator.services.mozilla.com/D108373
This commit is contained in:
Родитель
42f47f0844
Коммит
4d3822d024
|
@ -72,7 +72,12 @@ bool GetUserMediaRequest::IsHandlingUserInput() const {
|
|||
}
|
||||
|
||||
void GetUserMediaRequest::GetConstraints(MediaStreamConstraints& result) {
|
||||
result = *mConstraints;
|
||||
MOZ_ASSERT(result.mAudio.IsBoolean() && !result.mAudio.GetAsBoolean() &&
|
||||
result.mVideo.IsBoolean() && !result.mVideo.GetAsBoolean(),
|
||||
"result should be default initialized");
|
||||
if (mConstraints) {
|
||||
result = *mConstraints;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace mozilla::dom
|
||||
|
|
|
@ -23,10 +23,12 @@ struct MediaStreamConstraints;
|
|||
|
||||
class GetUserMediaRequest : public nsISupports, public nsWrapperCache {
|
||||
public:
|
||||
// For "getUserMedia:request"
|
||||
GetUserMediaRequest(nsPIDOMWindowInner* aInnerWindow,
|
||||
const nsAString& aCallID,
|
||||
const MediaStreamConstraints& aConstraints,
|
||||
bool aIsSecure, bool aIsHandlingUserInput);
|
||||
// For "recording-device-stopped"
|
||||
GetUserMediaRequest(nsPIDOMWindowInner* aInnerWindow, const nsAString& aRawId,
|
||||
const nsAString& aMediaSource, bool aIsHandlingUserInput);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче