Error Events - iOS
VideoSDK provides onError
event which will notify you of any error happening during the meeting.
onError
- This event will be triggered whenever any invalid configuration provided or server/network errors arise, this event will trigger with a specific error code and message.
- This event is helpful for development level troubleshooting while integrating SDK.
- You can implement this method of the abstract Class
MeetingEventListener
and add the listener toMeeting
class using theaddEventListener()
method ofMeeting
Class.
Example
- Swift
import VideoSDKRTC
extension MeetingViewController: MeetingEventListener {
func onError(error: VideoSDKError) {
switch error {
case .INVALID_TOKEN: print("Invalid Token")
case .INVALID_MEETING_ID: print("Invalid Meeting Id")
case .INVALID_API_KEY: print("Invalid API Key")
case .INVALID_PERMISSIONS: print("Invalid Permissions")
case .INVALID_PARTICIPANT_ID: print("Invalid Participant ID")
...
}
}
}
Error Codes
We have depicted a specific constant with code and message in the below table.
Constant | Code | Message |
---|---|---|
INVALID_API_KEY | 4001 | apikey provided in the token is empty or invalid, please verify it on the dashboard. |
INVALID_TOKEN | 4002 | token is empty or invalid or might have expired. |
INVALID_MEETING_ID | 4003 | meetingId is empty or invalid, please verify it or generate new meetingId using the API. |
INVALID_PARTICIPANT_ID | 4004 | participantId is empty or invalid, it shouldn't contain any whitespaces. |
DUPLICATE_PARTICIPANT | 4005 | Leaving meeting, since this participantId joined from another device. |
ACCOUNT_DEACTIVATED | 4006 | It seems your account is deactivated by VideoSDK for some reason, you can reach out to us at support@videosdk.live . |
ACCOUNT_DISCONTINUED | 4007 | Server will respond you with specific message. |
INVALID_PERMISSIONS | 4008 | permissions provided in the token are invalid, please don't use allow_join or allow_mod with ask_join . |
MAX_PARTICIPANT_REACHED | 4009 | You have reached max paritcipant limit in a meeting. |
MAX_SPEAKER_REACHED | 4010 | You have reached max speaker limit in a meeting. |
START_RECORDING_FAILED | 4011 | Recording start request failed due to an unknown error. |
STOP_RECORDING_FAILED | 4012 | Recording stop request failed due to an unknown error. |
START_LIVESTREAM_FAILED | 4013 | Livestream start request failed due to an unknown error. |
STOP_LIVESTREAM_FAILED | 4014 | Livestream stop request failed due to an unknown error. |
INVALID_LIVESTREAM_CONFIG | 4015 | Livestream 'outputs' configuration provided was invalid. |
START_HLS_FAILED | 4016 | HLS start request failed due to an unknown error. |
STOP_HLS_FAILED | 4017 | HLS stop request failed due to an unknown error. |
RECORDING_FAILED | 5001 | Recording stopped due to an unknown error. |
LIVESTREAM_FAILED | 5002 | Livestream stopped due to an unknown error. |
HLS_FAILED | 5003 | HLS stopped due to an unknown error. |
ERROR_GET_VIDEO_MEDIA | 3011 | Your browser/Device does not support Video. |
ERROR_GET_AUDIO_MEDIA | 3012 | Your browser/Device does not support Audio. |
ERROR_GET_DISPLAY_MEDIA | 3013 | Your browser/Device does not support Screen Sharing. |
ERROR_GET_VIDEO_MEDIA_PERMISSION_DENIED | 3014 | Video capture permission denied. |
ERROR_GET_AUDIO_MEDIA_PERMISSION_DENIED | 3015 | Audio capture permission denied. |
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