@spatius/avatarkit 1.2.0-beta.1 → 1.2.0-beta.3

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,16 @@ 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.2.0-beta.3] - 2026-06-25
9
+
10
+ ### Added
11
+ - New `ErrorCode.unsupportedAvatarAsset`. When loading an avatar whose asset requires a newer SDK, the load now fails fast with this error (surfaced via the existing `AvatarError` / `onError` path) instead of rendering incorrectly, prompting an SDK upgrade.
12
+
13
+ ## [1.2.0-beta.2] - 2026-06-23
14
+
15
+ ### Removed
16
+ - Post-processing support has been removed from the SDK. The `PostProcessingConfig` type and `AvatarController.setPostProcessingConfig()` are gone; the SDK now renders frames exactly as provided. No effect on standard playback or RTC.
17
+
8
18
  ## [1.2.0-beta.1] - 2026-06-19
9
19
 
10
20
  ### Added
@@ -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, l as logger, e as errorToMessage, a as logEvent } from "./index-DHCQ9wsL.js";
4
+ import { A as APP_CONFIG, l as logger, e as errorToMessage, a as logEvent } from "./index-Dgung4xA.js";
5
5
  class StreamingAudioPlayer {
6
6
  // Mark if AudioContext is being resumed, avoid concurrent resume requests
7
7
  constructor(options) {
@@ -75,7 +75,7 @@ class StreamingAudioPlayer {
75
75
  const context = event.target;
76
76
  if (context.state === "suspended" && this.isPlaying && !this.isPaused) {
77
77
  this.ensureAudioContextRunning().catch((err) => {
78
- logger.errorWithError("[StreamingAudioPlayer] Failed to auto-resume AudioContext after external suspend:", err);
78
+ logger.error("[StreamingAudioPlayer] Failed to auto-resume AudioContext after external suspend:", err);
79
79
  });
80
80
  }
81
81
  };
@@ -142,7 +142,7 @@ class StreamingAudioPlayer {
142
142
  state: this.audioContext.state
143
143
  });
144
144
  } catch (err) {
145
- logger.errorWithError("[StreamingAudioPlayer] Failed to resume AudioContext:", err);
145
+ logger.error("[StreamingAudioPlayer] Failed to resume AudioContext:", err);
146
146
  logEvent("audio_context_resume_failed", "error", {
147
147
  session_id: this.sessionId,
148
148
  reason: err instanceof Error ? err.message : String(err)
@@ -162,7 +162,7 @@ class StreamingAudioPlayer {
162
162
  }
163
163
  if (this.isPlaying && !this.isPaused && this.audioContext.state === "suspended") {
164
164
  this.ensureAudioContextRunning().catch((err) => {
165
- logger.errorWithError("[StreamingAudioPlayer] Failed to ensure AudioContext running in addChunk:", err);
165
+ logger.error("[StreamingAudioPlayer] Failed to ensure AudioContext running in addChunk:", err);
166
166
  });
167
167
  }
168
168
  this.audioChunks.push({ data: pcmData, isLast });
@@ -177,13 +177,13 @@ class StreamingAudioPlayer {
177
177
  this.log("[StreamingAudioPlayer] autoContinue=true, auto-resuming playback");
178
178
  this.autoContinue = false;
179
179
  this.resume().catch((err) => {
180
- logger.errorWithError("Failed to auto-resume playback:", err);
180
+ logger.error("Failed to auto-resume playback:", err);
181
181
  });
182
182
  }
183
183
  if (!this.isPlaying && this.autoStartEnabled && this.audioChunks.length > 0) {
184
184
  this.log("[StreamingAudioPlayer] Auto-starting playback from addChunk");
185
185
  this.startPlayback().catch((err) => {
186
- logger.errorWithError("[StreamingAudioPlayer] Failed to start playback from addChunk:", err);
186
+ logger.error("[StreamingAudioPlayer] Failed to start playback from addChunk:", err);
187
187
  });
188
188
  } else if (this.isPlaying && !this.isPaused) {
189
189
  this.log("[StreamingAudioPlayer] Already playing, scheduling next chunk");
@@ -261,7 +261,7 @@ class StreamingAudioPlayer {
261
261
  }
262
262
  if (this.audioContext.state === "suspended") {
263
263
  this.ensureAudioContextRunning().catch((err) => {
264
- logger.errorWithError("[StreamingAudioPlayer] Failed to ensure AudioContext running in scheduleNextChunk:", err);
264
+ logger.error("[StreamingAudioPlayer] Failed to ensure AudioContext running in scheduleNextChunk:", err);
265
265
  });
266
266
  }
267
267
  const chunkIndex = this.scheduledChunks;
@@ -326,7 +326,7 @@ class StreamingAudioPlayer {
326
326
  activeSources: this.activeSources.size
327
327
  });
328
328
  } catch (err) {
329
- logger.errorWithError("Failed to schedule audio chunk:", err);
329
+ logger.error("Failed to schedule audio chunk:", err);
330
330
  logEvent("schedule_chunk_failed", "error", {
331
331
  session_id: this.sessionId,
332
332
  reason: err instanceof Error ? err.message : String(err)
@@ -440,7 +440,7 @@ class StreamingAudioPlayer {
440
440
  this.isPaused = true;
441
441
  if (this.audioContext.state === "running") {
442
442
  this.audioContext.suspend().catch((err) => {
443
- logger.errorWithError("Failed to suspend AudioContext:", err);
443
+ logger.error("Failed to suspend AudioContext:", err);
444
444
  this.isPaused = false;
445
445
  });
446
446
  }
@@ -462,7 +462,7 @@ class StreamingAudioPlayer {
462
462
  try {
463
463
  await this.audioContext.resume();
464
464
  } catch (err) {
465
- logger.errorWithError("Failed to resume AudioContext:", err);
465
+ logger.error("Failed to resume AudioContext:", err);
466
466
  throw err;
467
467
  }
468
468
  }
@@ -531,7 +531,7 @@ class StreamingAudioPlayer {
531
531
  }
532
532
  this.autoStartEnabled = true;
533
533
  this.startPlayback().catch((err) => {
534
- logger.errorWithError("[StreamingAudioPlayer] Failed to start playback from play():", err);
534
+ logger.error("[StreamingAudioPlayer] Failed to start playback from play():", err);
535
535
  });
536
536
  }
537
537
  /**