![]() If the state has changed to "closed", the opposite set of actions occurs: the input box and "Send" button are disabled, the "Connect" button is enabled so that the user can open a new connection if they wish to do so, and the "Disconnect" button is disabled, since it's not useful when no connection exists. The user interface is updated correspondingly by enabling the text input box for the message to send, focusing the input box so that the user can immediately begin to type, enabling the "Send" and "Disconnect" buttons, now that they're usable, and disabling the "Connect" button, since it is not needed when the connection is open. ![]() If the channel's state has changed to "open", that indicates that we have finished establishing the link between the two peers. Let connectButton = null let disconnectButton = null let sendButton = null let messageInputBox = null let receiveBox = null let localConnection = null // RTCPeerConnection for our "local" connection let remoteConnection = null // RTCPeerConnection for the "remote" let sendChannel = null // RTCDataChannel for the local (sender) let receiveChannel = null // RTCDataChannel for the remote (receiver) function startup ( ) We aim to please our customers first and foremost.
0 Comments
Leave a Reply. |