@microsoft/teams-js 2.3.0-beta.0 → 2.3.0
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/README.md +4 -4
- package/dist/MicrosoftTeams.d.ts +299 -8
- package/dist/MicrosoftTeams.js +402 -58
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/MicrosoftTeams.min.js.map +1 -1
- package/package.json +34 -1
package/dist/MicrosoftTeams.js
CHANGED
@@ -1124,11 +1124,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1124
1124
|
"teamsCore": () => (/* reexport */ teamsCore),
|
1125
1125
|
"uploadCustomApp": () => (/* reexport */ uploadCustomApp),
|
1126
1126
|
"video": () => (/* reexport */ video),
|
1127
|
+
"videoEx": () => (/* reexport */ videoEx),
|
1127
1128
|
"webStorage": () => (/* reexport */ webStorage)
|
1128
1129
|
});
|
1129
1130
|
|
1130
1131
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
1131
|
-
var version = "2.3.0
|
1132
|
+
var version = "2.3.0";
|
1132
1133
|
/**
|
1133
1134
|
* @hidden
|
1134
1135
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
@@ -2948,13 +2949,31 @@ var teamsCore;
|
|
2948
2949
|
* @internal
|
2949
2950
|
*/
|
2950
2951
|
function registerOnLoadHandler(handler) {
|
2952
|
+
registerOnLoadHandlerHelper(handler, function () {
|
2953
|
+
if (!isSupported()) {
|
2954
|
+
throw errorNotSupportedOnPlatform;
|
2955
|
+
}
|
2956
|
+
});
|
2957
|
+
}
|
2958
|
+
teamsCore.registerOnLoadHandler = registerOnLoadHandler;
|
2959
|
+
/**
|
2960
|
+
* @hidden
|
2961
|
+
* Undocumented helper function with shared code between deprecated version and current version of the registerOnLoadHandler API.
|
2962
|
+
*
|
2963
|
+
* @internal
|
2964
|
+
* Limited to Microsoft-internal use
|
2965
|
+
*
|
2966
|
+
* @param handler - The handler to invoke when the page is loaded.
|
2967
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
2968
|
+
*/
|
2969
|
+
function registerOnLoadHandlerHelper(handler, versionSpecificHelper) {
|
2951
2970
|
ensureInitialized();
|
2952
|
-
if (
|
2953
|
-
|
2971
|
+
if (versionSpecificHelper) {
|
2972
|
+
versionSpecificHelper();
|
2954
2973
|
}
|
2955
2974
|
handlers_registerOnLoadHandler(handler);
|
2956
2975
|
}
|
2957
|
-
teamsCore.
|
2976
|
+
teamsCore.registerOnLoadHandlerHelper = registerOnLoadHandlerHelper;
|
2958
2977
|
/**
|
2959
2978
|
* @hidden
|
2960
2979
|
* Registers a handler to be called before the page is unloaded.
|
@@ -2965,13 +2984,32 @@ var teamsCore;
|
|
2965
2984
|
* @internal
|
2966
2985
|
*/
|
2967
2986
|
function registerBeforeUnloadHandler(handler) {
|
2987
|
+
registerBeforeUnloadHandlerHelper(handler, function () {
|
2988
|
+
if (!isSupported()) {
|
2989
|
+
throw errorNotSupportedOnPlatform;
|
2990
|
+
}
|
2991
|
+
});
|
2992
|
+
}
|
2993
|
+
teamsCore.registerBeforeUnloadHandler = registerBeforeUnloadHandler;
|
2994
|
+
/**
|
2995
|
+
* @hidden
|
2996
|
+
* Undocumented helper function with shared code between deprecated version and current version of the registerBeforeUnloadHandler API.
|
2997
|
+
*
|
2998
|
+
* @internal
|
2999
|
+
* Limited to Microsoft-internal use
|
3000
|
+
*
|
3001
|
+
* @param handler - - The handler to invoke before the page is unloaded. If this handler returns true the page should
|
3002
|
+
* invoke the readyToUnload function provided to it once it's ready to be unloaded.
|
3003
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
3004
|
+
*/
|
3005
|
+
function registerBeforeUnloadHandlerHelper(handler, versionSpecificHelper) {
|
2968
3006
|
ensureInitialized();
|
2969
|
-
if (
|
2970
|
-
|
3007
|
+
if (versionSpecificHelper) {
|
3008
|
+
versionSpecificHelper();
|
2971
3009
|
}
|
2972
3010
|
handlers_registerBeforeUnloadHandler(handler);
|
2973
3011
|
}
|
2974
|
-
teamsCore.
|
3012
|
+
teamsCore.registerBeforeUnloadHandlerHelper = registerBeforeUnloadHandlerHelper;
|
2975
3013
|
/**
|
2976
3014
|
* Checks if teamsCore capability is supported by the host
|
2977
3015
|
* @returns true if the teamsCore capability is enabled in runtime.supports.teamsCore and
|
@@ -3437,6 +3475,24 @@ var pages;
|
|
3437
3475
|
registerHandler('focusEnter', handler);
|
3438
3476
|
}
|
3439
3477
|
pages.registerFocusEnterHandler = registerFocusEnterHandler;
|
3478
|
+
/**
|
3479
|
+
* @hidden
|
3480
|
+
* Undocumented helper function with shared code between deprecated version and current version of the registerFocusEnterHandler API.
|
3481
|
+
*
|
3482
|
+
* @internal
|
3483
|
+
* Limited to Microsoft-internal use
|
3484
|
+
*
|
3485
|
+
* @param handler - The handler for placing focus within the application.
|
3486
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
3487
|
+
*/
|
3488
|
+
function registerFocusEnterHandlerHelper(handler, versionSpecificHelper) {
|
3489
|
+
ensureInitialized();
|
3490
|
+
if (versionSpecificHelper) {
|
3491
|
+
versionSpecificHelper();
|
3492
|
+
}
|
3493
|
+
registerHandler('focusEnter', handler);
|
3494
|
+
}
|
3495
|
+
pages.registerFocusEnterHandlerHelper = registerFocusEnterHandlerHelper;
|
3440
3496
|
/**
|
3441
3497
|
* Sets/Updates the current frame with new information
|
3442
3498
|
*
|
@@ -3553,6 +3609,24 @@ var pages;
|
|
3553
3609
|
registerHandler('fullScreenChange', handler);
|
3554
3610
|
}
|
3555
3611
|
pages.registerFullScreenHandler = registerFullScreenHandler;
|
3612
|
+
/**
|
3613
|
+
* @hidden
|
3614
|
+
* Undocumented helper function with shared code between deprecated version and current version of the registerFullScreenHandler API.
|
3615
|
+
*
|
3616
|
+
* @internal
|
3617
|
+
* Limited to Microsoft-internal use
|
3618
|
+
*
|
3619
|
+
* @param handler - The handler to invoke when the user toggles full-screen view for a tab.
|
3620
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
3621
|
+
*/
|
3622
|
+
function registerFullScreenHandlerHelper(handler, versionSpecificHelper) {
|
3623
|
+
ensureInitialized();
|
3624
|
+
if (versionSpecificHelper) {
|
3625
|
+
versionSpecificHelper();
|
3626
|
+
}
|
3627
|
+
registerHandler('fullScreenChange', handler);
|
3628
|
+
}
|
3629
|
+
pages.registerFullScreenHandlerHelper = registerFullScreenHandlerHelper;
|
3556
3630
|
/**
|
3557
3631
|
* Checks if the pages capability is supported by the host
|
3558
3632
|
* @returns true if the pages capability is enabled in runtime.supports.pages and
|
@@ -3683,14 +3757,32 @@ var pages;
|
|
3683
3757
|
* @param handler - The handler to invoke when the user selects the Save button.
|
3684
3758
|
*/
|
3685
3759
|
function registerOnSaveHandler(handler) {
|
3760
|
+
registerOnSaveHandlerHelper(handler, function () {
|
3761
|
+
if (!isSupported()) {
|
3762
|
+
throw errorNotSupportedOnPlatform;
|
3763
|
+
}
|
3764
|
+
});
|
3765
|
+
}
|
3766
|
+
config.registerOnSaveHandler = registerOnSaveHandler;
|
3767
|
+
/**
|
3768
|
+
* @hidden
|
3769
|
+
* Undocumented helper function with shared code between deprecated version and current version of the registerOnSaveHandler API.
|
3770
|
+
*
|
3771
|
+
* @internal
|
3772
|
+
* Limited to Microsoft-internal use
|
3773
|
+
*
|
3774
|
+
* @param handler - The handler to invoke when the user selects the Save button.
|
3775
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
3776
|
+
*/
|
3777
|
+
function registerOnSaveHandlerHelper(handler, versionSpecificHelper) {
|
3686
3778
|
ensureInitialized(FrameContexts.settings);
|
3687
|
-
if (
|
3688
|
-
|
3779
|
+
if (versionSpecificHelper) {
|
3780
|
+
versionSpecificHelper();
|
3689
3781
|
}
|
3690
3782
|
saveHandler = handler;
|
3691
3783
|
handler && sendMessageToParent('registerHandler', ['save']);
|
3692
3784
|
}
|
3693
|
-
config.
|
3785
|
+
config.registerOnSaveHandlerHelper = registerOnSaveHandlerHelper;
|
3694
3786
|
/**
|
3695
3787
|
* Registers a handler for user attempts to remove content. This handler should be used
|
3696
3788
|
* to remove the underlying resource powering the content.
|
@@ -3699,14 +3791,32 @@ var pages;
|
|
3699
3791
|
* @param handler - The handler to invoke when the user selects the Remove button.
|
3700
3792
|
*/
|
3701
3793
|
function registerOnRemoveHandler(handler) {
|
3794
|
+
registerOnRemoveHandlerHelper(handler, function () {
|
3795
|
+
if (!isSupported()) {
|
3796
|
+
throw errorNotSupportedOnPlatform;
|
3797
|
+
}
|
3798
|
+
});
|
3799
|
+
}
|
3800
|
+
config.registerOnRemoveHandler = registerOnRemoveHandler;
|
3801
|
+
/**
|
3802
|
+
* @hidden
|
3803
|
+
* Undocumented helper function with shared code between deprecated version and current version of the registerOnRemoveHandler API.
|
3804
|
+
*
|
3805
|
+
* @internal
|
3806
|
+
* Limited to Microsoft-internal use
|
3807
|
+
*
|
3808
|
+
* @param handler - The handler to invoke when the user selects the Remove button.
|
3809
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
3810
|
+
*/
|
3811
|
+
function registerOnRemoveHandlerHelper(handler, versionSpecificHelper) {
|
3702
3812
|
ensureInitialized(FrameContexts.remove, FrameContexts.settings);
|
3703
|
-
if (
|
3704
|
-
|
3813
|
+
if (versionSpecificHelper) {
|
3814
|
+
versionSpecificHelper();
|
3705
3815
|
}
|
3706
3816
|
removeHandler = handler;
|
3707
3817
|
handler && sendMessageToParent('registerHandler', ['remove']);
|
3708
3818
|
}
|
3709
|
-
config.
|
3819
|
+
config.registerOnRemoveHandlerHelper = registerOnRemoveHandlerHelper;
|
3710
3820
|
function handleSave(result) {
|
3711
3821
|
var saveEvent = new SaveEventImpl(result);
|
3712
3822
|
if (saveHandler) {
|
@@ -3722,13 +3832,31 @@ var pages;
|
|
3722
3832
|
* @param handler - The handler to invoke when the user clicks on Settings.
|
3723
3833
|
*/
|
3724
3834
|
function registerChangeConfigHandler(handler) {
|
3835
|
+
registerChangeConfigHandlerHelper(handler, function () {
|
3836
|
+
if (!isSupported()) {
|
3837
|
+
throw errorNotSupportedOnPlatform;
|
3838
|
+
}
|
3839
|
+
});
|
3840
|
+
}
|
3841
|
+
config.registerChangeConfigHandler = registerChangeConfigHandler;
|
3842
|
+
/**
|
3843
|
+
* @hidden
|
3844
|
+
* Undocumented helper function with shared code between deprecated version and current version of the registerConfigChangeHandler API.
|
3845
|
+
*
|
3846
|
+
* @internal
|
3847
|
+
* Limited to Microsoft-internal use
|
3848
|
+
*
|
3849
|
+
* @param handler - The handler to invoke when the user clicks on Settings.
|
3850
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
3851
|
+
*/
|
3852
|
+
function registerChangeConfigHandlerHelper(handler, versionSpecificHelper) {
|
3725
3853
|
ensureInitialized(FrameContexts.content);
|
3726
|
-
if (
|
3727
|
-
|
3854
|
+
if (versionSpecificHelper) {
|
3855
|
+
versionSpecificHelper();
|
3728
3856
|
}
|
3729
3857
|
registerHandler('changeSettings', handler);
|
3730
3858
|
}
|
3731
|
-
config.
|
3859
|
+
config.registerChangeConfigHandlerHelper = registerChangeConfigHandlerHelper;
|
3732
3860
|
/**
|
3733
3861
|
* @hidden
|
3734
3862
|
* Hide from docs, since this class is not directly used.
|
@@ -3833,14 +3961,32 @@ var pages;
|
|
3833
3961
|
* @param handler - The handler to invoke when the user presses the host client's back button.
|
3834
3962
|
*/
|
3835
3963
|
function registerBackButtonHandler(handler) {
|
3964
|
+
registerBackButtonHandlerHelper(handler, function () {
|
3965
|
+
if (!isSupported()) {
|
3966
|
+
throw errorNotSupportedOnPlatform;
|
3967
|
+
}
|
3968
|
+
});
|
3969
|
+
}
|
3970
|
+
backStack.registerBackButtonHandler = registerBackButtonHandler;
|
3971
|
+
/**
|
3972
|
+
* @hidden
|
3973
|
+
* Undocumented helper function with shared code between deprecated version and current version of the registerBackButtonHandler API.
|
3974
|
+
*
|
3975
|
+
* @internal
|
3976
|
+
* Limited to Microsoft-internal use
|
3977
|
+
*
|
3978
|
+
* @param handler - The handler to invoke when the user presses the host client's back button.
|
3979
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
3980
|
+
*/
|
3981
|
+
function registerBackButtonHandlerHelper(handler, versionSpecificHelper) {
|
3836
3982
|
ensureInitialized();
|
3837
|
-
if (
|
3838
|
-
|
3983
|
+
if (versionSpecificHelper) {
|
3984
|
+
versionSpecificHelper();
|
3839
3985
|
}
|
3840
3986
|
backButtonPressHandler = handler;
|
3841
3987
|
handler && sendMessageToParent('registerHandler', ['backButton']);
|
3842
3988
|
}
|
3843
|
-
backStack.
|
3989
|
+
backStack.registerBackButtonHandlerHelper = registerBackButtonHandlerHelper;
|
3844
3990
|
function handleBackButtonPress() {
|
3845
3991
|
if (!backButtonPressHandler || !backButtonPressHandler()) {
|
3846
3992
|
navigateBack();
|
@@ -3916,39 +4062,93 @@ var pages;
|
|
3916
4062
|
* @param handler - The handler to invoke when the personal app button is clicked in the app bar.
|
3917
4063
|
*/
|
3918
4064
|
function onClick(handler) {
|
4065
|
+
onClickHelper(handler, function () {
|
4066
|
+
if (!isSupported()) {
|
4067
|
+
throw errorNotSupportedOnPlatform;
|
4068
|
+
}
|
4069
|
+
});
|
4070
|
+
}
|
4071
|
+
appButton.onClick = onClick;
|
4072
|
+
/**
|
4073
|
+
* @hidden
|
4074
|
+
* Undocumented helper function with shared code between deprecated version and current version of the onClick API.
|
4075
|
+
*
|
4076
|
+
* @internal
|
4077
|
+
* Limited to Microsoft-internal use
|
4078
|
+
*
|
4079
|
+
* @param handler - The handler to invoke when the personal app button is clicked in the app bar.
|
4080
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
4081
|
+
*/
|
4082
|
+
function onClickHelper(handler, versionSpecificHelper) {
|
3919
4083
|
ensureInitialized(FrameContexts.content);
|
3920
|
-
if (
|
3921
|
-
|
4084
|
+
if (versionSpecificHelper) {
|
4085
|
+
versionSpecificHelper();
|
3922
4086
|
}
|
3923
4087
|
registerHandler('appButtonClick', handler);
|
3924
4088
|
}
|
3925
|
-
appButton.
|
4089
|
+
appButton.onClickHelper = onClickHelper;
|
3926
4090
|
/**
|
3927
4091
|
* Registers a handler for entering hover of the app button.
|
3928
4092
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
3929
4093
|
* @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
|
3930
4094
|
*/
|
3931
4095
|
function onHoverEnter(handler) {
|
4096
|
+
onHoverEnterHelper(handler, function () {
|
4097
|
+
if (!isSupported()) {
|
4098
|
+
throw errorNotSupportedOnPlatform;
|
4099
|
+
}
|
4100
|
+
});
|
4101
|
+
}
|
4102
|
+
appButton.onHoverEnter = onHoverEnter;
|
4103
|
+
/**
|
4104
|
+
* @hidden
|
4105
|
+
* Undocumented helper function with shared code between deprecated version and current version of the onHoverEnter API.
|
4106
|
+
*
|
4107
|
+
* @internal
|
4108
|
+
* Limited to Microsoft-internal use
|
4109
|
+
*
|
4110
|
+
* @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
|
4111
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
4112
|
+
*/
|
4113
|
+
function onHoverEnterHelper(handler, versionSpecificHelper) {
|
3932
4114
|
ensureInitialized(FrameContexts.content);
|
3933
|
-
if (
|
3934
|
-
|
4115
|
+
if (versionSpecificHelper) {
|
4116
|
+
versionSpecificHelper();
|
3935
4117
|
}
|
3936
4118
|
registerHandler('appButtonHoverEnter', handler);
|
3937
4119
|
}
|
3938
|
-
appButton.
|
4120
|
+
appButton.onHoverEnterHelper = onHoverEnterHelper;
|
3939
4121
|
/**
|
3940
4122
|
* Registers a handler for exiting hover of the app button.
|
3941
4123
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
3942
4124
|
* @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
|
3943
4125
|
*/
|
3944
4126
|
function onHoverLeave(handler) {
|
4127
|
+
onHoverLeaveHelper(handler, function () {
|
4128
|
+
if (!isSupported()) {
|
4129
|
+
throw errorNotSupportedOnPlatform;
|
4130
|
+
}
|
4131
|
+
});
|
4132
|
+
}
|
4133
|
+
appButton.onHoverLeave = onHoverLeave;
|
4134
|
+
/**
|
4135
|
+
* @hidden
|
4136
|
+
* Undocumented helper function with shared code between deprecated version and current version of the onHoverLeave API.
|
4137
|
+
*
|
4138
|
+
* @internal
|
4139
|
+
* Limited to Microsoft-internal use
|
4140
|
+
*
|
4141
|
+
* @param handler - The handler to invoke when existing hover of the personal app button in the app bar.
|
4142
|
+
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
4143
|
+
*/
|
4144
|
+
function onHoverLeaveHelper(handler, versionSpecificHelper) {
|
3945
4145
|
ensureInitialized(FrameContexts.content);
|
3946
|
-
if (
|
3947
|
-
|
4146
|
+
if (versionSpecificHelper) {
|
4147
|
+
versionSpecificHelper();
|
3948
4148
|
}
|
3949
4149
|
registerHandler('appButtonHoverLeave', handler);
|
3950
4150
|
}
|
3951
|
-
appButton.
|
4151
|
+
appButton.onHoverLeaveHelper = onHoverLeaveHelper;
|
3952
4152
|
/**
|
3953
4153
|
* Checks if pages.appButton capability is supported by the host
|
3954
4154
|
* @returns true if the pages.appButton capability is enabled in runtime.supports.pages.appButton and
|
@@ -6801,11 +7001,11 @@ var video;
|
|
6801
7001
|
var EffectChangeType;
|
6802
7002
|
(function (EffectChangeType) {
|
6803
7003
|
/**
|
6804
|
-
*
|
7004
|
+
* Current video effect changed
|
6805
7005
|
*/
|
6806
7006
|
EffectChangeType[EffectChangeType["EffectChanged"] = 0] = "EffectChanged";
|
6807
7007
|
/**
|
6808
|
-
*
|
7008
|
+
* Disable the video effect
|
6809
7009
|
*/
|
6810
7010
|
EffectChangeType[EffectChangeType["EffectDisabled"] = 1] = "EffectDisabled";
|
6811
7011
|
})(EffectChangeType = video.EffectChangeType || (video.EffectChangeType = {}));
|
@@ -6821,16 +7021,19 @@ var video;
|
|
6821
7021
|
throw errorNotSupportedOnPlatform;
|
6822
7022
|
}
|
6823
7023
|
registerHandler('video.newVideoFrame', function (videoFrame) {
|
6824
|
-
if (videoFrame
|
6825
|
-
|
7024
|
+
if (videoFrame) {
|
7025
|
+
var timestamp_1 = videoFrame.timestamp;
|
7026
|
+
frameCallback(videoFrame, function () {
|
7027
|
+
notifyVideoFrameProcessed(timestamp_1);
|
7028
|
+
}, notifyError);
|
6826
7029
|
}
|
6827
|
-
});
|
7030
|
+
}, false);
|
6828
7031
|
sendMessageToParent('video.registerForVideoFrame', [config]);
|
6829
7032
|
}
|
6830
7033
|
video.registerForVideoFrame = registerForVideoFrame;
|
6831
7034
|
/**
|
6832
|
-
* Video extension should call this to notify host
|
6833
|
-
* If it's pre-meeting, host
|
7035
|
+
* Video extension should call this to notify host that the current selected effect parameter changed.
|
7036
|
+
* If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
|
6834
7037
|
* If it's the in-meeting scenario, we will call videoEffectCallback when apply button clicked.
|
6835
7038
|
* @beta
|
6836
7039
|
* @param effectChangeType - the effect change type.
|
@@ -6845,7 +7048,7 @@ var video;
|
|
6845
7048
|
}
|
6846
7049
|
video.notifySelectedVideoEffectChanged = notifySelectedVideoEffectChanged;
|
6847
7050
|
/**
|
6848
|
-
* Register the video effect callback, host
|
7051
|
+
* Register the video effect callback, host uses this to notify the video extension the new video effect will by applied
|
6849
7052
|
* @beta
|
6850
7053
|
* @param callback - The VideoEffectCallback to invoke when registerForVideoEffect has completed
|
6851
7054
|
*/
|
@@ -6854,19 +7057,20 @@ var video;
|
|
6854
7057
|
if (!isSupported()) {
|
6855
7058
|
throw errorNotSupportedOnPlatform;
|
6856
7059
|
}
|
6857
|
-
registerHandler('video.effectParameterChange', callback);
|
7060
|
+
registerHandler('video.effectParameterChange', callback, false);
|
7061
|
+
sendMessageToParent('video.registerForVideoEffect');
|
6858
7062
|
}
|
6859
7063
|
video.registerForVideoEffect = registerForVideoEffect;
|
6860
7064
|
/**
|
6861
|
-
* Sending notification to host
|
7065
|
+
* Sending notification to host finished the video frame processing, now host can render this video frame
|
6862
7066
|
* or pass the video frame to next one in video pipeline
|
6863
7067
|
* @beta
|
6864
7068
|
*/
|
6865
|
-
function notifyVideoFrameProcessed() {
|
6866
|
-
sendMessageToParent('video.videoFrameProcessed');
|
7069
|
+
function notifyVideoFrameProcessed(timestamp) {
|
7070
|
+
sendMessageToParent('video.videoFrameProcessed', [timestamp]);
|
6867
7071
|
}
|
6868
7072
|
/**
|
6869
|
-
* Sending error notification to host
|
7073
|
+
* Sending error notification to host
|
6870
7074
|
* @beta
|
6871
7075
|
* @param errorMessage - The error message that will be sent to the host
|
6872
7076
|
*/
|
@@ -7384,7 +7588,7 @@ function registerOnThemeChangeHandler(handler) {
|
|
7384
7588
|
* @param handler - The handler to invoke when the user toggles full-screen view for a tab.
|
7385
7589
|
*/
|
7386
7590
|
function registerFullScreenHandler(handler) {
|
7387
|
-
pages.
|
7591
|
+
pages.registerFullScreenHandlerHelper(handler);
|
7388
7592
|
}
|
7389
7593
|
/**
|
7390
7594
|
* @deprecated
|
@@ -7396,7 +7600,7 @@ function registerFullScreenHandler(handler) {
|
|
7396
7600
|
* @param handler - The handler to invoke when the personal app button is clicked in the app bar.
|
7397
7601
|
*/
|
7398
7602
|
function registerAppButtonClickHandler(handler) {
|
7399
|
-
pages.appButton.
|
7603
|
+
pages.appButton.onClickHelper(handler);
|
7400
7604
|
}
|
7401
7605
|
/**
|
7402
7606
|
* @deprecated
|
@@ -7408,7 +7612,7 @@ function registerAppButtonClickHandler(handler) {
|
|
7408
7612
|
* @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
|
7409
7613
|
*/
|
7410
7614
|
function registerAppButtonHoverEnterHandler(handler) {
|
7411
|
-
pages.appButton.
|
7615
|
+
pages.appButton.onHoverEnterHelper(handler);
|
7412
7616
|
}
|
7413
7617
|
/**
|
7414
7618
|
* @deprecated
|
@@ -7420,7 +7624,7 @@ function registerAppButtonHoverEnterHandler(handler) {
|
|
7420
7624
|
*
|
7421
7625
|
*/
|
7422
7626
|
function registerAppButtonHoverLeaveHandler(handler) {
|
7423
|
-
pages.appButton.
|
7627
|
+
pages.appButton.onHoverLeaveHelper(handler);
|
7424
7628
|
}
|
7425
7629
|
/**
|
7426
7630
|
* @deprecated
|
@@ -7434,7 +7638,7 @@ function registerAppButtonHoverLeaveHandler(handler) {
|
|
7434
7638
|
* @param handler - The handler to invoke when the user presses their Team client's back button.
|
7435
7639
|
*/
|
7436
7640
|
function registerBackButtonHandler(handler) {
|
7437
|
-
pages.backStack.
|
7641
|
+
pages.backStack.registerBackButtonHandlerHelper(handler);
|
7438
7642
|
}
|
7439
7643
|
/**
|
7440
7644
|
* @deprecated
|
@@ -7446,7 +7650,7 @@ function registerBackButtonHandler(handler) {
|
|
7446
7650
|
* @param handler - The handler to invoke when the page is loaded.
|
7447
7651
|
*/
|
7448
7652
|
function registerOnLoadHandler(handler) {
|
7449
|
-
teamsCore.
|
7653
|
+
teamsCore.registerOnLoadHandlerHelper(handler);
|
7450
7654
|
}
|
7451
7655
|
/**
|
7452
7656
|
* @deprecated
|
@@ -7459,7 +7663,7 @@ function registerOnLoadHandler(handler) {
|
|
7459
7663
|
* invoke the readyToUnload function provided to it once it's ready to be unloaded.
|
7460
7664
|
*/
|
7461
7665
|
function registerBeforeUnloadHandler(handler) {
|
7462
|
-
teamsCore.
|
7666
|
+
teamsCore.registerBeforeUnloadHandlerHelper(handler);
|
7463
7667
|
}
|
7464
7668
|
/**
|
7465
7669
|
* @deprecated
|
@@ -7471,7 +7675,7 @@ function registerBeforeUnloadHandler(handler) {
|
|
7471
7675
|
* @param handler - The handler to invoked by the app when they want the focus to be in the place of their choice.
|
7472
7676
|
*/
|
7473
7677
|
function registerFocusEnterHandler(handler) {
|
7474
|
-
pages.
|
7678
|
+
pages.registerFocusEnterHandlerHelper(handler);
|
7475
7679
|
}
|
7476
7680
|
/**
|
7477
7681
|
* @deprecated
|
@@ -7482,7 +7686,7 @@ function registerFocusEnterHandler(handler) {
|
|
7482
7686
|
* @param handler - The handler to invoke when the user click on Settings.
|
7483
7687
|
*/
|
7484
7688
|
function registerChangeSettingsHandler(handler) {
|
7485
|
-
pages.config.
|
7689
|
+
pages.config.registerChangeConfigHandlerHelper(handler);
|
7486
7690
|
}
|
7487
7691
|
/**
|
7488
7692
|
* @deprecated
|
@@ -7814,7 +8018,7 @@ var settings;
|
|
7814
8018
|
* @param handler - The handler to invoke when the user selects the save button.
|
7815
8019
|
*/
|
7816
8020
|
function registerOnSaveHandler(handler) {
|
7817
|
-
pages.config.
|
8021
|
+
pages.config.registerOnSaveHandlerHelper(handler);
|
7818
8022
|
}
|
7819
8023
|
settings.registerOnSaveHandler = registerOnSaveHandler;
|
7820
8024
|
/**
|
@@ -7829,7 +8033,7 @@ var settings;
|
|
7829
8033
|
* @param handler - The handler to invoke when the user selects the remove button.
|
7830
8034
|
*/
|
7831
8035
|
function registerOnRemoveHandler(handler) {
|
7832
|
-
pages.config.
|
8036
|
+
pages.config.registerOnRemoveHandlerHelper(handler);
|
7833
8037
|
}
|
7834
8038
|
settings.registerOnRemoveHandler = registerOnRemoveHandler;
|
7835
8039
|
})(settings || (settings = {}));
|
@@ -8332,8 +8536,11 @@ var files;
|
|
8332
8536
|
* Initiates add 3P cloud storage provider flow, where a pop up window opens for user to select required
|
8333
8537
|
* 3P provider from the configured policy supported 3P provider list, following which user authentication
|
8334
8538
|
* for selected 3P provider is performed on success of which the selected 3P provider support is added for user
|
8539
|
+
* @beta
|
8335
8540
|
*
|
8336
|
-
* @param callback Callback that will be triggered post add 3P cloud storage provider action
|
8541
|
+
* @param callback Callback that will be triggered post add 3P cloud storage provider action.
|
8542
|
+
* If the error is encountered (and hence passed back), no provider value is sent back.
|
8543
|
+
* For success scenarios, error value will be passed as null and a valid provider value is sent.
|
8337
8544
|
*
|
8338
8545
|
* @internal
|
8339
8546
|
* Limited to Microsoft-internal use
|
@@ -8476,6 +8683,7 @@ var files;
|
|
8476
8683
|
* Hide from docs
|
8477
8684
|
*
|
8478
8685
|
* Initiates the upload 3P cloud storage file(s) flow, which will upload file(s) to the given 3P provider
|
8686
|
+
* @beta
|
8479
8687
|
*
|
8480
8688
|
* @param uploadFileRequest 3P cloud storage provider upload file(s) action request content
|
8481
8689
|
* @param callback Callback that will be triggered post uploading file(s) flow is finished
|
@@ -8494,11 +8702,7 @@ var files;
|
|
8494
8702
|
uploadFileRequest.content.itemList.length > 0)) {
|
8495
8703
|
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.uploadCloudStorageProviderFile] 3P cloud storage provider request content details are missing');
|
8496
8704
|
}
|
8497
|
-
if (!
|
8498
|
-
(uploadFileRequest.content.providerCode === CloudStorageProvider.SharePoint
|
8499
|
-
? uploadFileRequest.content.destinationFolder.isFolder
|
8500
|
-
: uploadFileRequest.content.destinationFolder.isSubdirectory) &&
|
8501
|
-
uploadFileRequest.content.destinationFolder.objectUrl)) {
|
8705
|
+
if (!uploadFileRequest.content.destinationFolder) {
|
8502
8706
|
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.uploadCloudStorageProviderFile] Invalid destination folder details');
|
8503
8707
|
}
|
8504
8708
|
sendMessageToParent('files.uploadCloudStorageProviderFile', [uploadFileRequest], callback);
|
@@ -9215,6 +9419,145 @@ var teams;
|
|
9215
9419
|
})(fullTrust = teams.fullTrust || (teams.fullTrust = {}));
|
9216
9420
|
})(teams || (teams = {}));
|
9217
9421
|
|
9422
|
+
;// CONCATENATED MODULE: ./src/private/videoEx.ts
|
9423
|
+
|
9424
|
+
|
9425
|
+
|
9426
|
+
|
9427
|
+
|
9428
|
+
/**
|
9429
|
+
* @hidden
|
9430
|
+
* Extended video API
|
9431
|
+
* @beta
|
9432
|
+
*
|
9433
|
+
* @internal
|
9434
|
+
* Limited to Microsoft-internal use
|
9435
|
+
*/
|
9436
|
+
var videoEx;
|
9437
|
+
(function (videoEx) {
|
9438
|
+
/**
|
9439
|
+
* @hidden
|
9440
|
+
* Register to process video frames
|
9441
|
+
* @beta
|
9442
|
+
*
|
9443
|
+
* @param frameCallback - The callback to invoke when registerForVideoFrame has completed
|
9444
|
+
* @param config - VideoFrameConfig to customize generated video frame parameters
|
9445
|
+
*
|
9446
|
+
* @internal
|
9447
|
+
* Limited to Microsoft-internal use
|
9448
|
+
*/
|
9449
|
+
function registerForVideoFrame(frameCallback, config) {
|
9450
|
+
ensureInitialized(FrameContexts.sidePanel);
|
9451
|
+
if (!isSupported()) {
|
9452
|
+
throw errorNotSupportedOnPlatform;
|
9453
|
+
}
|
9454
|
+
registerHandler('video.newVideoFrame', function (videoFrame) {
|
9455
|
+
if (videoFrame) {
|
9456
|
+
var timestamp_1 = videoFrame.timestamp;
|
9457
|
+
frameCallback(videoFrame, function () {
|
9458
|
+
notifyVideoFrameProcessed(timestamp_1);
|
9459
|
+
}, notifyError);
|
9460
|
+
}
|
9461
|
+
}, false);
|
9462
|
+
sendMessageToParent('video.registerForVideoFrame', [config]);
|
9463
|
+
}
|
9464
|
+
videoEx.registerForVideoFrame = registerForVideoFrame;
|
9465
|
+
/**
|
9466
|
+
* @hidden
|
9467
|
+
* Video extension should call this to notify host that the current selected effect parameter changed.
|
9468
|
+
* If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
|
9469
|
+
* If it's the in-meeting scenario, we will call videoEffectCallback when apply button clicked.
|
9470
|
+
* @beta
|
9471
|
+
* @param effectChangeType - the effect change type.
|
9472
|
+
* @param effectId - Newly selected effect id. {@linkcode VideoEffectCallBack}
|
9473
|
+
* @param effectParam Variant for the newly selected effect. {@linkcode VideoEffectCallBack}
|
9474
|
+
*
|
9475
|
+
* @internal
|
9476
|
+
* Limited to Microsoft-internal use
|
9477
|
+
*/
|
9478
|
+
function notifySelectedVideoEffectChanged(effectChangeType, effectId, effectParam) {
|
9479
|
+
ensureInitialized(FrameContexts.sidePanel);
|
9480
|
+
if (!isSupported()) {
|
9481
|
+
throw errorNotSupportedOnPlatform;
|
9482
|
+
}
|
9483
|
+
sendMessageToParent('video.videoEffectChanged', [effectChangeType, effectId, effectParam]);
|
9484
|
+
}
|
9485
|
+
videoEx.notifySelectedVideoEffectChanged = notifySelectedVideoEffectChanged;
|
9486
|
+
/**
|
9487
|
+
* @hidden
|
9488
|
+
* Register the video effect callback, host uses this to notify the video extension the new video effect will by applied
|
9489
|
+
* @beta
|
9490
|
+
* @param callback - The VideoEffectCallback to invoke when registerForVideoEffect has completed
|
9491
|
+
*
|
9492
|
+
* @internal
|
9493
|
+
* Limited to Microsoft-internal use
|
9494
|
+
*/
|
9495
|
+
function registerForVideoEffect(callback) {
|
9496
|
+
ensureInitialized(FrameContexts.sidePanel);
|
9497
|
+
if (!isSupported()) {
|
9498
|
+
throw errorNotSupportedOnPlatform;
|
9499
|
+
}
|
9500
|
+
registerHandler('video.effectParameterChange', callback, false);
|
9501
|
+
sendMessageToParent('video.registerForVideoEffect');
|
9502
|
+
}
|
9503
|
+
videoEx.registerForVideoEffect = registerForVideoEffect;
|
9504
|
+
/**
|
9505
|
+
* @hidden
|
9506
|
+
* Send personalized effects to Teams client
|
9507
|
+
* @beta
|
9508
|
+
*
|
9509
|
+
* @internal
|
9510
|
+
* Limited to Microsoft-internal use
|
9511
|
+
*/
|
9512
|
+
function updatePersonalizedEffects(effects) {
|
9513
|
+
ensureInitialized(FrameContexts.sidePanel);
|
9514
|
+
if (!video.isSupported()) {
|
9515
|
+
throw errorNotSupportedOnPlatform;
|
9516
|
+
}
|
9517
|
+
sendMessageToParent('video.personalizedEffectsChanged', [effects]);
|
9518
|
+
}
|
9519
|
+
videoEx.updatePersonalizedEffects = updatePersonalizedEffects;
|
9520
|
+
/**
|
9521
|
+
* @hidden
|
9522
|
+
* Checks if video capability is supported by the host
|
9523
|
+
* @beta
|
9524
|
+
*
|
9525
|
+
* @returns true if the video capability is enabled in runtime.supports.video and
|
9526
|
+
* false if it is disabled
|
9527
|
+
*
|
9528
|
+
* @internal
|
9529
|
+
* Limited to Microsoft-internal use
|
9530
|
+
*/
|
9531
|
+
function isSupported() {
|
9532
|
+
return video.isSupported();
|
9533
|
+
}
|
9534
|
+
videoEx.isSupported = isSupported;
|
9535
|
+
/**
|
9536
|
+
* @hidden
|
9537
|
+
* Sending notification to host finished the video frame processing, now host can render this video frame
|
9538
|
+
* or pass the video frame to next one in video pipeline
|
9539
|
+
* @beta
|
9540
|
+
*
|
9541
|
+
* @internal
|
9542
|
+
* Limited to Microsoft-internal use
|
9543
|
+
*/
|
9544
|
+
function notifyVideoFrameProcessed(timestamp) {
|
9545
|
+
sendMessageToParent('video.videoFrameProcessed', [timestamp]);
|
9546
|
+
}
|
9547
|
+
/**
|
9548
|
+
* @hidden
|
9549
|
+
* Sending error notification to host
|
9550
|
+
* @beta
|
9551
|
+
* @param errorMessage - The error message that will be sent to the host
|
9552
|
+
*
|
9553
|
+
* @internal
|
9554
|
+
* Limited to Microsoft-internal use
|
9555
|
+
*/
|
9556
|
+
function notifyError(errorMessage) {
|
9557
|
+
sendMessageToParent('video.notifyError', [errorMessage]);
|
9558
|
+
}
|
9559
|
+
})(videoEx || (videoEx = {}));
|
9560
|
+
|
9218
9561
|
;// CONCATENATED MODULE: ./src/private/index.ts
|
9219
9562
|
|
9220
9563
|
|
@@ -9226,6 +9569,7 @@ var teams;
|
|
9226
9569
|
|
9227
9570
|
|
9228
9571
|
|
9572
|
+
|
9229
9573
|
|
9230
9574
|
;// CONCATENATED MODULE: ./src/index.ts
|
9231
9575
|
|