@microsoft/teams-js 2.0.0-beta.6-dev.7 → 2.0.0-beta.6-dev.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3448,7 +3448,8 @@ export namespace menus {
3448
3448
  }
3449
3449
 
3450
3450
  /**
3451
- * @alpha
3451
+ * @deprecated
3452
+ * As of 2.0.0-beta.6, use media only for backwards compatibility of existing code.
3452
3453
  */
3453
3454
  export namespace media {
3454
3455
  /**
@@ -3486,29 +3487,19 @@ export namespace media {
3486
3487
  name?: string;
3487
3488
  }
3488
3489
  /**
3489
- * Launch camera, capture image or choose image from gallery and return the images as a File[] object
3490
- *
3491
- * @remarks
3492
- * Note: Currently we support getting one File through this API, i.e. the file arrays size will be one.
3493
- * Note: For desktop, this API is not supported. Promise will be rejected with ErrorCode.NotSupported.
3494
- *
3495
- * @returns A promise resolved with a collection of @see File objects or rejected with an @see SdkError
3496
- */
3497
- export function captureImage(): Promise<File[]>;
3498
- /**
3499
- * Launch camera, capture image or choose image from gallery and return the images as a File[] object
3500
- *
3501
- * @param callback - Callback to invoke when the image is captured.
3502
- *
3503
3490
  * @deprecated
3504
- * As of 2.0.0-beta.1, please use {@link media.captureImage media.captureImage(): Promise\<File[]\>} instead.
3491
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
3505
3492
  *
3493
+ * Launch camera, capture image or choose image from gallery and return the images as a File[] object to the callback.
3494
+ *
3495
+ * @params callback - Callback will be called with an @see SdkError if there are any.
3496
+ * If error is null or undefined, the callback will be called with a collection of @see File objects
3506
3497
  * @remarks
3507
3498
  * Note: Currently we support getting one File through this API, i.e. the file arrays size will be one.
3508
3499
  * Note: For desktop, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
3509
3500
  *
3510
3501
  */
3511
- export function captureImage(callback: (error?: SdkError, files?: File[]) => void): void;
3502
+ export function captureImage(callback: (error: SdkError, files: File[]) => void): void;
3512
3503
  /**
3513
3504
  * Media object returned by the select Media API
3514
3505
  */
@@ -3521,17 +3512,8 @@ export namespace media {
3521
3512
  preview: string;
3522
3513
  /**
3523
3514
  * Gets the media in chunks irrespective of size, these chunks are assembled and sent back to the webapp as file/blob
3524
- *
3525
- * @returns A promise resolved with the @see Blob or rejected with a @see SdkError
3526
- */
3527
- getMedia(): Promise<Blob>;
3528
- /**
3529
- * Gets the media in chunks irrespective of size, these chunks are assembled and sent back to the webapp as file/blob
3530
- *
3531
- * @deprecated
3532
- * As of 2.0.0-beta.1, please use {@link media.Media.getMedia media.Media.getMedia(): Promise\<Blob\>} instead.
3533
- *
3534
- * @param callback - returns blob of media
3515
+ * @param callback - callback is called with the @see SdkError if there is an error
3516
+ * If error is null or undefined, the callback will be called with @see Blob.
3535
3517
  */
3536
3518
  getMedia(callback: (error: SdkError, blob: Blob) => void): void;
3537
3519
  }
@@ -3664,7 +3646,7 @@ export namespace media {
3664
3646
  */
3665
3647
  abstract class MediaController<T> {
3666
3648
  protected controllerCallback: T;
3667
- constructor(controllerCallback: T);
3649
+ constructor(controllerCallback?: T);
3668
3650
  protected abstract getMediaType(): MediaType;
3669
3651
  /**
3670
3652
  * @hidden
@@ -3679,20 +3661,6 @@ export namespace media {
3679
3661
  * @hidden
3680
3662
  * Hide from docs
3681
3663
  * --------
3682
- *
3683
- * Function to notify the host client to programatically control the experience
3684
- * @param mediaEvent indicates what the event that needs to be signaled to the host client
3685
- * @returns A promise resolved promise
3686
- */
3687
- protected notifyEventToHost(mediaEvent: MediaControllerEvent): Promise<void>;
3688
- /**
3689
- * @hidden
3690
- * Hide from docs
3691
- * --------
3692
- *
3693
- * @deprecated
3694
- * As of 2.0.0-beta.3, please use {@link media.MediaController.notifyEventToHost media.MediaController.notifyEventToHost(mediaEvent: MediaControllerEvent): Promise\<void\>} instead.
3695
- *
3696
3664
  * Function to notify the host client to programatically control the experience
3697
3665
  * @param mediaEvent indicates what the event that needs to be signaled to the host client
3698
3666
  * Optional; @param callback is used to send app if host client has successfully handled the notification event or not
@@ -3700,17 +3668,6 @@ export namespace media {
3700
3668
  protected notifyEventToHost(mediaEvent: MediaControllerEvent, callback?: (err?: SdkError) => void): void;
3701
3669
  /**
3702
3670
  * Function to programatically stop the ongoing media event
3703
- *
3704
- * @returns A resolved promise
3705
- * */
3706
- stop(): Promise<void>;
3707
- /**
3708
- *
3709
- * Function to programatically stop the ongoing media event
3710
- *
3711
- * @deprecated
3712
- * As of 2.0.0-beta.3, please use {@link media.MediaController.stop media.MediaController.stop(): Promise\<void\>} instead.
3713
- *
3714
3671
  * Optional; @param callback is used to send app if host client has successfully stopped the event or not
3715
3672
  */
3716
3673
  stop(callback?: (err?: SdkError) => void): void;
@@ -3719,8 +3676,7 @@ export namespace media {
3719
3676
  * Callback which will register your app to listen to lifecycle events during the video capture flow
3720
3677
  */
3721
3678
  export interface VideoControllerCallback {
3722
- onRecordingStarted(): void;
3723
- onRecordingStopped?(): void;
3679
+ onRecordingStarted?(): void;
3724
3680
  }
3725
3681
  /**
3726
3682
  * VideoController class is used to communicate between the app and the host client during the video capture flow
@@ -3819,39 +3775,24 @@ export namespace media {
3819
3775
  file: Blob;
3820
3776
  }
3821
3777
  /**
3822
- * Select an attachment using camera/gallery
3778
+ * @deprecated
3779
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
3823
3780
  *
3824
- * @param mediaInputs - The input params to customize the media to be selected
3825
- * @returns A promise resolved with an array of media data or rejected with an @see SdkError
3826
- */
3827
- export function selectMedia(mediaInputs: MediaInputs): Promise<Media[]>;
3828
- /**
3829
3781
  * Select an attachment using camera/gallery
3830
3782
  *
3831
- * @deprecated
3832
- * As of 2.0.0-beta.1, please use {@link media.selectMedia media.selectMedia(mediaInputs: MediaInputs): Promise\<Media[]\>} instead.
3833
- *
3834
3783
  * @param mediaInputs - The input params to customize the media to be selected
3835
3784
  * @param callback - The callback to invoke after fetching the media
3836
3785
  */
3837
- export function selectMedia(mediaInputs: MediaInputs, callback: (error: SdkError, attachments: Media[]) => void): any;
3838
- /**
3839
- * View images using native image viewer
3840
- *
3841
- * @param uriList - list of URIs for images to be viewed - can be content URI or server URL. Supports up to 10 Images in a single call
3842
- * @returns A promise resolved when the viewing action is completed or rejected with an @see SdkError
3843
- */
3844
- export function viewImages(uriList: ImageUri[]): Promise<void>;
3786
+ export function selectMedia(mediaInputs: MediaInputs, callback: (error: SdkError, attachments: Media[]) => void): void;
3845
3787
  /**
3846
- * View images using native image viewer
3847
- *
3848
3788
  * @deprecated
3849
- * As of 2.0.0-beta.1, please use {@link media.viewImages media.viewImages(uriList: ImageUri[]): Promise\<void\>} instead.
3789
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
3850
3790
  *
3791
+ * View images using native image viewer
3851
3792
  * @param uriList - list of URIs for images to be viewed - can be content URI or server URL. Supports up to 10 Images in a single call
3852
3793
  * @param callback - returns back error if encountered, returns null in case of success
3853
3794
  */
3854
- export function viewImages(uriList: ImageUri[], callback: (error?: SdkError) => void): any;
3795
+ export function viewImages(uriList: ImageUri[], callback: (error?: SdkError) => void): void;
3855
3796
  /**
3856
3797
  * Barcode configuration supplied to scanBarCode API to customize barcode scanning experience in mobile
3857
3798
  * All properties in BarCodeConfig are optional and have default values in the platform
@@ -3864,29 +3805,17 @@ export namespace media {
3864
3805
  timeOutIntervalInSec?: number;
3865
3806
  }
3866
3807
  /**
3867
- * Scan Barcode/QRcode using camera
3868
- *
3869
- * @remarks
3870
- * Note: For desktop and web, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
3808
+ * @deprecated
3809
+ * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
3871
3810
  *
3872
- * @param config - optional input configuration to customize the barcode scanning experience
3873
- * @returns A promise resolved with the barcode data or rejected with an @see SdkError
3874
- */
3875
- export function scanBarCode(config?: BarCodeConfig): Promise<string>;
3876
- /**
3877
3811
  * Scan Barcode/QRcode using camera
3878
- *
3879
3812
  * @remarks
3880
3813
  * Note: For desktop and web, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
3881
3814
  *
3882
- * @deprecated
3883
- * As of 2.0.0-beta.1, please use {@link media.scanBarCode media.scanBarCode(config?: BarCodeConfig): Promise\<string\>} instead.
3884
- *
3885
3815
  * @param callback - callback to invoke after scanning the barcode
3886
3816
  * @param config - optional input configuration to customize the barcode scanning experience
3887
3817
  */
3888
- export function scanBarCode(callback: (error: SdkError, decodedText: string) => void, config?: BarCodeConfig): any;
3889
- export function isSupported(): boolean;
3818
+ export function scanBarCode(callback: (error: SdkError, decodedText: string) => void, config?: BarCodeConfig): void;
3890
3819
  export {};
3891
3820
  }
3892
3821