add chrome compatibility

The actual demo doesn't work with chrome because of a bug or a wished limitation of the permission behavior on that browser.

Here is a hack that make it works for chrome and FF.