Confirmed users
110
edits
(→API) |
|||
Line 212: | Line 212: | ||
The lockscreen, in this example, wants to control '''only''' (no reasons, just an example) the music from the Gaia Music app (known origin). Once the lockscreen is ready, it sends a connection request of this kind: | The lockscreen, in this example, wants to control '''only''' (no reasons, just an example) the music from the Gaia Music app (known origin). Once the lockscreen is ready, it sends a connection request of this kind: | ||
connect('musicremotecontrol' | connect('musicremotecontrol').then((function onConnectionAccepted(ports) { | ||
if (ports.length > 1) { | if (ports.length > 1) { | ||
// We shouldn't be here as we only want to communicate with the Gaia Music app. | // We shouldn't be here as we only want to communicate with the Gaia Music app. |