@reactvision/react-viro 2.41.5 → 2.41.6

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.
@@ -4,9 +4,7 @@ import { Platform } from "react-native";
4
4
  export class ViroTelemetry {
5
5
  private static _isDisabled = false;
6
6
  private static _isDebugging = false;
7
- // TODO: use custom domain
8
- // private static _telemetryUrl = "https://telemetry.nativevision.xyz";
9
- private static _telemetryUrl = "https://native-vision-telemetry.onrender.com";
7
+ private static _telemetryUrl = "https://telemetry.reactvision.org";
10
8
  private static _timeout = 8000;
11
9
 
12
10
  /**
@@ -1 +1 @@
1
- export const VIRO_VERSION = "2.41.5";
1
+ export const VIRO_VERSION = "2.41.6";
@@ -6,9 +6,7 @@ const react_native_1 = require("react-native");
6
6
  class ViroTelemetry {
7
7
  static _isDisabled = false;
8
8
  static _isDebugging = false;
9
- // TODO: use custom domain
10
- // private static _telemetryUrl = "https://telemetry.nativevision.xyz";
11
- static _telemetryUrl = "https://native-vision-telemetry.onrender.com";
9
+ static _telemetryUrl = "https://telemetry.reactvision.org";
12
10
  static _timeout = 8000;
13
11
  /**
14
12
  * Allow a user to start debugging the telemetry to see what is sent.
@@ -4,94 +4,94 @@ exports.ViroTelemetry = void 0;
4
4
  const ViroVersion_1 = require("../Utilities/ViroVersion");
5
5
  const react_native_1 = require("react-native");
6
6
  class ViroTelemetry {
7
- static _isDisabled = false;
8
- static _isDebugging = false;
9
- // TODO: use custom domain
10
- // private static _telemetryUrl = "https://telemetry.nativevision.xyz";
11
- static _telemetryUrl = "https://native-vision-telemetry.onrender.com";
12
- static _timeout = 8000;
13
- /**
14
- * Allow a user to start debugging the telemetry to see what is sent.
15
- */
16
- static setDebugging() {
17
- this._isDebugging = true;
7
+ static _isDisabled = false;
8
+ static _isDebugging = false;
9
+ // TODO: use custom domain
10
+ // private static _telemetryUrl = "https://telemetry.reactvision.org";
11
+ static _telemetryUrl = "https://telemetry.reactvision.org";
12
+ static _timeout = 8000;
13
+ /**
14
+ * Allow a user to start debugging the telemetry to see what is sent.
15
+ */
16
+ static setDebugging() {
17
+ this._isDebugging = true;
18
+ }
19
+ /**
20
+ * Allow a user to opt out of telemetry.
21
+ */
22
+ static optOutTelemetry() {
23
+ this._isDisabled = true;
24
+ }
25
+ static recordTelemetry(eventName, payload = {}) {
26
+ // Skip recording telemetry if the feature is disabled
27
+ if (this._isDisabled) return;
28
+ // Do not send the telemetry data if debugging. Users may use this feature
29
+ // to preview what data would be sent.
30
+ if (this._isDebugging) {
31
+ console.log(
32
+ `[telemetry] ` + JSON.stringify({ eventName, payload }, null, 2)
33
+ );
34
+ return;
18
35
  }
19
- /**
20
- * Allow a user to opt out of telemetry.
21
- */
22
- static optOutTelemetry() {
23
- this._isDisabled = true;
36
+ const controller = new AbortController();
37
+ const timeoutId = setTimeout(() => controller.abort(), this._timeout);
38
+ payload = { ...payload, ...this.getAnonymousMeta() };
39
+ fetch(`${this._telemetryUrl}/api/v1/record`, {
40
+ method: "PUT",
41
+ body: JSON.stringify({ eventName, payload }),
42
+ headers: { "content-type": "application/json" },
43
+ signal: controller.signal,
44
+ })
45
+ .catch((e) => console.error(e))
46
+ .finally(() => clearTimeout(timeoutId));
47
+ }
48
+ static getAnonymousMeta() {
49
+ let isExpo = false;
50
+ try {
51
+ const myModule = require("expo");
52
+ isExpo = true;
53
+ } catch (err) {
54
+ // send error to log file
24
55
  }
25
- static recordTelemetry(eventName, payload = {}) {
26
- // Skip recording telemetry if the feature is disabled
27
- if (this._isDisabled)
28
- return;
29
- // Do not send the telemetry data if debugging. Users may use this feature
30
- // to preview what data would be sent.
31
- if (this._isDebugging) {
32
- console.log(`[telemetry] ` + JSON.stringify({ eventName, payload }, null, 2));
33
- return;
34
- }
35
- const controller = new AbortController();
36
- const timeoutId = setTimeout(() => controller.abort(), this._timeout);
37
- payload = { ...payload, ...this.getAnonymousMeta() };
38
- fetch(`${this._telemetryUrl}/api/v1/record`, {
39
- method: "PUT",
40
- body: JSON.stringify({ eventName, payload }),
41
- headers: { "content-type": "application/json" },
42
- signal: controller.signal,
43
- })
44
- .catch((e) => console.error(e))
45
- .finally(() => clearTimeout(timeoutId));
46
- }
47
- static getAnonymousMeta() {
48
- let isExpo = false;
49
- try {
50
- const myModule = require("expo");
51
- isExpo = true;
52
- }
53
- catch (err) {
54
- // send error to log file
55
- }
56
- try {
57
- const traits = {
58
- // expo
59
- isExpo:
60
- // @ts-ignore
61
- Boolean(window?.expo) || false,
62
- sdkVersion:
63
- // @ts-ignore
64
- window?.expo?.modules?.ExponentConstants?.sdkVersion || undefined,
65
- androidPackage:
66
- // @ts-ignore
67
- window?.expo?.modules?.ExponentConstants?.android?.package ||
68
- undefined,
69
- iosBundleIdentifier:
70
- // @ts-ignore
71
- window?.expo?.modules?.ExponentConstants?.ios?.bundleIdentifier ||
72
- undefined,
73
- expoDebugMode:
74
- // @ts-ignore
75
- window?.expo?.modules?.ExponentConstants?.debugMode || undefined,
76
- isDevice:
77
- // @ts-ignore
78
- window?.expo?.modules?.ExponentConstants?.isDevice || undefined,
79
- // library version
80
- viroVersion: ViroVersion_1.VIRO_VERSION,
81
- platform: react_native_1.Platform.OS,
82
- deviceOsVersion: react_native_1.Platform.Version,
83
- reactNativeVersion: react_native_1.Platform.constants.reactNativeVersion.major +
84
- "." +
85
- react_native_1.Platform.constants.reactNativeVersion.minor +
86
- "." +
87
- react_native_1.Platform.constants.reactNativeVersion.patch,
88
- };
89
- return traits;
90
- }
91
- catch (e) {
92
- console.error(e);
93
- }
94
- return {};
56
+ try {
57
+ const traits = {
58
+ // expo
59
+ isExpo:
60
+ // @ts-ignore
61
+ Boolean(window?.expo) || false,
62
+ sdkVersion:
63
+ // @ts-ignore
64
+ window?.expo?.modules?.ExponentConstants?.sdkVersion || undefined,
65
+ androidPackage:
66
+ // @ts-ignore
67
+ window?.expo?.modules?.ExponentConstants?.android?.package ||
68
+ undefined,
69
+ iosBundleIdentifier:
70
+ // @ts-ignore
71
+ window?.expo?.modules?.ExponentConstants?.ios?.bundleIdentifier ||
72
+ undefined,
73
+ expoDebugMode:
74
+ // @ts-ignore
75
+ window?.expo?.modules?.ExponentConstants?.debugMode || undefined,
76
+ isDevice:
77
+ // @ts-ignore
78
+ window?.expo?.modules?.ExponentConstants?.isDevice || undefined,
79
+ // library version
80
+ viroVersion: ViroVersion_1.VIRO_VERSION,
81
+ platform: react_native_1.Platform.OS,
82
+ deviceOsVersion: react_native_1.Platform.Version,
83
+ reactNativeVersion:
84
+ react_native_1.Platform.constants.reactNativeVersion.major +
85
+ "." +
86
+ react_native_1.Platform.constants.reactNativeVersion.minor +
87
+ "." +
88
+ react_native_1.Platform.constants.reactNativeVersion.patch,
89
+ };
90
+ return traits;
91
+ } catch (e) {
92
+ console.error(e);
95
93
  }
94
+ return {};
95
+ }
96
96
  }
97
97
  exports.ViroTelemetry = ViroTelemetry;
@@ -1 +1 @@
1
- export declare const VIRO_VERSION = "2.41.5";
1
+ export declare const VIRO_VERSION = "2.41.6";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VIRO_VERSION = void 0;
4
- exports.VIRO_VERSION = "2.41.5";
4
+ exports.VIRO_VERSION = "2.41.6";
@@ -140,7 +140,10 @@ const withViroAppBuildGradle = (config) => (0, config_plugins_1.withAppBuildGrad
140
140
  implementation project(':arcore_client')
141
141
  implementation project(path: ':react_viro')
142
142
  implementation project(path: ':viro_renderer')
143
- implementation 'com.google.android.exoplayer:exoplayer:2.19.1'
143
+ implementation 'androidx.media3:media3-exoplayer:1.1.1'
144
+ implementation 'androidx.media3:media3-exoplayer-dash:1.1.1'
145
+ implementation 'androidx.media3:media3-exoplayer-hls:1.1.1'
146
+ implementation 'androidx.media3:media3-exoplayer-smoothstreaming:1.1.1'
144
147
  implementation 'com.google.protobuf.nano:protobuf-javanano:3.1.0'
145
148
  // ========================================================================`);
146
149
  config.modResults.contents = config.modResults.contents.replace(/implementation\("com.facebook.react:react-android"\)/, `implementation("com.facebook.react:react-android")
@@ -151,7 +154,10 @@ const withViroAppBuildGradle = (config) => (0, config_plugins_1.withAppBuildGrad
151
154
  implementation project(':arcore_client')
152
155
  implementation project(path: ':react_viro')
153
156
  implementation project(path: ':viro_renderer')
154
- implementation 'com.google.android.exoplayer:exoplayer:2.19.1'
157
+ implementation 'androidx.media3:media3-exoplayer:1.1.1'
158
+ implementation 'androidx.media3:media3-exoplayer-dash:1.1.1'
159
+ implementation 'androidx.media3:media3-exoplayer-hls:1.1.1'
160
+ implementation 'androidx.media3:media3-exoplayer-smoothstreaming:1.1.1'
155
161
  implementation 'com.google.protobuf.nano:protobuf-javanano:3.1.0'
156
162
  // ========================================================================
157
163
  `);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "dist/index.js",
4
4
  "module": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
- "version": "2.41.5",
6
+ "version": "2.41.6",
7
7
  "license": "MIT",
8
8
  "publishConfig": {
9
9
  "registry": "https://registry.npmjs.org/"