 			// Video device specified.
 			if videoDeviceId != nil {
 				NSLog("PluginGetUserMedia#call() | video requested (specified device id: '%@')", String(videoDeviceId!))
-
-				for device: AVCaptureDevice in (AVCaptureDevice.devices(withMediaType: AVMediaTypeVideo) as! Array<AVCaptureDevice>) {
+				let videoDevices: [AVCaptureDevice] = AVCaptureDevice.DiscoverySession.init(deviceTypes: [AVCaptureDevice.DeviceType.builtInWideAngleCamera, AVCaptureDevice.DeviceType.builtInDualCamera], mediaType: AVMediaType.video, position: AVCaptureDevice.Position.unspecified).devices
+				for device: AVCaptureDevice in videoDevices {
 					if device.uniqueID == videoDeviceId {
 						if device.position == AVCaptureDevicePosition.back {
 							usingFront = false

		if audioRequested == true {
			NSLog("PluginGetUserMedia#call() | audio requested")

			rtcAudioTrack = self.rtcPeerConnectionFactory.audioTrack(withTrackId: UUID().uuidString)

			rtcMediaStream.addAudioTrack(rtcAudioTrack!)
		}

		pluginMediaStream = PluginMediaStream(rtcMediaStream: rtcMediaStream)

		let	audioRequested = constraints.object(forKey: "audio") as? Bool ?? false
		let	videoRequested = constraints.object(forKey: "video") as? Bool ?? false
		let	videoDeviceId = constraints.object(forKey: "videoDeviceId") as? String
		let	audioDeviceId = constraints.object(forKey: "audioDeviceId") as? String
		let	videoMinWidth = constraints.object(forKey: "videoMinWidth") as? Int ?? 0
		let	videoMaxWidth = constraints.object(forKey: "videoMaxWidth") as? Int ?? 640
		let	videoMinHeight = constraints.object(forKey: "videoMinHeight") as? Int ?? 0
