Ionic framework 离子电容器:如何限制画廊的相机选项?
对于我正在构建的应用程序,我使用电容器的相机插件。当我点击启动相机的按钮时,它要求我首先在Gallery和camera之间进行选择 我想关闭“从库中拾取”功能。 有什么解决办法吗Ionic framework 离子电容器:如何限制画廊的相机选项?,ionic-framework,capacitor,Ionic Framework,Capacitor,对于我正在构建的应用程序,我使用电容器的相机插件。当我点击启动相机的按钮时,它要求我首先在Gallery和camera之间进行选择 我想关闭“从库中拾取”功能。 有什么解决办法吗 默认情况下,相机插件会提示,但您可以通过传递源属性来选择相机或图库 // The source to get the photo from. By default this prompts the user to select either the photo album or take a photo. Defaul
默认情况下,相机插件会提示,但您可以通过传递源属性来选择相机或图库
// The source to get the photo from. By default this prompts the user to select either the photo album or take a photo. Default: CameraSource.Prompt
source ?: CameraSource;
完整示例:
const image = await Camera.getPhoto({
quality: 90,
resultType: CameraResultType.Uri,
source: CameraSource.Camera
});
默认情况下,Camera插件会提示您,但您可以通过传递源属性来选择Camera或Gallery
// The source to get the photo from. By default this prompts the user to select either the photo album or take a photo. Default: CameraSource.Prompt
source ?: CameraSource;
完整示例:
const image = await Camera.getPhoto({
quality: 90,
resultType: CameraResultType.Uri,
source: CameraSource.Camera
});