Skip to content

Commit

Permalink
Sync example 6 with changes in #221.
Browse files Browse the repository at this point in the history
  • Loading branch information
anssiko committed Dec 15, 2015
1 parent a8ce362 commit 626a59e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions index.html
Expand Up @@ -579,12 +579,15 @@ <h3>
connection.send("hello");
};
};
navigator.presentation.receiver.getConnection().then(addConnection);
navigator.presentation.receiver.onconnectionavailable = function(evt) {
navigator.presentation.receiver.getConnections().then(function(connections) {
addConnection(connections[connections.length-1]);

navigator.presentation.receiver.connections.then(function (list) {
list.connections.map(function (connection) {
addConnection(connection);
});
};
list.connections.onconnectionavailable = function (connections) {
addConnection(connections[connections.length - 1]);
};
});
&lt;/script&gt;

</pre>
Expand Down

0 comments on commit 626a59e

Please sign in to comment.