2014-09-20, 02:32
For the above shown audio patch, It makes more sense to re-enable xbmc audio when chrome is closed. Otherwise the audio device is not available again which might cause trouble.
The shown code works only with xdotool installed. The audio is re enabled when chrome is closed after a short delay of 2000 msec.
So the complete thing would look like this.
The shown code works only with xdotool installed. The audio is re enabled when chrome is closed after a short delay of 2000 msec.
So the complete thing would look like this.
Code:
492 elif osLinux:
493 xbmc.audioSuspend()
494 xbmc.enableNavSounds(False)
495 xbmc.executebuiltin("RunPlugin(plugin://plugin.program.chrome.launcher/?url="+urllib.quote_plus(url)+"&mode=showSite&kiosk="+kiosk+"&userAgent="+urllib.quote_plus(userAgent)+")")
....
854 subprocess.Popen('xdotool key alt+f4', shell=True)
855 xbmc.sleep(2000)
856 xbmc.Player().stop()
857 xbmc.audioResume()
858 xbmc.enableNavSounds(True)
859 self.close()