| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html> |
| 3 <head> |
| 4 <title>Media Router Integration Test - Receiver Page</title> |
| 5 <script> |
| 6 const addConnection = connection => { |
| 7 connection.onconnect = () => { |
| 8 connection.onmessage = event => { |
| 9 if (event.data == 'close') { |
| 10 connection.close(); |
| 11 } else { |
| 12 connection.send('Pong: ' + event.data); |
| 13 } |
| 14 } |
| 15 }; |
| 16 }; |
| 17 |
| 18 navigator.presentation.receiver.connectionList |
| 19 .then(list => { |
| 20 list.onconnectionavailable = evt => { |
| 21 addConnection(evt.connection); |
| 22 }; |
| 23 list.connections.map(connection => { |
| 24 addConnection(connection); |
| 25 }); |
| 26 }); |
| 27 </script> |
| 28 </head> |
| 29 <body> |
| 30 </body> |
| 31 </html> |
| OLD | NEW |