@applicaster/zapp-react-native-utils 12.0.0-rc.119 → 12.0.0-rc.120
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.
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { BehaviorSubject } from "rxjs";
|
|
2
2
|
|
|
3
3
|
import { sessionStorage } from "@applicaster/zapp-react-native-bridge/ZappStorage/SessionStorage";
|
|
4
|
+
import {
|
|
5
|
+
isLgPlatform,
|
|
6
|
+
isSamsungPlatform,
|
|
7
|
+
} from "@applicaster/zapp-react-dom-app/App/Loader/utils/platform";
|
|
4
8
|
|
|
5
9
|
import { PLATFORM_KEYS, PLATFORMS } from "./const";
|
|
6
10
|
import { createLogger, utilsLogger } from "../../logger";
|
|
@@ -178,6 +182,34 @@ export class TTSManager {
|
|
|
178
182
|
}
|
|
179
183
|
|
|
180
184
|
readText(text: string) {
|
|
185
|
+
if (isSamsungPlatform() && window.speechSynthesis) {
|
|
186
|
+
const utterance = new SpeechSynthesisUtterance(text);
|
|
187
|
+
window.speechSynthesis.speak(utterance);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (isLgPlatform() && window.webOS?.service) {
|
|
191
|
+
try {
|
|
192
|
+
window.webOS.service.request("luna://com.webos.service.tts", {
|
|
193
|
+
method: "speak",
|
|
194
|
+
onFailure(error: any) {
|
|
195
|
+
log_debug("There was a failure setting up webOS TTS service", {
|
|
196
|
+
error,
|
|
197
|
+
});
|
|
198
|
+
},
|
|
199
|
+
onSuccess(response: any) {
|
|
200
|
+
log_debug("webOS TTS service is configured successfully", {
|
|
201
|
+
response,
|
|
202
|
+
});
|
|
203
|
+
},
|
|
204
|
+
parameters: {
|
|
205
|
+
text,
|
|
206
|
+
},
|
|
207
|
+
});
|
|
208
|
+
} catch (error) {
|
|
209
|
+
log_debug("webOS TTS service error", { error });
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
181
213
|
if (!window.VIZIO?.Chromevox) return;
|
|
182
214
|
|
|
183
215
|
window.VIZIO.Chromevox.play(text);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "12.0.0-rc.
|
|
3
|
+
"version": "12.0.0-rc.120",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "12.0.0-rc.
|
|
31
|
+
"@applicaster/applicaster-types": "12.0.0-rc.120",
|
|
32
32
|
"buffer": "^5.2.1",
|
|
33
33
|
"camelize": "^1.0.0",
|
|
34
34
|
"create-react-context": "^0.2.3",
|