 			NSLog("PluginRTCAudioController#selectAudioOutputSpeaker() | ERROR \(error)")
 		};
 	}
-	
+
 	static func selectAudioOutputEarpiece() {
 		// Disable speaker, switched to default
 		NSLog("PluginRTCAudioController#selectAudioOutputEarpiece()")
-		
+
 		speakerEnabled = false;
-		
+
 		setCategory()
-		
+
 		do {
 			let audioSession: AVAudioSession = AVAudioSession.sharedInstance()
 			try audioSession.overrideOutputAudioPort(AVAudioSession.PortOverride.none)

	//
	// Audio Output
	//
	
	static private var speakerEnabled: Bool = false
	
	init() {
        let shouldManualInit = Bundle.main.object(forInfoDictionaryKey: "ManualInitAudioDevice") as? String
    
        if(shouldManualInit == "FALSE") {
            PluginRTCAudioController.initAudioDevices()
        }
		
		NotificationCenter.default.addObserver(
			self,
			selector: #selector(self.audioRouteChangeListener(_:)),
			name: AVAudioSession.routeChangeNotification,
			object: nil)
	}
	
	@objc dynamic fileprivate func audioRouteChangeListener(_ notification:Notification) {
		let audioRouteChangeReason = notification.userInfo![AVAudioSessionRouteChangeReasonKey] as! UInt
		
		switch audioRouteChangeReason {
		case AVAudioSession.RouteChangeReason.newDeviceAvailable.rawValue:
			NSLog("PluginRTCAudioController#audioRouteChangeListener() | headphone plugged in")

			print("Error messing with audio session: \(error)")
		}
	}

	static func setCategory() -> Void {
		// Enable speaker
		NSLog("PluginRTCAudioController#setCategory()")

		do {
			let audioSession: AVAudioSession = AVAudioSession.sharedInstance()
			try audioSession.setCategory(
				PluginRTCAudioController.audioCategory,
				mode: PluginRTCAudioController.audioMode,
				options: PluginRTCAudioController.audioCategoryOptions
			)
		} catch {
			NSLog("PluginRTCAudioController#setCategory() | ERROR \(error)")
		};
	}

	// Setter function inserted by save specific audio device
	static func saveInputAudioDevice(inputDeviceUID: String) -> Void {
		let audioSession: AVAudioSession = AVAudioSession.sharedInstance()
