VideoStreamServiceProtocol

The VideoStreamService provides API related to requesting a custom configuration of streams of remote video. It may be used to create custom video layouts and enable use cases which the included getRemoteVideoController() is not suitable.

  • Requests a configuration of video to be received by the client. Allows specification of the number of streams of video received, the quality of those videos, the priorities of those videos and which participants are included in the streams.

  • The streams of video being received by the client. An observable array of VideoStreamProtocol. Updates on any change of any of the properties of VideoStreamProtocol Important: There is no guarantee on the ordering of this array, relying on the ordering of this array may result in more layout changes than neccesary.

    This array is the source of truth for the actual videos being received. The exact request to setVideoStreamConfiguration(configuration:) may not be honoured exactly. It is recommended to update the client’s UI based on this array.

  • Attaches a VideoStreamProtocol to a UIView. This will cause the stream of video to be rendered and visible in the given view. Should only be called for videos in the videoStreams array.

    A video may only be attached to one view at a time. Calling this method on a stream that is already attached will implicitly call the detachParticipantStreamFromView(participantId:) method first.

  • Detaches (removes) the video stream from the view it is attached to. This will stop rendering the view and it will no longer be visible.

  • An observable collection of AttachedView for every participant video stream that has been attached using the attachParticipantStreamToView(participantId:view:) API. An observable Dictionary between the participantId and AttachedView

    This can be used to get a reference to the inner video view returned by the attachParticipantStreamToView(participantId:view:) method. For example you may use this to change the UIView.ContentMode of that view.

  • The content mode for attaching video participants. The UIView.ContentMode property can be set on views individually after attaching.

  • Sets the default content mode for attaching video participants. This will change how the video is rendered within the provided UIView. Setting the mode will only affect views attached after the default is set. Supported values are .scaleToFill, .scaleAspectFit, .scaleAspectFill. Other values will use .scaleToFill.

    This can be used to choose a layout where videos maintain their aspect ratio but are cropped within their container, by setting the content mode to .scaleAspectFill. Alternatively you can have the video maintain the aspect ratio with a clear space on the sides, or top and bottom by setting the content mode to .scaleAspectFit.

  • When true, the StreamMetadata property on the VideoStream object will be available, With metadata statistics about the stream, such as the FPS and bitrate. This will also enable stream metadata on the BlueJeans remote video views. Important: This should be set to false in production builds.

  • Sets isDebugMetadataEnabled Important: This should be set to false in production builds.