mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 15:57:31 +09:00
PiP initial commit
This commit is contained in:
parent
5ec3ae4a4c
commit
9a1d4edaa9
14 changed files with 377 additions and 1 deletions
|
|
@ -442,6 +442,11 @@ nsContextMenu.prototype = {
|
|||
this.showItem("context-media-loop", onMedia);
|
||||
this.showItem("context-media-showcontrols", onMedia && !this.target.controls);
|
||||
this.showItem("context-media-hidecontrols", this.target.controls && (this.onVideo || (this.onAudio && !this.inSyntheticDoc)));
|
||||
this.showItem("context-video-pictureinpicture", this.onVideo);
|
||||
this.setItemAttr("context-video-pictureinpicture", "disabled",
|
||||
!this.onVideo || this.target.error ||
|
||||
!this.target.videoWidth || !this.target.videoHeight ||
|
||||
!!this.target.mediaKeys);
|
||||
this.showItem("context-video-fullscreen", this.onVideo && this.target.ownerDocument.fullscreenElement == null);
|
||||
this.showItem("context-media-eme-learnmore", this.onDRMMedia);
|
||||
this.showItem("context-media-eme-separator", this.onDRMMedia);
|
||||
|
|
@ -1682,6 +1687,11 @@ nsContextMenu.prototype = {
|
|||
this.browser.messageManager.sendAsyncMessage("SwitchDocumentDirection");
|
||||
},
|
||||
|
||||
pictureInPicture: function() {
|
||||
let {PictureInPicture} = Cu.import("resource:///modules/PictureInPicture.jsm", {});
|
||||
PictureInPicture.open(this.browser, this.target);
|
||||
},
|
||||
|
||||
mediaCommand : function(command, data) {
|
||||
let mm = this.browser.messageManager;
|
||||
let win = this.browser.ownerGlobal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue