# util/constant.js

    /**
     * @desc 错误码及说明
     * @constant
     * @type Object
     */
    var ErrorConstant = {
    	join_room_timeout: {
    		code: 1014,
    		message: "addition will timeout"
    	},

    	oemname_notfound: {
    		code: 1017,
    		message: "OEM name not found"
    	},

    	avdEngine_init_failed: {
    		code: 1018,
    		message: "The sdk engine failed to initialize"
    	},

    	set_audioCoding_failed: {
    		code: 1019,
    		message: "Description Failed to set the audio codec"
    	},

    	set_videCoding_failed: {
    		code: 1020,
    		message: "Description Failed to set the video codec"
    	},

    	set_speakerDevice_notsupport_failed: {
    		code: 1021,
    		message: "Browser does not support output device selection"
    	},

    	set_speakerDevice_https_failed: {
    		code: 1022,
    		message: "You need to use HTTPS for selecting audio output device"
    	},

    	set_speakerDevice_else_failed: {
    		code: 1023,
    		message: "else error for selecting audio output device"
    	},

    	userId_format: {
    		code: 1309,
    		message: "UserId cannot contain _ characters"
    	},

    	userId_required: {
    		code: 1300,
    		message: "UserId is mandatory and cannot be empty"
    	},

    	mulLanding_error: {
    		code: 1301,
    		message: "The same userId cannot be logged in multiple times"
    	},

    	roomId_required: {
    		code: 1302,
    		message: "roomId is required and cannot be empty"
    	},

    	params_require: {
    		code: 1303,
    		message: "params are mandatory and cannot be empty"
    	},

    	userAddress_require: {
    		code: 1304,
    		message: "userAddress are required, cannot be empty"
    	},

    	ft_no_authorization: {
    		code: 1305,
    		message: "Module without authorization."
    	},

    	upload_filer_required: {
    		code: 1306,
    		message: "The uploaded file cannot be empty"
    	},

    	upload_filer_fileType: {
    		code: 1307,
    		message: "The type of the uploaded file is not supported"
    	},

    	upload_filer_fileSize: {
    		code: 1308,
    		message: "The size of the uploaded file exceeds the threshold"
    	},

    	params_type_mismatch: {
    		code: 1309,
    		message: "parameter type mismatch"
    	},

    	operate_timeout: {
    		code: 1311,
    		message: "The operation has timed out"
    	},

    	exporter_parameter_type_error: {
    		code: 1401,
    		message: "Parameter type error"
    	},

    	exporter_parameter_number_error: {
    		code: 1402,
    		message: "Parameter range is incorrect, x,y,width,height Please enter a value between 0 and 1"
    	},

    	exporter_parameter_number1_error: {
    		code: 1403,
    		message: "The parameter range is incorrect. zorder Please enter a value between 0 and 10"
    	},

    	exporter_parameter_lack_error: {
    		code: 1404,
    		message: "Necessary parameters are missing"
    	},

    	video_not_exporter_error: {
    		code: 1405,
    		message: "The video has not yet been recorded"
    	},

    	video_has_exporter_error: {
    		code: 1406,
    		message: "This video has started recording. Do not repeat recording"
    	},

    	exporter_mix_start_error: {
    		code: 1407,
    		message: "No video has been added and cannot be mixed screen recorded"
    	},

    	video_and_userId_error: {
    		code: 1408,
    		message: "The user Id and device Id do not match"
    	},

    	exporter_has_stop_error: {
    		code: 1409,
    		message: "Recording has stopped"
    	},

    	mqtt_topic_reservedword_error: {
    		code: 1500,
    		message: "The current topic value is an internal reserved word, please verify"
    	},

    	room_state_invalid: {
    		code: 1503,
    		message: "The current room state  dissatisfy"
    	},

    	data_oversize: {
    		code: 1504,
    		message: "The data is oversize, limiting it to 60k."
    	},

    	check_webrtc_supported: {
    		code: 2000,
    		message: "This browser is not supported WebRTC"
    	},

    	not_support_mediaStreamTrack: {
    		code: 2001,
    		message: "This browser is not supported MediaStreamTrack."
    	},

    	screen_sharing_plugin_not_accessible: {
    		code: 2003,
    		message: "The screen sharing plugin cannot be found"
    	},

    	screen_sharing_response_is_null: {
    		code: 2004,
    		message: "No screen sharing"
    	},

    	not_join_room: {
    		code: 2005,
    		message: "Haven't join room"
    	},

    	navigatorUserMediaError_notSupportedError: {
    		code: 2010,
    		message: "The permission to open the device is insufficient due to non-HTTPS access"
    	},

    	navigatorUserMediaError_overconstrainedError: {
    		code: 2011,
    		message: "The device failed to open because the device constraint may not be met"
    	},

    	navigatorUserMediaError_trackStartError: {
    		code: 2012,
    		message: "The device failed to open because the device was already occupied"
    	},

    	navigatorUserMediaError_notAllowedError: {
    		code: 2013,
    		message: "The open device permission is insufficient because the user denied the media access request"
    	},

    	navigatorUserMediaError_typeError: {
    		code: 2014,
    		message: "The device failed to open because at least one audio and video was requested"
    	},

    	navigatorUserMediaError_unknown: {
    		code: 2015,
    		message: "Device opening failure Unknown error"
    	},

    	navigatorUserMediaError_notFoundError: {
    		code: 2016,
    		message: "Device failed to open, please ensure that the audio/video device you want to open is connected properly"
    	},

    	cameraId_does_not_exist: {
    		code: 2017,
    		message: "The camera ID does not exist"
    	},

    	closeVideo_before_operation_warnings: {
    		code: 2018,
    		message: "Please turn off the camera before performing this operation"
    	},

    	open_device_no_response: {
    		code: 2019,
    		message: "If the device does not respond, restart the browser and try again"
    	},

    	websock_create_error: {
    		code: 2020,
    		message: "Websocket failed device create"
    	},

    	websock_catch_exception: {
    		code: 2021,
    		message: "Websocket  file is corrupted"
    	},

    	navigatorDisplayMediaError_notSupportedError: {
    		code: 2030,
    		message: "The desktop sharing permission is insufficient because the access is not https. Procedure"
    	},

    	navigatorDisplayMediaError_overconstrainedError: {
    		code: 2031,
    		message: "Failed to open desktop sharing because desktop sharing constraints may not be met"
    	},

    	navigatorDisplayMediaError_notAllowedError: {
    		code: 2033,
    		message: "The desktop sharing failed to be enabled because the user did not select the shared content"
    	},

    	navigatorDisplayMediaError_unknown: {
    		code: 2035,
    		message: "Desktop sharing failed to open unknown error"
    	},

    	navigatorDisplayMediaError_screenAudioSelectError: {
    		code: 2034,
    		message: "Failed to open desktop sharing! Please turn on the share audio switch and share again!"
    	}

    };

    // var FTConstant = {
    // 	   datachannel: {
    //              name: "透明通道",
    //              value: "ft_datachannel"
    //        },
    //        chat: {
    //              name: "聊天",
    //              value: "ft_chat"
    //        },
    //        audio: {
    //              name: "语音",
    //              value: "ft_audio"
    //        },
    //        video: {
    //              name: "普通视频",
    //              value: "ft_video"
    //        },
    //        video_hd: {
    //              name: "高清视频",
    //              value: "ft_video_hd"
    //        },
    //        screen: {
    //              name: "屏幕共享",
    //              value: "ft_screen"
    //        },
    //        annotation: {
    //              name: "注释白板",
    //              value: "ft_annotation"
    //        },
    //        p2p: {
    //              name: "P2P房间",
    //              value: "ft_p2p"
    //        },
    //        avei: {
    //              name: "音视频导入导出",
    //              value: "ft_avei"
    //        },
    //        h265: {
    //              name: "H265模块",
    //              value: "ft_h265"
    //        },
    //        client_record_audio: {
    //              name: "客户端音频录制",
    //              value: "ft_client_record_audio"
    //        },
    //        client_record_video: {
    //              name: "客户端视频录制",
    //              value: "ft_client_record_video"
    //        },
    //        clinet_livebroadcast: {
    //              name: "客户端直播路数",
    //              value: "ft_clinet_livebroadcast"
    //        },
    //        record_audio: {
    //              name: "录制音频",
    //              value: "ft_record_audio"
    //        },
    //        record_video: {
    //              name: "录制视频",
    //              value: "ft_record_video"
    //        },
    //        outgoing: {
    //              name: "设备集成，如rtsp、h323、sip等",
    //              value: "ft_outgoing"
    //        },
    //        livebroadcast: {
    //              name: "旁路直播",
    //              value: "ft_livebroadcast"
    //        },
    //        platform_android: {
    //              name: "Android系统",
    //              value: "ft_platform_android"
    //        },
    //        platform_ios: {
    //              name: "ios系统",
    //              value: "ft_platform_ios"
    //        },
    //        platform_win: {
    //              name: "windows桌面系统",
    //              value: "ft_platform_win"
    //        },
    //        platform_mac: {
    //              name: "mac ox桌面系统",
    //              value: "ft_platform_mac"
    //        },
    //        platform_linux: {
    //              name: "linux桌面系统",
    //              value: "ft_platform_linux"
    //        },
    //        platform_web: {
    //              name: "web js系统",
    //              value: "ft_platform_web"
    //        },
    //        server_platform_linux: {
    //              name: "服务器平台linux",
    //              value: "ft_server_platform_linux"
    //        },
    //        server_platform_win: {
    //              name: "服务器平台windows",
    //              value: "ft_server_platform_win"
    //        },
    //        server_platform_linux_cluster: {
    //              name: "服务器平台linux集群",
    //              value: "ft_server_platform_linux_cluster"
    //        }
    // };

    /**
     * @desc web端加会用户user_agent默认值：web
     * @constant
     * @type String
     */
    var USER_AGENT_AVD_DEFAULT = "web";

    /**
     * @desc web端加会网页录制用户user_agent默认值：avd_web_record
     * @constant
     * @type String
     */
    var USER_AGENT_AVD_WEB_RECORD = "avd_web_record";

    /**
     * @desc 服务器视频转码指定值
     * @constant
     * @type String
     */
    var USER_AGENT_AVD_VIDEO_TRANSCODING = "avd_video_transcoding";

    /**
     * @desc ios safari端加会用户user_agent值：web_ios
     */
    var USER_AGENT_AVD_IOS = "web_ios";

    /**
     * @desc avc模式混屏情况下，服务器产生的混屏用户其user_agent指定值
     * @constant
     * @type String
     */
    var USER_AGENT_AVD_MEDIA_MIXER = "avd_media_mixer";

    /**
     * @desc avc模式混屏情况下，web端进行混屏布局操作的用户其user_agent指定值
     * @constant
     * @type String
     */
    var USER_AGENT_AVD_MEDIA_MIXER_ADMIN = "avd_media_mixer_admin";

    /**
     * @desc 桌面共享投屏的匿名用户其user_agent指定值.预留
     * @constant
     * @type String
     */
    var USER_AGENT_AVD_THROWING_SCREEN_ANONYM = "avd_throwing_screen_anonym";

    /**
     * @desc 观察者用户的user_agent值,只能订阅不能发布操作， 算授权数量里。
     * @constant
     * @type String
     */
    var USER_AGENT_AVD_COVERT_VIEWER = "avd_covert_viewer";