@hytopia.com/server-protocol 1.2.8 → 1.2.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/schemas/Audio.ts +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hytopia.com/server-protocol",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/schemas/Audio.ts CHANGED
@@ -3,7 +3,7 @@ import type { JSONSchemaType } from 'ajv';
3
3
  import type { VectorSchema } from './Vector';
4
4
 
5
5
  export type AudioSchema = {
6
- i?: number; // audio id
6
+ i: number; // audio id
7
7
  a?: string; // audio uri
8
8
  d?: number; // duration
9
9
  de?: number; // detune
@@ -17,13 +17,14 @@ export type AudioSchema = {
17
17
  r?: boolean; // restart
18
18
  rd?: number; // reference distance
19
19
  s?: boolean; // stop
20
+ st?: number; // start tick
20
21
  v?: number; // volume (0 to 1)
21
22
  }
22
23
 
23
24
  export const audioSchema: JSONSchemaType<AudioSchema> = {
24
25
  type: 'object',
25
26
  properties: {
26
- i: { type: 'number', nullable: true },
27
+ i: { type: 'number' },
27
28
  a: { type: 'string', nullable: true },
28
29
  d: { type: 'number', nullable: true },
29
30
  de: { type: 'number', nullable: true },
@@ -37,7 +38,9 @@ export const audioSchema: JSONSchemaType<AudioSchema> = {
37
38
  r: { type: 'boolean', nullable: true },
38
39
  rd: { type: 'number', nullable: true },
39
40
  s: { type: 'boolean', nullable: true },
41
+ st: { type: 'number', nullable: true },
40
42
  v: { type: 'number', minimum: 0, maximum: 1, nullable: true },
41
43
  },
44
+ required: ['i'],
42
45
  additionalProperties: false,
43
46
  }