Hi, Actually the event of HW button is limited to access by Chrome (B2G) process only. And Gecko didn't send it via IPC into other content process. This is why your app (in content process) can't listen any event from HW buttom.
Sincerely yours. ----- Original Message ----- From: "Rodrigue Villetard" <[email protected]> To: "Alive Kuo" <[email protected]> Cc: [email protected] Sent: 2013年6月13日 星期四 21:12:29 Subject: Re: [b2g] catching volume events Hi, Thanks for your answer and sorry for my own long answering delay… I’ve read the issues on bugzilla thate Alive (is this your firstname ? sorry for asking…) pointed me out, unfortunately, that didn’t solve my problem. After that, I’ve found in GAIA code those two files : https://github.com/mozilla-b2g/gaia/blob/979126f56c6ad3608770049f5ba71cf3e0c3857f/apps/system/js/hardware_buttons.js https://github.com/mozilla-b2g/gaia/blob/979126f56c6ad3608770049f5ba71cf3e0c3857f/apps/system/js/sound_manager.js As far as i understand, some events should be triggered on window object, such as "volumeup", "volumedown", "home", etc. But, in my code, my listener never call the callback : window.addEventListener('volumeup', callback); // callback is never called… Does anybody have a clue ? Note I am working with a peak OS Version : 1.0.1.0 prerelease (standard OTA version) best regards, Rodrigue On 2013-05-28 04:29, Alive Kuo wrote: > Hi, > > Unfortunately you couldn't access any hardware button now from your > app. > See this for reference: > https://bugzilla.mozilla.org/show_bug.cgi?id=839446 [3] Implement > DOM3 KeyboardEvent types for media > > -- > Alive C. Kuo, Front-end Eng., Mozilla Corp. (Taiwan, Taipei) > > Rodrigue Villetard <[email protected]> 於 2013/5/28 > 上午2:13 寫道: > >> Hi all! >> >> Is there a way to access volume buttons event ? >> >> I’m currently developping a FirefoxOS mpd client (http://musicpd.org >> [1] && http://hgrepos.sacristi.fr/barosofts/foxympd [2]) and I would >> like to propose (as an option) volume button mapping to adjust server >> volume instead of emulate with html buttons. >> >> regards, >> Rodrigue. >> _______________________________________________ >> dev-b2g mailing list >> [email protected] >> https://lists.mozilla.org/listinfo/dev-b2g > > > > Links: > ------ > [1] http://musicpd.org > [2] http://hgrepos.sacristi.fr/barosofts/foxympd > [3] https://bugzilla.mozilla.org/show_bug.cgi?id=839446 _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
