Hi tofumatt, Good to know you are interested in the FxOS's api about the media remote controls. Those two issues are really good questions and probably also two of the top 5 that people care about if they are developing some media apps(like you do).
The first one: https://github.com/mozilla/high-fidelity/issues/40 How the music app tell the lockscreen to show the metadata is using the api called IAC(Inter App Communication)[1], and Tim is correct, currently only Certified Apps can use it, maybe in the future the platform will enable the capabilities for the Privileged Apps but I am not sure. The second one: https://github.com/mozilla/high-fidelity/issues/41 If I understood correctly, you should be talking about the bluetooth profile called AVRCP(The Audio/Video Remote Control Profile)[2] that has the capabilities to control the media players via bluetooth protocols, I am glad to tell you that we do support it in FxOS! AVRCP 1.0 and 1.3 are both supported so it means the play/pause commands you are looking for can be implemented, by listening to the system messages[3]. And I think you already found the shared module we use in gaia for the remote controls[4], it was implemented to handle both IAC and AVRCP since there are both controls outside of music app, you could probably pick up the system message part then adopt it to your app, and should be able to fix the second issue. [1] https://wiki.mozilla.org/WebAPI/Inter_App_Communication [2] http://en.wikipedia.org/wiki/List_of_Bluetooth_profiles#Audio.2FVideo_Remote_Control_Profile_.28AVRCP.29 [3] https://developer.mozilla.org/en-US/docs/Web/API/Navigator.mozSetMessageHandler [4] https://github.com/mozilla-b2g/gaia/blob/master/shared/js/media/remote_controls.js Thanks, -Dominic ----- Original Message ----- From: "Tim Chien" <timdr...@mozilla.com> To: "tofumatt" <tofum...@mozilla.com>, "Dominic Kuo" <d...@mozilla.com> Cc: "mozilla-dev-g...@lists.mozilla.org" <dev-g...@lists.mozilla.org>, dev-webapps@lists.mozilla.org Sent: Saturday, September 6, 2014 12:34:10 AM Subject: Re: Review of recroom Web app recommendation for B2G-specific optimizations CC+ Dominic who works on these piece. AFAIK the features you are looking at are implemented with IAC API, which is certified app only. So unfortunately as an 3rd-party app, you can't touch these bits in FxOS, for now. I know it's frustrating to find out that, but I can assure you that Gaia developers are equally disappointed to work on a coupled-to-system and certified-app-only solution (as opposed to general solution) when being pushed by external feature requests. On Fri, Aug 22, 2014 at 3:08 AM, tofumatt <tofum...@mozilla.com> wrote: > Howdy dev-gaia and dev-webapps folks! > > I recently wrote about recroom, an effort from some folks on the Apps > Engineering Team at Mozilla to supply web developers with a good set of > tools/docs on writing offline web apps, mainly geared at Firefox OS. I’d > really like some help from people with Firefox OS experience to optimize > these recommendations for Firefox OS—especially in terms of performance or > user experience. > > Rec Room came out of me writing High Fidelity—a Podcasts app for Firefox OS. > The app is up at https://marketplace.firefox.com/app/podcasts/ and the code > is at https://github.com/mozilla/high-fidelity/ > > I’d love to know what could be done in the app to make it perform better on > Firefox OS. From things like memory/CPU usage to issues like > https://github.com/mozilla/high-fidelity/issues/41 and > https://github.com/mozilla/high-fidelity/issues/40 that are more UX focused. > > I want to take these fixes and push them back into rec room, so developers > with more complex needs can write apps for Firefox OS that perform well :-) > > I’m on IRC as tofumatt and hang out in the #apps channel, but also just > filing GitHub issues would be crazy helpful. Thanks a bunch :-) > > - tofumatt > _______________________________________________ > dev-webapps mailing list > dev-webapps@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-webapps -- Tim Guan-tin Chien, Engineering Manager and Front-end Lead, Firefox OS, Mozilla Corp. (Taiwan) _______________________________________________ dev-webapps mailing list dev-webapps@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-webapps