Skip to main content
Version: 5.5

Presentation - Screen share

Presentation means sharing a screen of a user (presenter) to show a material such as slides to the other call peers. This page describes how to use the presentation function based on the call type.

Supported call typeMinimum SDK version
1-to-1 call, group call (conference)PlanetKit 3.0
Note

PlanetKit uses HD resolution in its presentation feature, so it can provide an optimized service when the client's network conditions meet or exceed the recommended bandwidth.

1-to-1 call presentation

To start or end a presentation in a 1-to-1 call, use startMyScreenShare() or stopMyScreenShare() of PlanetKitCall.

The following table shows APIs related to screen share in a 1-to-1 call, where a counterpart means a peer to whom to show the presentation.

Presenter-side APIDescriptionCounterpart-side APIDescription
startMyScreenShare()Starts screen share by a presenteronPeerScreenShareStartedScreen share by a presenter has been started
--addPeerScreenShareView()Sets a view instance created by an application
stopMyScreenShare()Ends screen share by the presenteronPeerScreenShareStoppedScreen share by the presenter has been stopped
--removePeerScreenShareView()Removes the view instance before release

After being notified by onPeerScreenShareStarted that a presentation has started, the counterpart side must create a view instance and call addPeerScreenShareView() to let PlanetKit render the shared screen.

The presentation video data is automatically streamed to the peer.

1-to-1 call presentation flow

The following diagram shows the flow for starting a presentation in 1-to-1 calls.

1-to-1 call screen share start sequence diagram

The following diagram shows the flow for stopping a presentation in 1-to-1 calls.

1-to-1 call screen share stop sequence diagram

Reason to stop screen share

When you call stopMyScreenShare(), you can add one of the reasons defined as application requirements. In that case, the event onPeerScreenShareStopped delivers the value of the reason to the counterparts. This value is an integer type, so you must define the reasons and their values and use them consistently across applications of different platforms.

If the reason field is not used, the hasReason field of onPeerScreenShareStopped is set to false.

Group call presentation

To start or end a presentation in a group call, use startMyScreenShare() or stopMyScreenShare() of PlanetKitConference.

The following table shows APIs related to screen share in a group call, where counterparts mean participants in a group call to whom to show the presentation.

Presenter-side APIDescriptionCounterpart-side APIDescription
startMyScreenShare()Starts screen share by a presenteronScreenShareUpdated
(state=ENABLED)
Screen share by a presenter has been started
--startScreenShare() of PlanetKitPeerControlStarts rendering the screen share video on a screen share view
stopMyScreenShare()Ends screen share by the presenteronScreenShareUpdated
(state=DISABLED)
Screen share by the presenter has been stopped
--stopScreenShare() of PlanetKitPeerControlStops rendering the screen share video on a screen share view
changeMyScreenShareDestination()
changeMyScreenShareDestinationToMainRoom()
Changes the destination subgroup of the screen share.onScreenShareUpdated
(state=ENABLED)
onScreenShareUpdated
(state=DISABLED)
Screen share to a specific subgroup has been started or stopped
Note

You can use the methods of PlanetKitPeerControl to control screen share video on a peer's screen share view. For more information on how to use PlanetKitPeerControl, refer to the group call screen share code example.

After being notified by onScreenShareUpdated of ConferenceListener or onScreenShareUpdated of PeerControlListener that a presentation has started (state=ENABLED), the counterpart side must call startScreenShare() of PlanetKitPeerControl to let PlanetKit render the shared screen.

Note

Unlike 1-to-1 calls, presentation video data is not automatically streamed to participants. Therefore, the counterpart side in group calls must call startScreenShare() of PlanetKitPeerControl to receive the presentation video data.

Group call presentation flow

The following diagram shows the flow for starting a presentation in group calls.

Group call screen share start sequence diagram

The following diagram shows the flow for stopping a presentation in group calls.

Group call screen share stop sequence diagram

The following diagram shows the flow for a user who joined after a presentation started in a group call.

Group call screen share late joiner sequence diagram

Presentation within a subgroup

A presentation feature is available within a subgroup when the presenter subscribed to the subgroup with the "dataSession" attribute set to true. If the presenter starts a presentation within a subgroup scope, the presentation video data is only shared with the members of the subgroup.

To change the destination subgroup of the screen share, use changeMyScreenShareDestination() or changeMyScreenShareDestinationToMainRoom(). For more information, see Subgroup flow - Screen share.

Tip

Starting from PlanetKit 4.1, the function to receive two screen share streams at the same time is supported. Receiving two presentation videos might cause confusing UX or heavy traffic. However, it can be useful in relation to the subgroup feature.

For example, let's say the first presenter started a presentation to all participants, and the second presenter started a presentation within a subgroup scope. Subgroup members can choose to receive one of them or both by controlling startScreenShare() of PlanetKitPeerControl.

Group call compatibility

Since PlanetKit 4.1, presentation video is not automatically sent to participants. Accordingly, PlanetKit 4.1 added onScreenShareUpdated and requestPeerScreenShare(), and started to support a presentation feature within a subgroup scope.

This does not affect the behavior of WebPlanetKit and older versions of PlanetKit, which do not support the subgroup feature. That is, LINE Planet Cloud automatically streams presentation video data to clients using WebPlanetKit or older versions of PlanetKit.