BlueJeans is being sunset. Please refer to more details

Steps for building a 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. 
    bluejeansSDK.getMeetingService().setVideoLayout(MeetingService.VideoLayout.Custom.INSTANCE)
    bluejeansSDK.meetingService.setVideoLayout(MeetingService.VideoLayout.Custom)
    
  • Some meetings do not support custom video layouts, you should observe MeetingService.videoLayout if the value is not MeetingService.VideoLayout.Custom, you will either fallback using the BlueJeans standard layouts (People, Gallery and Speaker) or give an appropriate error.

Note

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

  • 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 list of videoStreams offered by VideoStreamService class. Observing this list gives an update on the current configuration of the video streams. For example, if 720p is requested for one of the streams, then observing this list can help to determine whether the request to set a remote participant's stream to 720p was honored or not.
  • Based on this list, you can create your custom UI (See. VideoStream).
    • 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.
    blueJeansSDK.getMeetingService().getVideoStreamService().attachParticipantStreamToView(String participantId, TextureView view)
    blueJeansSDK.meetingService.videoStreamService.attachParticipantStreamToView(participantId: String, view: TextureView)

If you want to receive a 720p video, you must enable it as set720pVideoReceiveEnabled as true. Otherwise, the videos will be limited to 360p. To enable 720p video in your custom layout, use the following command.

blueJeansSDK.getMeetingService().getVideoDeviceService().set720pVideoReceiveEnabled(true);
bluejeansSDK.meetingService.videoDevice.set720pVideoReceiveEnabled(true)