mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 23:37:33 +09:00
PiP initial commit
This commit is contained in:
parent
5ec3ae4a4c
commit
9a1d4edaa9
14 changed files with 377 additions and 1 deletions
|
|
@ -5183,6 +5183,15 @@ bool HTMLMediaElement::IsActive() const
|
|||
return ownerDoc && ownerDoc->IsActive() && ownerDoc->IsVisible();
|
||||
}
|
||||
|
||||
void HTMLMediaElement::SetMozPictureInPicture(bool aEnabled)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mPictureInPicture = aEnabled;
|
||||
if (mDecoder && !mDecoder->IsShutdown()) {
|
||||
mDecoder->NotifyOwnerActivityChanged(!IsHidden());
|
||||
}
|
||||
}
|
||||
|
||||
bool HTMLMediaElement::IsHidden() const
|
||||
{
|
||||
nsIDocument* ownerDoc;
|
||||
|
|
|
|||
|
|
@ -211,6 +211,9 @@ public:
|
|||
|
||||
virtual bool IsHidden() const final override;
|
||||
|
||||
bool MozPictureInPicture() const { return mPictureInPicture; }
|
||||
void SetMozPictureInPicture(bool aEnabled);
|
||||
|
||||
// Called by the media decoder and the video frame to get the
|
||||
// ImageContainer containing the video data.
|
||||
virtual VideoFrameContainer* GetVideoFrameContainer() final override;
|
||||
|
|
@ -1622,6 +1625,9 @@ protected:
|
|||
// Info about the played media.
|
||||
MediaInfo mMediaInfo;
|
||||
|
||||
// Set only by privileged Picture-in-Picture UI; cleared when it closes.
|
||||
bool mPictureInPicture = false;
|
||||
|
||||
// True if the media has encryption information.
|
||||
bool mIsEncrypted;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue