When no monitor is connected ('connectionState = 0' ), the div below will request that the device be connected to a monitor.
When connected, the device will automatically enter native mirroring ('connectionState = 1' ). This demo uses that notification of a mirroring connection state to trigger a call to the 'connectToScreen()' function, which moves the external monitor from mirroring to a full connection.
When the change to a full connection state occurs ('connectionState = 2' ), this demo triggers a call to open a test page on the external display and changes the status message shown below.
No external monitor detected.