@applicaster/zapp-react-native-utils 13.0.13 → 13.0.15-rc.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.
@@ -35,8 +35,11 @@ export class AnalyticPlayerListener
35
35
  this.handleAnalyticEvent(PLAYBACK_EVENT.complete);
36
36
  };
37
37
 
38
- onError = (err: Error) => {
39
- this.handleAnalyticEvent(PLAYBACK_EVENT.error, err); // TODO: Check error format
38
+ onError = (err: QuickBrickPlayer.PlayerErrorI) => {
39
+ this.handleAnalyticEvent(
40
+ PLAYBACK_EVENT.error,
41
+ err.toObject?.() || { message: err.message }
42
+ );
40
43
  };
41
44
 
42
45
  onPlayerPause = (event) => {
@@ -229,14 +229,14 @@ export class TTSManager {
229
229
  try {
230
230
  window.webOS.service.request("luna://com.webos.service.tts", {
231
231
  method: "speak",
232
- onFailure(error: any) {
232
+ onFailure: (error: any) => {
233
233
  log_debug("There was a failure setting up webOS TTS service", {
234
234
  error,
235
235
  });
236
236
 
237
237
  this.ttsState$.next(false);
238
238
  },
239
- onSuccess(response: any) {
239
+ onSuccess: (response: any) => {
240
240
  log_debug("webOS TTS service is configured successfully", {
241
241
  response,
242
242
  });
@@ -1,7 +1,30 @@
1
+ /* eslint-disable brace-style */
2
+
1
3
  export const userPreferencesNamespace = "user_preferences";
2
4
 
3
5
  export const skipActionType = "show_skip";
4
6
 
7
+ export class PlayerError
8
+ extends Error
9
+ implements QuickBrickPlayer.PlayerErrorI
10
+ {
11
+ description: string;
12
+
13
+ constructor(message: string, description: string) {
14
+ super(message);
15
+ this.description = description;
16
+
17
+ Object.setPrototypeOf(this, PlayerError.prototype);
18
+ }
19
+
20
+ toObject() {
21
+ return {
22
+ error: this.message,
23
+ message: this.description,
24
+ };
25
+ }
26
+ }
27
+
5
28
  export enum SharedPlayerCallBacksKeys {
6
29
  OnPlayerResume = "onPlayerResume",
7
30
  OnPlayerPause = "onPlayerPause",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "13.0.13",
3
+ "version": "13.0.15-rc.0",
4
4
  "description": "Applicaster Zapp React Native utilities package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/applicaster-types": "13.0.13",
30
+ "@applicaster/applicaster-types": "13.0.15-rc.0",
31
31
  "buffer": "^5.2.1",
32
32
  "camelize": "^1.0.0",
33
33
  "dayjs": "^1.11.10",