StreamContext

The StreamContext class.

The methods provided by the StreamContext class are used for:
  • Publishing and subscribing to streams.
  • Encoding streams.
  • Updating stream information and properties.

getStreamInfo

Gets all streams of the specified user.

abstract fun getStreamInfo(userUuid: String): List<AgoraEduContextStreamInfo>

Parameter

userUuid
The user ID.

Returns

If the method call succeeds, the SDK returns an array of AgoraEduContextStreamInfo.

setLocalVideoConfig

Sets the encoding configurations for the local video stream.

abstract fun setLocalVideoConfig(streamUuid: String,
                                 configAgora: AgoraEduContextLocalStreamConfig) : EduContextError

Parameter

streamUuid
The stream ID.
config
Video encoding configurations. See AgoraEduContextLocalStreamConfig.

setRemoteVideoStreamSubscribeLevel

Subscribes to high-resolution or low-resolution video streams.

abstract fun setRemoteVideoStreamSubscribeLevel(streamUuid: String,
                                                level: AgoraEduContextVideoSubscribeLevel): EduContextError

When the remote client sends dual video streams (the high-resolution or low-resolution video streams), call this method to choose whether to subscribe to the high-resolution or low-resolution stream.

Parameter

streamUuid
The stream ID.
level
Whether the resolution of the video stream is high or low. See AgoraEduContextVideoStreamSubscribeLevel.