@spatialwalk/avatarkit 1.0.0-beta.49 → 1.0.0-beta.50
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.0-beta.50] - 2025-01-05
|
|
9
|
+
|
|
10
|
+
### 🔧 Performance Improvements
|
|
11
|
+
- **Removed CORS Preflight for Meta API** - Removed authentication headers (`X-App-Id` and `Authorization`) and unnecessary `Content-Type` header from character metadata API requests. This eliminates CORS preflight requests for simple GET requests, improving loading performance.
|
|
12
|
+
|
|
8
13
|
## [1.0.0-beta.49] - 2025-01-05
|
|
9
14
|
|
|
10
15
|
### 🐛 Bugfix
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { A as APP_CONFIG, e as errorToMessage, l as logEvent, a as logger } from "./index-
|
|
4
|
+
import { A as APP_CONFIG, e as errorToMessage, l as logEvent, a as logger } from "./index-BHk2NbFu.js";
|
|
5
5
|
class StreamingAudioPlayer {
|
|
6
6
|
constructor(options) {
|
|
7
7
|
__publicField(this, "audioContext", null);
|
|
@@ -7576,7 +7576,7 @@ const _AnimationPlayer = class _AnimationPlayer {
|
|
|
7576
7576
|
if (this.streamingPlayer) {
|
|
7577
7577
|
return;
|
|
7578
7578
|
}
|
|
7579
|
-
const { StreamingAudioPlayer } = await import("./StreamingAudioPlayer-
|
|
7579
|
+
const { StreamingAudioPlayer } = await import("./StreamingAudioPlayer-DTpMpES9.js");
|
|
7580
7580
|
const { AvatarSDK: AvatarSDK2 } = await Promise.resolve().then(() => AvatarSDK$1);
|
|
7581
7581
|
const audioFormat = AvatarSDK2.getAudioFormat();
|
|
7582
7582
|
this.streamingPlayer = new StreamingAudioPlayer({
|
|
@@ -8966,7 +8966,7 @@ class AvatarSDK {
|
|
|
8966
8966
|
}
|
|
8967
8967
|
__publicField(AvatarSDK, "_isInitialized", false);
|
|
8968
8968
|
__publicField(AvatarSDK, "_configuration", null);
|
|
8969
|
-
__publicField(AvatarSDK, "_version", "1.0.0-beta.
|
|
8969
|
+
__publicField(AvatarSDK, "_version", "1.0.0-beta.50");
|
|
8970
8970
|
__publicField(AvatarSDK, "_avatarCore", null);
|
|
8971
8971
|
__publicField(AvatarSDK, "_dynamicSdkConfig", null);
|
|
8972
8972
|
const AvatarSDK$1 = Object.freeze(Object.defineProperty({
|
|
@@ -12132,20 +12132,14 @@ class AvatarDownloader {
|
|
|
12132
12132
|
const customBaseUrl = (_a = AvatarSDK.configuration) == null ? void 0 : _a.characterApiBaseUrl;
|
|
12133
12133
|
const baseUrl = customBaseUrl || AvatarSDK.getEnvironmentConfig().sdkApiBaseUrl;
|
|
12134
12134
|
const fullUrl = baseUrl + url;
|
|
12135
|
-
const headers = {
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
const token = AvatarSDK.sessionToken;
|
|
12140
|
-
if (appId) {
|
|
12141
|
-
headers["X-App-Id"] = appId;
|
|
12142
|
-
}
|
|
12143
|
-
if (token) {
|
|
12144
|
-
headers["Authorization"] = `Bearer ${token}`;
|
|
12135
|
+
const headers = {};
|
|
12136
|
+
const method = options.method || "GET";
|
|
12137
|
+
if (method !== "GET" && options.body) {
|
|
12138
|
+
headers["Content-Type"] = "application/json";
|
|
12145
12139
|
}
|
|
12146
12140
|
try {
|
|
12147
12141
|
const response = await fetch(fullUrl, {
|
|
12148
|
-
method
|
|
12142
|
+
method,
|
|
12149
12143
|
headers: {
|
|
12150
12144
|
...headers,
|
|
12151
12145
|
...options.headers
|
|
@@ -12154,19 +12148,7 @@ class AvatarDownloader {
|
|
|
12154
12148
|
});
|
|
12155
12149
|
if (!response.ok) {
|
|
12156
12150
|
let error;
|
|
12157
|
-
if (response.status ===
|
|
12158
|
-
logEvent("session_token_expired", "warning", {
|
|
12159
|
-
con_id: idManager.getConnectionId() || "",
|
|
12160
|
-
description: `HTTP 401: ${response.statusText}`
|
|
12161
|
-
});
|
|
12162
|
-
error = new SPAvatarError(`HTTP 401: ${response.statusText}`, ErrorCode.sessionTokenExpired);
|
|
12163
|
-
} else if (response.status === 400) {
|
|
12164
|
-
logEvent("session_token_invalid", "warning", {
|
|
12165
|
-
con_id: idManager.getConnectionId() || "",
|
|
12166
|
-
description: `HTTP 400: ${response.statusText}`
|
|
12167
|
-
});
|
|
12168
|
-
error = new SPAvatarError(`HTTP 400: ${response.statusText}`, ErrorCode.sessionTokenInvalid);
|
|
12169
|
-
} else if (response.status === 404) {
|
|
12151
|
+
if (response.status === 404) {
|
|
12170
12152
|
const urlMatch = url.match(/\/v2\/character\/([^/?]+)/);
|
|
12171
12153
|
const extractedCharacterId = urlMatch ? urlMatch[1] : "unknown";
|
|
12172
12154
|
const errorMessage = `HTTP 404: ${response.statusText}`;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED