@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.
- package/components/Telemetry/ViroTelemetry.ts +1 -3
- package/components/Utilities/ViroVersion.ts +1 -1
- package/dist/components/Telemetry/ViroTelemetry.js +1 -3
- package/dist/components/Telemetry/index.js +86 -86
- package/dist/components/Utilities/ViroVersion.d.ts +1 -1
- package/dist/components/Utilities/ViroVersion.js +1 -1
- package/dist/plugins/withViroAndroid.js +8 -2
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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.
|
|
1
|
+
export declare const 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 '
|
|
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 '
|
|
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
|
`);
|