def _videoMonitor(self):
hasFullScreened = False
ct = 0
while self.isPlayingVideo() and not xbmc.abortRequested and not self._closed:
self.currentTime = self.getTime()
util.MONITOR.waitForAbort(0.1)
if xbmc.getCondVisibility('Window.IsActive(videoosd) | Player.ShowInfo'):
if not self.hasOSD:
self.hasOSD = True
self.onVideoOSD()
else:
self.hasOSD = False
if xbmc.getCondVisibility('Window.IsActive(seekbar)'):
if not self.hasSeekOSD:
self.hasSeekOSD = True
self.onSeekOSD()
else:
self.hasSeekOSD = False
if xbmc.getCondVisibility('VideoPlayer.IsFullscreen'):
if not hasFullScreened:
hasFullScreened = True
self.onVideoWindowOpened()
elif hasFullScreened and not xbmc.getCondVisibility('Window.IsVisible(busydialog)'):
hasFullScreened = False
self.onVideoWindowClosed()
ct += 1
if ct > 9:
ct = 0
self.handler.tick()
if hasFullScreened:
self.onVideoWindowClosed()
评论列表
文章目录