jeff
jeff

Reputation: 1197

SetInterval is not working in Kindle and Kobo Browsers

I want do stream images to my e-ink reader's browser. I have a Kobo Aura H2O and a Kindle Paperwhite.
I have tried multiple mechanics but nothing seems to work, because the browser ignores half of the javascript.
Websockets do not work, setInterval to update the image regularly does not work neither
Are there any Specs of this Browsers to be found? What other alternatives within Javascript are there to test?

Upvotes: 1

Views: 448

Answers (2)

Himbeer
Himbeer

Reputation: 151

The Kindle browser does technically support WebSockets (even on the very first Kindle Touch), however because it's based on a very old version of Webkit, it's the very first version (or one of the first versions, I'm not exactly sure) of the WebSocket spec which is very different from the current one and isn't supported in the majority of Websocket libraries.

I made a very bad patch for the Node ws library here: https://github.com/HimbeersaftLP/ws

Google's pywebsocket also supports it: https://github.com/google/pywebsocket/wiki/WebSocketProtocolSpec

Upvotes: 1

jeff
jeff

Reputation: 1197

setInterval actually works, the problem was that I have used es6 instead of es5 js syntax.
Websockets also work with Kobo Browser but not on Kindle

Upvotes: 0

Related Questions