Search code examples
usbxulxulrunner

Is there a way in Xul to get notifications of new USB devices plugged?


Is there a way in Xul to get notifications of new USB devices plugged?


Solution

  • As Neil said I don't think there is a way through the XULRunner API to get this notification. However this should be possible using a C++ XPCOM component which would use the OS API to access to the USB information. Here is a good tutorial for creating your own component.

    You can also try have a look at Songbird source code in the "components" section, I can imagine they are accessing USB devices.