HTML5 mode suggestions
|Reported by:||JAremko||Owned by:||JAremko|
I'm making an April Fools' Day button for spacemacs.org with Xpra HTML5 and Docker Swarm back-end with the default load balancer. Here it is: http://xpratest.tk (temporary location) I had to modify Xpra code to make it work properly(ish).
I think it will be great to make it doable with the unmodified Xpra
So the modifications:
First of all client need the ability to reconnect without refreshing page. It includes killing web workers and timers +
Client constructor calls
Utilities.getAudioContext that creates audio contexts (they are limited per page)
Also the error
WebSocket connection to 'ws://****/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED should be handled properly (It occurs when there is no live backends)
At the server side I needed a way to drop the new WS client instead of the old one - this way a client will attempt to connect until it hits a live container without a client. And it has to be done before the new client will be able to mess up with the previous one (for example, force disconnect)
- - - - - - - - - - -
WARNING: eye bleed inducing code smell ahead!
For now random hello timeouts seems to be the biggest problem. I had to UP the timeout substantially. (may be Docker related problem - I built it from github trunk, because I needed some extra sandbox features)