Steps for building custom layout


Do the following steps for building a custom video layout. 

  • Custom layout indicates that you are going to override the BlueJeans layout and handle the video requests and layouts. Do the following setting to set the video layout to .custom. 
    meetingService.setVideoLayout(to: .custom)
  • Some meetings do not support custom video layouts, you should observe MeetingServiceProtocol/videoLayout if the value is not .custom, you will either fallback using the VideoDeviceServiceProtocol/getRemoteVideoController or give an appropriate error.

Note

It is not possible to use custom layouts in meetings that do not enable the iOS_client_layout_ordering feature string. If this is not enabled for your enterprise, you can contact support team for the ios_client_layout_ordering feature to be enabled.

  • To receive 720p video in the custom layout, use the following command.
    videoDeviceService.set720pVideoReceiveEnabled(true)

Note

If you want to receive 720p video, you must enable it as set720pVideoReceiveEnabled as true. Otherwise, the videos will be limited to 360p. 

  • Invoke setConfiguration() API, to specify the video stream resolution quality that you desire (for example, five videos with 360p resolution and two videos with 720p resolution). 
  • Observe the video stream array that you set in the above step. Observing the video arrays is important, because if any change in the setconfiguration() that request 720p stream for one of the participant and then the video stream is null or 180p a couple of seconds jump up to 720p here you will get three callbacks based on the configurations.
  • Based on the video stream, you can create your custom UI (See. VideoStream and Starter App).
    • Create container views for your videos to go in the layout on the screen (See. Rendering Video).
  • Invoke the attach and detach methods to render a participant video view.
    videoStreamService.attachParticipantStreamToView(participantId: newStream.participantId, 
    view: self. videoContainer