@microsoft/teams-js
Version:
Microsoft Client SDK for building app for Microsoft hosts
65 lines (64 loc) • 2.33 kB
TypeScript
/**
* @hidden
* To enable this image capability will let the app developer ask the user to get images from camera/local storage
*
* @beta
* @module
*/
import { VisualMediaProps } from '../../internal/visualMediaHelpers';
import { CameraProps, GalleryProps, VisualMediaFile } from './visualMedia';
/**
* @hidden
* CameraImageProperties is for the image taken from the camera
*
* @beta
*/
export interface CameraImageProperties extends VisualMediaProps {
/**
* @hidden
* The source in CameraImageProperties should always be CameraProps
*/
sourceProps: CameraProps;
}
/**
* @hidden
* CameraImageProperties is for the image taken from the camera
*
* @beta
*/
export interface GalleryImageProperties extends VisualMediaProps {
/**
* @hidden
* The source in GalleryImageProperties should always be GalleryProps
*/
sourceProps: GalleryProps;
}
/**
* @hidden
* Capture one or multiple image(s) using camera.
* @param cameraImageInputs - The input params to customize the image(s) to be captured
* @returns Promise that will resolve with {@link VisualMediaFile[]} object or reject with an error.
* @throws INVALID_ARGUMENTS Error if imageInputs is null or imageInputs.maxVisualMediaCount is greater than maxVisualMediaSelectionLimit or lesser than 1.
*
* @beta
*/
export declare function captureImages(cameraImageInputs: CameraImageProperties): Promise<VisualMediaFile[]>;
/**
* @hidden
* Upload the existing image(s) from the gallery.
* @param galleryImageInputs - The input params to customize the image(s) to be captured
* @returns Promise that will resolve with {@link VisualMediaFile[]} object or reject with an error.
* @throws INVALID_ARGUMENTS Error if imageInputs is null or imageInputs.maxVisualMediaCount is greater than maxVisualMediaSelectionLimit or lesser than 1.
*
* @beta
*/
export declare function retrieveImages(galleryImageInputs: GalleryImageProperties): Promise<VisualMediaFile[]>;
/**
* @hidden
* Checks if visualMedia.image capability is supported by the host
* @returns boolean to represent whether visualMedia.image is supported
* @throws Error if {@linkcode app.initialize} has not successfully completed
*
* @beta
*/
export declare function isSupported(): boolean;