Media Events - iOS
VideoSDK provides multiple types of events which can be listened to know the about the participant's media status in the meeting.
You can implement all the methods of ParticipantEventListener
abstract Class and add the listener to Participant
class using the addEventListener()
method of Participant
Class.
Here are the events which specifically relate to the stream.
onStreamEnabled
- This event is triggered whenever a participant's video, audio or screen share stream is enabled.
onStreamDisabled
- This event is triggered whenever a participant's video, audio or screen share stream is disabled.
Example
Here is the usage of all the events mentioned in this page.
- Swift
extension MeetingViewController: ParticipantEventListener {
func onStreamEnabled(_ stream: MediaStream, forParticipant participant: Participant) {
print("Media Stream enabled for :", participant.displayName)
}
func onStreamDisabled(_ stream: MediaStream, forParticipant participant: Participant) {
print("Media Stream disabled for :", participant.displayName)
}
}
API Reference
The API references for all the methods and events utilised in this guide are provided below.
Got a Question? Ask us on discord