@microsoft/teams-js 2.14.0-beta.0 → 2.14.0-beta.2
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.
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -5573,6 +5573,8 @@ export namespace media {
|
|
5573
5573
|
*
|
5574
5574
|
* @returns Promise that will resolve with true if the user had granted the app permission to media information, or with false otherwise,
|
5575
5575
|
* In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
|
5576
|
+
*
|
5577
|
+
* @beta
|
5576
5578
|
*/
|
5577
5579
|
export function hasPermission(): Promise<boolean>;
|
5578
5580
|
/**
|
@@ -5580,15 +5582,10 @@ export namespace media {
|
|
5580
5582
|
*
|
5581
5583
|
* @returns Promise that will resolve with true if the user consented permission for media, or with false otherwise,
|
5582
5584
|
* In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
|
5583
|
-
*/
|
5584
|
-
export function requestPermission(): Promise<boolean>;
|
5585
|
-
/**
|
5586
|
-
* Checks if media capability is supported by the host
|
5587
|
-
* @returns boolean to represent whether media is supported
|
5588
5585
|
*
|
5589
|
-
* @
|
5586
|
+
* @beta
|
5590
5587
|
*/
|
5591
|
-
export function
|
5588
|
+
export function requestPermission(): Promise<boolean>;
|
5592
5589
|
/**
|
5593
5590
|
* Media object returned by the select Media API
|
5594
5591
|
*/
|
package/dist/MicrosoftTeams.js
CHANGED
@@ -2089,7 +2089,7 @@ var _minRuntimeConfigToUninitialize = {
|
|
2089
2089
|
* @hidden
|
2090
2090
|
* Package version.
|
2091
2091
|
*/
|
2092
|
-
var version = "2.14.0-beta.
|
2092
|
+
var version = "2.14.0-beta.2";
|
2093
2093
|
|
2094
2094
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
2095
2095
|
|
@@ -5795,10 +5795,12 @@ var media;
|
|
5795
5795
|
*
|
5796
5796
|
* @returns Promise that will resolve with true if the user had granted the app permission to media information, or with false otherwise,
|
5797
5797
|
* In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
|
5798
|
+
*
|
5799
|
+
* @beta
|
5798
5800
|
*/
|
5799
5801
|
function hasPermission() {
|
5800
5802
|
ensureInitialized(runtime, FrameContexts.content, FrameContexts.task);
|
5801
|
-
if (!
|
5803
|
+
if (!isPermissionSupported()) {
|
5802
5804
|
throw errorNotSupportedOnPlatform;
|
5803
5805
|
}
|
5804
5806
|
var permissions = DevicePermission.Media;
|
@@ -5812,10 +5814,12 @@ var media;
|
|
5812
5814
|
*
|
5813
5815
|
* @returns Promise that will resolve with true if the user consented permission for media, or with false otherwise,
|
5814
5816
|
* In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
|
5817
|
+
*
|
5818
|
+
* @beta
|
5815
5819
|
*/
|
5816
5820
|
function requestPermission() {
|
5817
5821
|
ensureInitialized(runtime, FrameContexts.content, FrameContexts.task);
|
5818
|
-
if (!
|
5822
|
+
if (!isPermissionSupported()) {
|
5819
5823
|
throw errorNotSupportedOnPlatform;
|
5820
5824
|
}
|
5821
5825
|
var permissions = DevicePermission.Media;
|
@@ -5825,15 +5829,14 @@ var media;
|
|
5825
5829
|
}
|
5826
5830
|
media.requestPermission = requestPermission;
|
5827
5831
|
/**
|
5828
|
-
* Checks if
|
5829
|
-
* @returns boolean to represent whether
|
5832
|
+
* Checks if permission capability is supported by the host
|
5833
|
+
* @returns boolean to represent whether permission is supported
|
5830
5834
|
*
|
5831
5835
|
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
5832
5836
|
*/
|
5833
|
-
function
|
5834
|
-
return ensureInitialized(runtime) && runtime.supports.
|
5837
|
+
function isPermissionSupported() {
|
5838
|
+
return ensureInitialized(runtime) && runtime.supports.permissions ? true : false;
|
5835
5839
|
}
|
5836
|
-
media.isSupported = isSupported;
|
5837
5840
|
/**
|
5838
5841
|
* Media object returned by the select Media API
|
5839
5842
|
*/
|