示例#1
0
	def play(self, url, listitem, window=False):
		super(VideoPlayer, self).play(item=url, listitem=listitem, windowed=False, startpos=-1)
		for i in range(30):
			if xbmc.getCondVisibility('VideoPlayer.IsFullscreen'):
				if window and window.window_type == 'dialog':
					wm.add_to_stack(window)
					window.close()
					self.wait_for_video_end()
					return wm.pop_stack()
			xbmc.sleep(1000)
示例#2
0
 def play_from_button(self, url, listitem, window=False, type='', dbid=0):
     if dbid != 0:
         item = '{"%s": %s}' % (type, dbid)
     else:
         item = '{"file": "%s"}' % url
     Utils.get_kodi_json(method='Player.Open', params='{"item": %s}' % item)
     for i in range(90):
         if xbmc.getCondVisibility('VideoPlayer.IsFullscreen'):
             if window and window.window_type == 'dialog':
                 wm.add_to_stack(window)
                 window.close()
                 self.wait_for_video_end()
                 return wm.pop_stack()
         xbmc.sleep(1000)
 def play(self, url, listitem, window=False):
     super(VideoPlayer, self).play(item=url,
                                   listitem=listitem,
                                   windowed=False,
                                   startpos=-1)
     xbmc.sleep(1000)
     for i in range(120):
         if self.isPlayingVideo():
             if window and window.window_type == 'dialog':
                 wm.add_to_stack(window)
                 window.close()
                 self.wait_for_video_end()
                 return wm.pop_stack()
         xbmc.sleep(1000)
示例#4
0
 def play_from_button(self, url, listitem, window=False, type='', dbid=0):
     Utils.show_busy()
     if dbid != 0:
         item = '{"%s": %s}' % (type, dbid)
         Utils.get_kodi_json(method='Player.Open',
                             params='{"item": %s}' % item)
     else:
         item = '{"file": "%s"}' % url
         xbmc.executebuiltin('RunPlugin(%s)' % url)
     for i in range(90):
         xbmc.log(str(xbmcgui.getCurrentWindowDialogId()) + '===>OPENINFO',
                  level=xbmc.LOGNOTICE)
         if xbmcgui.getCurrentWindowDialogId(
         ) > 11999 and xbmcgui.getCurrentWindowDialogId() < 12999:
             Utils.hide_busy()
         if xbmc.getCondVisibility('VideoPlayer.IsFullscreen'):
             if window and window.window_type == 'dialog':
                 wm.add_to_stack(window)
                 window.close()
                 self.wait_for_video_end()
                 return wm.pop_stack()
         xbmc.sleep(1000)