Example #1
0
 def play(self):
     self.finished = 0
     url = self.options['uri']
     self.widget.load(
         QUrl.fromPercentEncoding(QByteArray(url.encode('utf-8'))))
     self.widget.show()
     self.widget.raise_()
     if float(self.duration) > 0:
         self.play_timer.setInterval(int(float(self.duration) * 1000))
         self.play_timer.start()
     self.started_signal.emit()
Example #2
0
 def play(self):
     self.finished = 0
     self.widget.show()
     self.widget.raise_()
     #---- kong ----
     url = self.options['uri']
     args = [
         str(self.rect.left()),
         str(self.rect.top()),
         str(self.rect.width()),
         str(self.rect.height()),
         QUrl.fromPercentEncoding(QByteArray(url.encode('utf-8')))
     ]
     #self.process.start('dist/web.exe', args) # for windows
     #self.process.start('./dist/web', args) # for RPi
     self.stop_timer.start()
Example #3
0
 def play(self):
     self.finished = 0
     self.widget.show()
     self.widget.raise_()
     #---- kong ----
     url = self.options['uri']
     l = str(self.rect.left())
     t = str(self.rect.top())
     w = str(self.rect.width())
     h = str(self.rect.height())
     s = f'--window-size={w},{h}'
     p = f'--window-position={l},{t}'
     args = [
         '--kiosk', s, p, QUrl.fromPercentEncoding(QByteArray(url.encode('utf-8')))
         #l, t, w, h, QUrl.fromPercentEncoding(QByteArray(url.encode('utf-8')))
     ]
     self.process.start('chromium-browser', args)
     #self.process.start('./xWeb', args)
     self.stop_timer.start()