--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/3f4cb89b-c885-4a51-b686-0d0e26fd14b8%40chromium.org.
Have you looked into the native messaging API? It looks like it does exactly what you want.
On Sun, Jan 31, 2016 at 7:26 AM, Baskin Tapkan <bas...@gmail.com> wrote:
Interesting question. I would do the same thing with a simple Node server on the localhost. Would you consider using a 'Chrome App'? I haven't created one yet, but it looks it has more hooks into running with native Hardware, especially the last point. Good luck!
- Chrome Apps can integrate seamlessly into the desktop and look more like desktop applications than traditional web apps.
- Chrome Apps for Desktop have no omnibox (address bar) and tab strip like normal browser-based apps, because like native desktop apps, they don’t live in a browser.
- The Chrome App Launcher makes it easy for users to find and start your Chrome App.
- OS X users can use the integrated spotlight search to find and start your app.
- Chrome Apps for Desktop can access the host computer’s file system and make use of hardware features (like USB, Bluetooth and attached human interface devices).
On Sunday, January 31, 2016 at 6:45:59 AM UTC-6, Pāvils Jurjāns wrote:I'd like to develop a solution that allows authorized JavaScript to pass&receive data to the Python script running on the client.The environment is fully controlled, ie home or school's class.The Python script (running in background as server) controls various peripherals (Synthesizer via MIDI, Arduino via USB serial), and I'd like to create Blockly - based API to write simple programs that communicate with those peripherals.I think this communication could be enabled by custom Chrome extension that exposes to the web page's JavaScript some API that lets send and receive simple messages (let's say, string data). A Python script, running in background, would handle those messages and route them to peripherals as necessary.I tried to do without extension, by running a simple web server on localhost, but that's too much overhead and introduces latency problems (important working with MIDI), also it needs to be polled frequently to receive messages, what is pretty bad design.What would be the most appropriate way to handle this page JavaScript <-> local Python script communication?
--
You received this message because you are subscribed to the Google Groups "Chromium-Extensions-Announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.