Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

When 'FAILED' session, stream or call status is received, getInfo() method returns a description string of error occured.

Errors list

ErrorDescription string
streamStatusInfo
FAILED_BY_ICE_ERRORFailed by ICE error
FAILED_BY_ICE_TIMEOUTFailed by ICE timeout
FAILED_BY_KEEP_ALIVEFailed by ICE keep alive
FAILED_BY_DTLS_FINGERPRINT_ERRORFailed by DTLS fingerprint error
FAILED_BY_DTLS_ERRORFailed by DTLS error
FAILED_BY_HLS_WRITER_ERRORFailed by HLS writer error
FAILED_BY_RTMP_WRITER_ERRORFailed by RTMP writer error
FAILED_BY_RTP_ACTIVITYFailed by RTP activity
STOPPED_BY_SESSION_DISCONNECTStopped by session disconnect
STOPPED_BY_REST_TERMINATEStopped by rest /terminate
STOPPED_BY_PUBLISHER_STOPStopped by publisher stop
STOPPED_BY_USERStopped by user
FAILED_BY_ERRORFailed by error
FAILED_TO_ADD_STREAM_TO_PROXYFailed to add stream to proxy
DISTRIBUTOR_STOPPEDDistributor stopped
PUBLISH_STREAM_IS_NOT_READYPublish stream is not ready
STREAM_NOT_FOUNDStream not found
STREAM_NAME_ALREADY_IN_USEStream name is already in use
MEDIASESSION_ID_NULLMediaSessionId is null
MEDIASESSION_ID_ALREADY_IN_USEMediaSessionId is already in use
SESSION_NOT_READYSession not ready
SESSION_DOES_NOT_EXISTSession does not exist
RTSP_HAS_WRONG_FORMATRtsp has wrong format
FILE_HAS_WRONG_FORMATFile has wrong format
FAILED_TO_CONNECT_TO_RTSP_STREAMFailed to connect to rtsp stream
RTSP_STREAM_NOT_FOUNDRtsp stream not found
RTSPAGENT_SHUTDOWNRtspAgent shutdown
STREAM_FAILEDStream failed
NO_COMMON_CODECSNo common codecs
BAD_URIBad URI
GOT_EXCEPTION_WHILE_STREAMING_FILEGot exception while streaming file
REQUESTED_STREAM_SHUTDOWNRequested stream shutdown
FAILED_TO_READ_FILEFailed to read file
FILE_NOT_FOUNDFile not found
FAILED_TO_CONNECT_TO_ORIGIN_STREAMFailed to connect to origin stream
CDN_STREAM_NOT_FOUNDCDN stream not found
FAILED_TO_GET_AGENT_STORAGEFailed to get agent storage
AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWNAgent servicing origin stream is shutting down
TERMINATED_BY_KEEP_ALIVETerminated by keep-alive
TRANSCODING_REQUIRED_BUT_DISABLEDTranscoding is requred, but disabled
NO_AVAILABLE_TRANSCODERSNo available transcoder nodes in CDN
callStatusInfo
FAILED_BY_SESSION_CREATIONFailed by session creation
FAILED_BY_ICE_ERRORFailed by ICE error
FAILED_BY_RTP_ACTIVITYFailed by RTP activity
FAILED_BY_RTMP_WRITER_ERRORFailed by RTMP writer error
FAILED_BY_DTLS_FINGERPRINT_ERRORFailed by DTLS fingerprint error
FAILED_BY_DTLS_ERRORFailed by DTLS error
FAILED_BY_ERRORFailed by error
FAILED_BY_REQUEST_TIMEOUTFailed by request timeout
TRANSCODING_REQUIRED_BUT_DISABLEDTranscoding is requred, but disabled
errorInfo
NONE_OF_MEDIAPROVIDERS_AVAILABLENone of MediaProviders available
NONE_OF_PREFERRED_MEDIAPROVIDERS_AVAILABLENone of preferred MediaProviders available
FLASHPHONER_API_NOT_INITIALIZEDFlashphoner API is not initialized
OPTIONS_URLSERVER_MUST_BE_PROVIDEDoptions.urlServer must be provided
INVALID_SESSION_STATEInvalid session state
OPTIONS_MUST_BE_PROVIDEDoptions must be provided
INVALID_CALL_STATEInvalid call state
EVENT_CANT_BE_NULLEvent can't be null
CALLBACK_NEEDS_TO_BE_A_VALID_FUNCTIONCallback needs to be a valid function
INVALID_SESSION_STATEInvalid session state
OPTIONS_NAME_MUST_BE_PROVIDEDoptions.name must be provided
CAN_NOT_SWITCH_CAMNumber of cams is less than 2 or already used custom stream
CAN_NOT_SWITCH_MICNumber of mics is less than 2 or already used custom stream

Error handling code example

As an example. let's take the Two Way Streaming application code version with hash f5fb0e62802547dfa9dfd879b3d4ca397dd7a897, that is available to download in build 0.5.28.2747

stream.getInfo() code

function setStatus(selector, status, stream) {
    var statusField = $(selector);
    statusField.text(status).removeClass();
    if (status == "PLAYING" || status == "ESTABLISHED" || status == "PUBLISHING") {
        ...
    } else if (status == "FAILED") {
        if (stream) {
            if (stream.published()) {
                switch(stream.getInfo()){
                    case STREAM_STATUS_INFO.STREAM_NAME_ALREADY_IN_USE:
                        $("#publishInfo").text("Server already has a publish stream with the same name, try using different one").attr("class", "text-muted");
                        break;
                    default:
                        $("#publishInfo").text("Other: "+stream.getInfo()).attr("class", "text-muted");
                        break;
                }
            } else {
                switch(stream.getInfo()){
                    case STREAM_STATUS_INFO.SESSION_DOES_NOT_EXIST:
                        $("#playInfo").text("Actual session does not exist").attr("class", "text-muted");
                        break;
                    case STREAM_STATUS_INFO.STOPPED_BY_PUBLISHER_STOP:
                        $("#playInfo").text("Related publisher stopped its stream or lost connection").attr("class", "text-muted");
                        break;
                    case STREAM_STATUS_INFO.SESSION_NOT_READY:
                        $("#playInfo").text("Session is not initialized or terminated on play ordinary stream").attr("class", "text-muted");
                        break;
                    case STREAM_STATUS_INFO.RTSP_STREAM_NOT_FOUND:
                        $("#playInfo").text("Rtsp stream not found where agent received '404-Not Found'").attr("class", "text-muted");
                        break;
                    case STREAM_STATUS_INFO.FAILED_TO_CONNECT_TO_RTSP_STREAM:
                        $("#playInfo").text("Failed to connect to rtsp stream").attr("class", "text-muted");
                        break;
                    case STREAM_STATUS_INFO.FILE_NOT_FOUND:
                        $("#playInfo").text("File does not exist, check filename").attr("class", "text-muted");
                        break;
                    case STREAM_STATUS_INFO.FILE_HAS_WRONG_FORMAT:
                        $("#playInfo").text("File has wrong format on play vod, this format is not supported").attr("class", "text-muted");
                        break;
                    default:
                        $("#playInfo").text("Other: "+stream.getInfo()).attr("class", "text-muted");
                        break;
                }
            }
        }
        statusField.attr("class", "text-danger");
    }
}
  • No labels