Bug 1621166 - part1 : add a method to know if media element is being used in PIP mode. r=bryce

Differential Revision: https://phabricator.services.mozilla.com/D67380
This commit is contained in:
alwu
2020-03-19 21:01:12 +00:00
parent 08febe750d
commit 03d2cd3600
2 changed files with 10 additions and 0 deletions

View File

@@ -7780,6 +7780,13 @@ void HTMLMediaElement::ClearStopMediaControlTimerIfNeeded() {
}
}
bool HTMLMediaElement::IsBeingUsedInPictureInPictureMode() const {
if (!IsVideo()) {
return false;
}
return static_cast<const HTMLVideoElement*>(this)->IsCloningElementVisually();
}
} // namespace dom
} // namespace mozilla