- self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue")
- self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
- self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow")
+ if (self.allowPiP):
+ self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue")
+ self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
+ self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow")
+ else:
+ self.addExtension((self.getShowHideName, self.showPiP, self.pipShown), "blue")
+ self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")