Skip to content

ParticipantScreenShareAddedEvent

Ajša Terko edited this page Sep 22, 2023 · 2 revisions



participant

Description

Getter for the participant field.

Returns

  • Participant - Represents the participant that turned on their screen share video.

Example

func onParticipantScreenShareAdded(_ participantScreenShareAddedEvent: ParticipantScreenShareAddedEvent) {
    os_log("%s added a screen share.", participantScreenShareAddedEvent.participant.endpoint.identifier())
}



track

Description

Getter for the track field.

Returns

  • VideoTrack - Represents the participant's screen share track that was added.

Example

func onParticipantScreenShareAdded(_ participantScreenShareAddedEvent: ParticipantScreenShareAddedEvent) {
    let remoteScreenShareTrack = participantScreenShareAddedEvent.track
    if remoteScreenShareTrack != nil {
      if let remoteScreenShareView = self.remoteScreenShareView {
        remoteScreenShareTrack!.addRenderer(remoteScreenShareView)
      }
    }
}

Tutorials

Migration guides

Reference documentation

Clone this wiki locally