Disconnect from the WebRTC stream

There are two related, but distinct, functions related to “stopping” the WebRTC stream with the AppStreamer React component:

  • stop() - pauses the WebRTC stream, but maintains the connection. It can be resumed by calling the start() function.

  • terminate() - completely disconnects from the WebRTC stream.

Calling the terminate() function is not a strict requirement when disconnecting from a WebRTC stream as this is typically done in conjunction with terminating the client application. It is most relevant if you want to connect the same web client instance to different Kit Application streams.

At this time, termination of the stream on the client-side, whether by calling the terminate() function or the client application ending, has no impact on the streaming Kit Application, other than it sensing a disconnection.