mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	add hotkey to toggle Picture-In-Picture
This commit is contained in:
		
							parent
							
								
									6e52d46067
								
							
						
					
					
						commit
						4a3f5d69c7
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -100,7 +100,7 @@ export default {
 | 
				
			||||||
        this.hotkeysPromise.then(() => {
 | 
					        this.hotkeysPromise.then(() => {
 | 
				
			||||||
            var self = this;
 | 
					            var self = this;
 | 
				
			||||||
            this.$hotkeys(
 | 
					            this.$hotkeys(
 | 
				
			||||||
                "f,m,j,k,l,c,space,up,down,left,right,0,1,2,3,4,5,6,7,8,9,shift+n,shift+,,shift+.,return,.,,",
 | 
					                "f,m,j,k,l,c,space,up,down,left,right,0,1,2,3,4,5,6,7,8,9,shift+n,shift+,,shift+.,alt+p,return,.,,",
 | 
				
			||||||
                function (e, handler) {
 | 
					                function (e, handler) {
 | 
				
			||||||
                    const videoEl = self.$refs.videoEl;
 | 
					                    const videoEl = self.$refs.videoEl;
 | 
				
			||||||
                    switch (handler.key) {
 | 
					                    switch (handler.key) {
 | 
				
			||||||
| 
						 | 
					@ -196,6 +196,11 @@ export default {
 | 
				
			||||||
                        case "shift+.":
 | 
					                        case "shift+.":
 | 
				
			||||||
                            self.$player.trickPlay(Math.min(videoEl.playbackRate + 0.25, 2));
 | 
					                            self.$player.trickPlay(Math.min(videoEl.playbackRate + 0.25, 2));
 | 
				
			||||||
                            break;
 | 
					                            break;
 | 
				
			||||||
 | 
					                        case "alt+p":
 | 
				
			||||||
 | 
					                            document.pictureInPictureElement
 | 
				
			||||||
 | 
					                                ? document.exitPictureInPicture()
 | 
				
			||||||
 | 
					                                : videoEl.requestPictureInPicture();
 | 
				
			||||||
 | 
					                            break;
 | 
				
			||||||
                        case "return":
 | 
					                        case "return":
 | 
				
			||||||
                            self.skipSegment(videoEl);
 | 
					                            self.skipSegment(videoEl);
 | 
				
			||||||
                            break;
 | 
					                            break;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue