@spatius/avatarkit 1.3.9 → 1.3.10-beta.1

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.
@@ -115,6 +115,23 @@ export interface AudioFormat {
115
115
  */
116
116
  readonly inputAudioFormat?: 'pcm' | 'opus';
117
117
  }
118
+ /** Options for creating an {@link AvatarView}. */
119
+ export interface AvatarViewOptions {
120
+ /**
121
+ * Audio format for THIS view. Defaults to `{ channelCount: 1, sampleRate: 16000 }`.
122
+ *
123
+ * Audio format is per-view, not global: two views in one page can run different
124
+ * sample rates. Change any field later via `view.controller.setAudioFormat()`
125
+ * (it lives on the controller, next to `initializeAudioContext` which you must
126
+ * call after it).
127
+ */
128
+ readonly audioFormat?: AudioFormat;
129
+ }
130
+ /**
131
+ * Partial update for `controller.setAudioFormat()`: fields left out keep their
132
+ * current value. `channelCount` is fixed at 1 and cannot be changed.
133
+ */
134
+ export type AudioFormatPatch = Partial<Omit<AudioFormat, 'channelCount'>>;
118
135
  export declare enum RenderQuality {
119
136
  standard = "standard",
120
137
  high = "high",
@@ -127,8 +144,6 @@ export interface Configuration {
127
144
  readonly drivingServiceMode?: DrivingServiceMode;
128
145
  /** Log level, default is off */
129
146
  readonly logLevel?: LogLevel;
130
- /** Audio format configuration, default is { channelCount: 1, sampleRate: 16000 } */
131
- readonly audioFormat?: AudioFormat;
132
147
  /** Custom endpoint overriding the region-derived host for both character API and driving WebSocket. */
133
148
  readonly customEndpoint?: string;
134
149
  /** Render quality tier, default is RenderQuality.ultra */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spatius/avatarkit",
3
3
  "type": "module",
4
- "version": "1.3.9",
4
+ "version": "1.3.10-beta.1",
5
5
  "packageManager": "pnpm@10.18.2",
6
6
  "description": "AvatarKit — real-time, audio-driven avatar rendering SDK for Web.",
7
7
  "homepage": "https://spatius.ai/",
@@ -91,8 +91,7 @@
91
91
  "@opentelemetry/sdk-trace-web": "2.7.1",
92
92
  "@opentelemetry/semantic-conventions": "^1.41.1",
93
93
  "nanoid": "^5.1.6",
94
- "opusscript": "0.1.1",
95
- "posthog-js": "^1.422.5"
94
+ "opusscript": "0.1.1"
96
95
  },
97
96
  "devDependencies": {
98
97
  "@types/node": "^20.11.30",