The local Stream which captures input video and audio
The dedicated audio stream used to measure volume levels for voice activity detection.
A mapping of connected peers
A mapping of connected remote streams
Is outbound broadcast of local audio enabled?
The polling interval ID for connected users that might have unexpectedly dropped out of our peer network.
The master orchestration instance
The active audio/video settings being used
Has the client been successfully initialized?
Initialize a local media stream for the current user
Listen for Audio/Video updates on the av socket to broker connections between peers
Initialize a stream connection with a new peer
The Foundry user ID for which the peer stream should be established
A Promise which resolves once the peer stream is initialized
Receive a request to establish a peer signal with some other User id
The Foundry user ID who is requesting to establish a connection
The connection details provided by SimplePeer
Connect to a peer directly, either as the initiator or as the receiver
The Foundry user ID with whom we are connecting
Is the current user initiating the connection, or responding to it?
The constructed and configured SimplePeer instance
Disconnect from a peer by stopping current stream tracks and destroying the SimplePeer instance
The Foundry user ID from whom we are disconnecting
A Promise which resolves once the disconnection is complete
Disconnect from all current peer streams
A Promise which resolves once all peers have been disconnected
Replace the local stream for each connected peer with a re-generated MediaStream.
Provide an Object of available audio sources which can be used by this implementation. Each object key should be a device id and the key should be a human-readable label.
}
Provide an Object of available audio sources which can be used by this implementation. Each object key should be a device id and the key should be a human-readable label.
}
Provide an Object of available video sources which can be used by this implementation. Each object key should be a device id and the key should be a human-readable label.
}
Try to establish a peer connection with each user connected to the server.
Attempt to create local media streams.
Parameters for the getUserMedia request.
The created MediaStream or an error.
Create the SimplePeer instance for the desired peer connection. Modules may implement more advanced connection strategies by overriding this method.
The Foundry user ID with whom we are connecting
Is the current user initiating the connection, or responding to it?
Setup the custom TURN relay to be used in subsequent calls if there is one configured. TURN credentials are mandatory in WebRTC.
The SimplePeer configuration object.
Is audio broadcasting push-to-talk enabled?
Is audio broadcasting always enabled?
Is audio broadcasting voice-activation enabled?
Is the current user muted?
An implementation of the AVClient which uses the simple-peer library and the Foundry socket server for signaling. Credit to bekit#4213 for identifying simple-peer as a viable technology and providing a POC implementation.