@speechly/react-client
Advanced tools
Comparing version 0.0.14 to 0.0.16
@@ -122,3 +122,3 @@ import React from 'react'; | ||
readonly toggleRecording: () => Promise<void>; | ||
readonly switchApp: (appId: string) => void; | ||
readonly switchApp: (appId: string) => Promise<void>; | ||
render(): JSX.Element; | ||
@@ -125,0 +125,0 @@ componentDidUpdate(prevProps: SpeechProviderProps): Promise<void>; |
@@ -173,9 +173,13 @@ "use strict"; | ||
}); }; | ||
_this.switchApp = function (appId) { | ||
var _a = _this.state, client = _a.client, clientState = _a.clientState; | ||
_this.setState({ appId: appId }); | ||
if (clientState === browser_client_1.ClientState.Recording) { | ||
client.switchContext(appId); | ||
} | ||
}; | ||
_this.switchApp = function (appId) { return __awaiter(_this, void 0, void 0, function () { | ||
var _a, client, clientState; | ||
return __generator(this, function (_b) { | ||
_a = this.state, client = _a.client, clientState = _a.clientState; | ||
this.setState({ appId: appId }); | ||
if (clientState === browser_client_1.ClientState.Recording) { | ||
return [2 /*return*/, client.switchContext(appId)]; | ||
} | ||
return [2 /*return*/]; | ||
}); | ||
}); }; | ||
_this.initialiseClient = function (opts) { | ||
@@ -286,3 +290,5 @@ var _a; | ||
toggleRecording: this.toggleRecording, | ||
switchApp: function (appId) { return _this.switchApp(appId); }, | ||
switchApp: function (appId) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { | ||
return [2 /*return*/, this.switchApp(appId)]; | ||
}); }); }, | ||
appId: appId, | ||
@@ -289,0 +295,0 @@ speechState: recordingState, |
@@ -128,3 +128,3 @@ import { Client } from '@speechly/browser-client'; | ||
readonly toggleRecording: () => Promise<void>; | ||
readonly switchApp: (appId: string) => void; | ||
readonly switchApp: (appId: string) => Promise<void>; | ||
render(): JSX.Element; | ||
@@ -131,0 +131,0 @@ componentDidUpdate(prevProps: SpeechProviderProps): Promise<void>; |
{ | ||
"name": "@speechly/react-client", | ||
"version": "0.0.14", | ||
"version": "0.0.16", | ||
"description": "React client for Speechly SLU API", | ||
@@ -39,3 +39,3 @@ "private": false, | ||
"dependencies": { | ||
"@speechly/browser-client": "^1.0.10" | ||
"@speechly/browser-client": "^1.0.11" | ||
}, | ||
@@ -42,0 +42,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52740
968