====== audioDestination ====== wrtc.audioDestination is a property selecting which local audio destination (speaker) to use. If wrtc.audioDestination is undefined the wrtc object will use the browser's default audio destination. While most of the times the browsers succeed in picking the right audio destination sometimes they select another one than the user prefers. On devices with multiple audio destinations you can select which one to use by entering the [[ixnx:wrtc:js:api:sources_array|desired destination's unique ID]] into wrtc.audioDestination On Chrome you can get a list of available audio destinations using [[ixnx:wrtc:js:api:wrtc:get|wrtc.get("audioDestinations")]]. You usually set wrtc.audioDestination in [[ixnx:wrtc:js:api:wrtc:init|wrtc.init()]]. If you want to change audio destination later use [[ixnx:wrtc:js:api:wrtc:setaudiodestination|wrtc.setAudioDestination()]]. ===== Value ===== String containing unique ID of audio destination. \\ If string "default" select system's default speaker. \\ If string "communications" select operating system's default output for audio communications. \\ If undefined do not select any audio destination, keep previous destination. ===== Default value ===== undefined ===== Usage ===== Set wrtc.audioDestination in [[ixnx:wrtc:js:api:wrtc:init|wrtc.init()]]. Changing wrtc.audioDestination affects all future calls but does not affect current calls. To affect all current calls too call [[ixnx:wrtc:js:api:wrtc:setaudiodestination|wrtc.setAudioDestination()]] after altering wrtc.audioDestination (or call [[ixnx:wrtc:js:api:wrtc:setaudiodestination|wrtc.setAudioDestination()]] with the new destination ID as argument). ===== Example ===== Select first audio destination (on Chrome): wrtc.audioDestination = wrtc.get("audioDestinations")[0].id; wrtc.setAudioDestination(); ===== See Also ===== [[ixnx:wrtc:js:api:wrtc:setaudiodestination|wrtc.setAudioDestination()]] [[ixnx:wrtc:js:api:call:adv.setaudiodestination|call.adv.setAudioDestination()]] [[ixnx:wrtc:js:api:wrtc:audiosource|wrtc.audioSource]] [[ixnx:wrtc:js:api:sources_array|list of available audio destinations]]