 			pcConfig: pcConfig,
 			pcConstraints: pcConstraints,
 			eventListener: { (data: NSDictionary) -> Void in
-				let result = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: data as! [AnyHashable: Any])
+				let result = CDVPluginResult(
+					status: CDVCommandStatus_OK,
+					messageAs: data as? [AnyHashable: Any]
+				)
 
 				// Allow more callbacks.
 				result?.setKeepCallbackAs(true);

		}
	}


	fileprivate func deleteMediaStreamTrack(_ id: String) {
		self.pluginMediaStreamTracks[id] = nil
	}

		}
	}

	/**
	 * Private API.
	 */

	fileprivate func emit(_ callbackId: String, result: CDVPluginResult) {
		DispatchQueue.main.async {
			self.commandDelegate!.send(result, callbackId: callbackId)
		}
	}

	fileprivate func saveMediaStream(_ pluginMediaStream: PluginMediaStream) {
		if self.pluginMediaStreams[pluginMediaStream.id] == nil {
