Skip to main content
Version: 5.x.x

RTCStream Class Properties - Flutter

id​

  • type: String

  • Represents the id for that stream. It is the stream's key in participant.streams.


kind​

  • type: MediaType

  • kind represents the type of stream: MediaType.AUDIO, MediaType.VIDEO, MediaType.SHARE or MediaType.SHARE_AUDIO. SHARE_AUDIO is screen-share audio, separate from the microphone, and has no renderer.

Example​

if (stream.kind == MediaType.VIDEO) {
// show it with RTCVideoView(stream.renderer!)
}

participantId​

  • type: String

  • The id of the participant the stream belongs to.


renderer​

  • type: RTCVideoRenderer?

  • This is a renderer, which is passed to RTCVideoView widget.

  • It is null for audio streams. The SDK creates it, so you do not need to call initialize() or dispose() on it.

  • renderer.setMirror(bool) flips the video horizontally in every RTCVideoView that shows this renderer. It overrides the view's mirror: parameter.

  • renderer.videoWidth and renderer.videoHeight report the video size, and renderer.onResize is called when it changes.


isLocal​

  • type: bool

  • true if the stream belongs to the local participant, false for a remote participant's stream.

  • Only remote streams can be paused and resumed. To pause or resume a stream, call pause() and resume() on the stream itself.

  • For stats, use the participant's getVideoStats(), getAudioStats() or getShareStats().

Got a Question? Ask us on discord