aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/PictureInPicture.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Screens/PictureInPicture.py')
-rw-r--r--lib/python/Screens/PictureInPicture.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/python/Screens/PictureInPicture.py b/lib/python/Screens/PictureInPicture.py
index 403ecd3d..20cdb236 100644
--- a/lib/python/Screens/PictureInPicture.py
+++ b/lib/python/Screens/PictureInPicture.py
@@ -1,5 +1,5 @@
from Screens.Screen import Screen
-from enigma import ePoint, eSize
+from enigma import ePoint, eSize, eServiceCenter
from Components.VideoWindow import VideoWindow
@@ -8,6 +8,7 @@ class PictureInPicture(Screen):
Screen.__init__(self, session)
self["video"] = VideoWindow()
+ self.currentService = None
def move(self, x, y):
print "moving pip to", str(x) + ":" + str(y)
@@ -22,4 +23,18 @@ class PictureInPicture(Screen):
return ((self.instance.position().x(), self.instance.position().y()))
def getSize(self):
- return (self.instance.size().width(), self.instance.size().height()) \ No newline at end of file
+ return (self.instance.size().width(), self.instance.size().height())
+
+ def playService(self, service):
+ self.pipservice = eServiceCenter.getInstance().play(service)
+ if self.pipservice and not self.pipservice.setTarget(1):
+ self.pipservice.start()
+ self.currentService = service
+ return True
+ else:
+ self.pipservice = None
+ return False
+
+ def getCurrentService(self):
+ return self.currentService
+