@vizor-vr/shared 0.1.0
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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/__tests__/defaults.test.d.ts +2 -0
- package/dist/__tests__/defaults.test.d.ts.map +1 -0
- package/dist/__tests__/defaults.test.js +78 -0
- package/dist/__tests__/defaults.test.js.map +1 -0
- package/dist/__tests__/events.test.d.ts +2 -0
- package/dist/__tests__/events.test.d.ts.map +1 -0
- package/dist/__tests__/events.test.js +56 -0
- package/dist/__tests__/events.test.js.map +1 -0
- package/dist/__tests__/formats.test.d.ts +2 -0
- package/dist/__tests__/formats.test.d.ts.map +1 -0
- package/dist/__tests__/formats.test.js +75 -0
- package/dist/__tests__/formats.test.js.map +1 -0
- package/dist/__tests__/keybindings.test.d.ts +2 -0
- package/dist/__tests__/keybindings.test.d.ts.map +1 -0
- package/dist/__tests__/keybindings.test.js +59 -0
- package/dist/__tests__/keybindings.test.js.map +1 -0
- package/dist/__tests__/license.test.d.ts +2 -0
- package/dist/__tests__/license.test.d.ts.map +1 -0
- package/dist/__tests__/license.test.js +57 -0
- package/dist/__tests__/license.test.js.map +1 -0
- package/dist/__tests__/math.test.d.ts +2 -0
- package/dist/__tests__/math.test.d.ts.map +1 -0
- package/dist/__tests__/math.test.js +131 -0
- package/dist/__tests__/math.test.js.map +1 -0
- package/dist/__tests__/media.test.d.ts +2 -0
- package/dist/__tests__/media.test.d.ts.map +1 -0
- package/dist/__tests__/media.test.js +32 -0
- package/dist/__tests__/media.test.js.map +1 -0
- package/dist/constants/defaults.d.ts +31 -0
- package/dist/constants/defaults.d.ts.map +1 -0
- package/dist/constants/defaults.js +55 -0
- package/dist/constants/defaults.js.map +1 -0
- package/dist/constants/events.d.ts +5 -0
- package/dist/constants/events.d.ts.map +1 -0
- package/dist/constants/events.js +45 -0
- package/dist/constants/events.js.map +1 -0
- package/dist/constants/formats.d.ts +9 -0
- package/dist/constants/formats.d.ts.map +1 -0
- package/dist/constants/formats.js +206 -0
- package/dist/constants/formats.js.map +1 -0
- package/dist/constants/index.d.ts +7 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +7 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/keybindings.d.ts +10 -0
- package/dist/constants/keybindings.d.ts.map +1 -0
- package/dist/constants/keybindings.js +26 -0
- package/dist/constants/keybindings.js.map +1 -0
- package/dist/constants/license.d.ts +8 -0
- package/dist/constants/license.d.ts.map +1 -0
- package/dist/constants/license.js +111 -0
- package/dist/constants/license.js.map +1 -0
- package/dist/constants/media.d.ts +23 -0
- package/dist/constants/media.d.ts.map +1 -0
- package/dist/constants/media.js +20 -0
- package/dist/constants/media.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/types/analytics.d.ts +30 -0
- package/dist/types/analytics.d.ts.map +1 -0
- package/dist/types/analytics.js +2 -0
- package/dist/types/analytics.js.map +1 -0
- package/dist/types/annotations.d.ts +22 -0
- package/dist/types/annotations.d.ts.map +1 -0
- package/dist/types/annotations.js +2 -0
- package/dist/types/annotations.js.map +1 -0
- package/dist/types/collaborative.d.ts +77 -0
- package/dist/types/collaborative.d.ts.map +1 -0
- package/dist/types/collaborative.js +2 -0
- package/dist/types/collaborative.js.map +1 -0
- package/dist/types/events.d.ts +60 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +2 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/formats.d.ts +41 -0
- package/dist/types/formats.d.ts.map +1 -0
- package/dist/types/formats.js +33 -0
- package/dist/types/formats.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/license.d.ts +39 -0
- package/dist/types/license.d.ts.map +1 -0
- package/dist/types/license.js +2 -0
- package/dist/types/license.js.map +1 -0
- package/dist/types/player.d.ts +107 -0
- package/dist/types/player.d.ts.map +1 -0
- package/dist/types/player.js +2 -0
- package/dist/types/player.js.map +1 -0
- package/dist/types/tour.d.ts +21 -0
- package/dist/types/tour.d.ts.map +1 -0
- package/dist/types/tour.js +2 -0
- package/dist/types/tour.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/math.d.ts +28 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/dist/utils/math.js +46 -0
- package/dist/utils/math.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/constants/media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,MAAM,WAAW,eAAe;IAC9B,iFAAiF;IACjF,SAAS,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAC;IACzB,qFAAqF;IACrF,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,WAAW,EAAE,eAAe,CAK3D,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,CAEjE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const GB = 1024 ** 3;
|
|
2
|
+
/**
|
|
3
|
+
* Per-tier media limits — the approved unit economics. Free/Starter are hard
|
|
4
|
+
* capped (block when exceeded); Pro/Enterprise allow overage and meter it.
|
|
5
|
+
*/
|
|
6
|
+
export const TIER_MEDIA = {
|
|
7
|
+
free: { maxHeight: 720, storageBytes: 5 * GB, transcodeMinutes: 30, hardCap: true },
|
|
8
|
+
starter: { maxHeight: 1080, storageBytes: 50 * GB, transcodeMinutes: 300, hardCap: true },
|
|
9
|
+
pro: { maxHeight: 2160, storageBytes: 250 * GB, transcodeMinutes: 1200, hardCap: false },
|
|
10
|
+
enterprise: { maxHeight: 4320, storageBytes: 1024 * GB, transcodeMinutes: 6000, hardCap: false },
|
|
11
|
+
};
|
|
12
|
+
/** Pay-as-you-go overage rates (USD), billed on PAYG tiers only. */
|
|
13
|
+
export const MEDIA_OVERAGE = {
|
|
14
|
+
storagePerGbMonth: 0.05,
|
|
15
|
+
transcodePerMinute: 0.05,
|
|
16
|
+
};
|
|
17
|
+
export function getMediaLimits(tier) {
|
|
18
|
+
return TIER_MEDIA[tier] ?? TIER_MEDIA.free;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/constants/media.ts"],"names":[],"mappings":"AAEA,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC;AAarB;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAyC;IAC9D,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IACnF,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,GAAG,EAAE,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IACzF,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,GAAG,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;IACxF,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,GAAG,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;CACjG,CAAC;AAEF,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,iBAAiB,EAAE,IAAI;IACvB,kBAAkB,EAAE,IAAI;CAChB,CAAC;AAEX,MAAM,UAAU,cAAc,CAAC,IAAiB;IAC9C,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC;AAC7C,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,cAAc,sBAAsB,CAAC;AAGrC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Types
|
|
2
|
+
export * from './types/index.js';
|
|
3
|
+
// Re-export the enum as a value (not just a type)
|
|
4
|
+
export { VzFormat } from './types/formats.js';
|
|
5
|
+
// Constants
|
|
6
|
+
export * from './constants/index.js';
|
|
7
|
+
// Utils
|
|
8
|
+
export * from './utils/index.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,kBAAkB,CAAC;AAEjC,kDAAkD;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,YAAY;AACZ,cAAc,sBAAsB,CAAC;AAErC,QAAQ;AACR,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Analytics event types */
|
|
2
|
+
export type AnalyticsEventType = 'play' | 'pause' | 'seek' | 'ended' | 'quality_change' | 'vr_enter' | 'vr_exit' | 'tour_navigate' | 'buffering' | 'error' | 'fullscreen';
|
|
3
|
+
/** Analytics event payload sent from player to API */
|
|
4
|
+
export interface AnalyticsEvent {
|
|
5
|
+
type: AnalyticsEventType;
|
|
6
|
+
contentId: string;
|
|
7
|
+
sessionId: string;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
data?: Record<string, unknown>;
|
|
10
|
+
/** Browser user-agent string (auto-populated by player) */
|
|
11
|
+
userAgent?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Gaze sample for heatmap analytics */
|
|
14
|
+
export interface GazeSample {
|
|
15
|
+
contentId: string;
|
|
16
|
+
sessionId: string;
|
|
17
|
+
contentTime: number;
|
|
18
|
+
lat: number;
|
|
19
|
+
lon: number;
|
|
20
|
+
fov?: number;
|
|
21
|
+
}
|
|
22
|
+
/** Batched analytics payload */
|
|
23
|
+
export interface AnalyticsBatch {
|
|
24
|
+
events: AnalyticsEvent[];
|
|
25
|
+
}
|
|
26
|
+
/** Batched gaze data payload */
|
|
27
|
+
export interface GazeBatch {
|
|
28
|
+
samples: GazeSample[];
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/types/analytics.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,gBAAgB,GAChB,UAAU,GACV,SAAS,GACT,eAAe,GACf,WAAW,GACX,OAAO,GACP,YAAY,CAAC;AAEjB,sDAAsD;AACtD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wCAAwC;AACxC,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,gCAAgC;AAChC,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B;AAED,gCAAgC;AAChC,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../src/types/analytics.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Data for a single interactive annotation */
|
|
2
|
+
export interface AnnotationData {
|
|
3
|
+
/** Database ID (optional for player-only usage) */
|
|
4
|
+
id?: string;
|
|
5
|
+
/** Latitude in degrees (-90 to 90) */
|
|
6
|
+
lat: number;
|
|
7
|
+
/** Longitude in degrees (-180 to 180) */
|
|
8
|
+
lon: number;
|
|
9
|
+
/** Show annotation at this time (seconds). If undefined, always visible. */
|
|
10
|
+
timeStart?: number;
|
|
11
|
+
/** Hide annotation at this time (seconds). If undefined, visible until end. */
|
|
12
|
+
timeEnd?: number;
|
|
13
|
+
/** Title displayed on the sprite and popup header */
|
|
14
|
+
title: string;
|
|
15
|
+
/** Icon type: 'info' | 'pin' | 'star' | 'custom' */
|
|
16
|
+
icon?: string;
|
|
17
|
+
/** Rich HTML content shown in popup body */
|
|
18
|
+
htmlContent?: string;
|
|
19
|
+
/** Sort/display order */
|
|
20
|
+
sortOrder?: number;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../src/types/annotations.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../src/types/annotations.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** Collaborative session participant */
|
|
2
|
+
export interface CollabParticipant {
|
|
3
|
+
userId: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
isHost: boolean;
|
|
6
|
+
lat?: number;
|
|
7
|
+
lon?: number;
|
|
8
|
+
}
|
|
9
|
+
/** Client -> Server messages */
|
|
10
|
+
export type ClientMessage = {
|
|
11
|
+
type: 'join';
|
|
12
|
+
roomCode: string;
|
|
13
|
+
userId: string;
|
|
14
|
+
displayName: string;
|
|
15
|
+
password?: string;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'leave';
|
|
18
|
+
} | {
|
|
19
|
+
type: 'playback_state';
|
|
20
|
+
playing: boolean;
|
|
21
|
+
currentTime: number;
|
|
22
|
+
timestamp: number;
|
|
23
|
+
} | {
|
|
24
|
+
type: 'seek';
|
|
25
|
+
currentTime: number;
|
|
26
|
+
} | {
|
|
27
|
+
type: 'gaze';
|
|
28
|
+
lat: number;
|
|
29
|
+
lon: number;
|
|
30
|
+
} | {
|
|
31
|
+
type: 'chat';
|
|
32
|
+
text: string;
|
|
33
|
+
} | {
|
|
34
|
+
type: 'voice_signal';
|
|
35
|
+
sdp?: string;
|
|
36
|
+
candidate?: string;
|
|
37
|
+
targetUserId: string;
|
|
38
|
+
};
|
|
39
|
+
/** Server -> Client messages */
|
|
40
|
+
export type ServerMessage = {
|
|
41
|
+
type: 'room_state';
|
|
42
|
+
users: CollabParticipant[];
|
|
43
|
+
playing: boolean;
|
|
44
|
+
currentTime: number;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'user_joined';
|
|
47
|
+
user: CollabParticipant;
|
|
48
|
+
} | {
|
|
49
|
+
type: 'user_left';
|
|
50
|
+
userId: string;
|
|
51
|
+
} | {
|
|
52
|
+
type: 'sync';
|
|
53
|
+
playing: boolean;
|
|
54
|
+
currentTime: number;
|
|
55
|
+
serverTimestamp: number;
|
|
56
|
+
} | {
|
|
57
|
+
type: 'peer_gaze';
|
|
58
|
+
userId: string;
|
|
59
|
+
lat: number;
|
|
60
|
+
lon: number;
|
|
61
|
+
} | {
|
|
62
|
+
type: 'chat_message';
|
|
63
|
+
userId: string;
|
|
64
|
+
displayName: string;
|
|
65
|
+
text: string;
|
|
66
|
+
timestamp: number;
|
|
67
|
+
} | {
|
|
68
|
+
type: 'voice_signal';
|
|
69
|
+
fromUserId: string;
|
|
70
|
+
sdp?: string;
|
|
71
|
+
candidate?: string;
|
|
72
|
+
} | {
|
|
73
|
+
type: 'error';
|
|
74
|
+
code: string;
|
|
75
|
+
message: string;
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=collaborative.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaborative.d.ts","sourceRoot":"","sources":["../../src/types/collaborative.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC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IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAChF;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC9F;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaborative.js","sourceRoot":"","sources":["../../src/types/collaborative.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Standard HTML5 media events mirrored by the player */
|
|
2
|
+
export type VzMediaEvent = 'play' | 'pause' | 'playing' | 'seeking' | 'seeked' | 'ended' | 'loadstart' | 'progress' | 'suspend' | 'abort' | 'error' | 'emptied' | 'stalled' | 'loadedmetadata' | 'loadeddata' | 'canplay' | 'canplaythrough' | 'durationchange' | 'timeupdate' | 'ratechange' | 'resize' | 'volumechange' | 'waiting';
|
|
3
|
+
/** Vizor-specific custom events */
|
|
4
|
+
export type VzCustomEvent = 'vz-ready' | 'vz-loading-start' | 'vz-loading-progress' | 'vz-loading-complete' | 'vz-quality-change' | 'vz-xr-enter' | 'vz-xr-exit' | 'vz-fullscreen-enter' | 'vz-fullscreen-exit' | 'vz-orientation-change' | 'vz-tour-navigate' | 'vz-chapter-change' | 'vz-collab-join' | 'vz-collab-leave' | 'vz-error' | 'vz-license' | 'vz-playlist-change' | 'vz-playlist-end';
|
|
5
|
+
/** All event types emitted by the player */
|
|
6
|
+
export type VzEvent = VzMediaEvent | VzCustomEvent;
|
|
7
|
+
/** Event detail payloads */
|
|
8
|
+
export interface VzEventDetailMap {
|
|
9
|
+
'vz-ready': undefined;
|
|
10
|
+
'vz-loading-start': undefined;
|
|
11
|
+
'vz-loading-progress': {
|
|
12
|
+
progress: number;
|
|
13
|
+
};
|
|
14
|
+
'vz-loading-complete': undefined;
|
|
15
|
+
'vz-quality-change': {
|
|
16
|
+
quality: string;
|
|
17
|
+
auto: boolean;
|
|
18
|
+
};
|
|
19
|
+
'vz-xr-enter': undefined;
|
|
20
|
+
'vz-xr-exit': undefined;
|
|
21
|
+
'vz-fullscreen-enter': undefined;
|
|
22
|
+
'vz-fullscreen-exit': undefined;
|
|
23
|
+
'vz-orientation-change': {
|
|
24
|
+
lat: number;
|
|
25
|
+
lon: number;
|
|
26
|
+
fov: number;
|
|
27
|
+
};
|
|
28
|
+
'vz-tour-navigate': {
|
|
29
|
+
fromProbeId: string;
|
|
30
|
+
toProbeId: string;
|
|
31
|
+
};
|
|
32
|
+
'vz-chapter-change': {
|
|
33
|
+
chapterId: string;
|
|
34
|
+
title: string;
|
|
35
|
+
startTime: number;
|
|
36
|
+
};
|
|
37
|
+
'vz-collab-join': {
|
|
38
|
+
userId: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
41
|
+
'vz-collab-leave': {
|
|
42
|
+
userId: string;
|
|
43
|
+
};
|
|
44
|
+
'vz-error': {
|
|
45
|
+
code: string;
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
'vz-license': {
|
|
49
|
+
valid: boolean;
|
|
50
|
+
tier: string;
|
|
51
|
+
message?: string;
|
|
52
|
+
};
|
|
53
|
+
'vz-playlist-change': {
|
|
54
|
+
index: number;
|
|
55
|
+
title: string;
|
|
56
|
+
total: number;
|
|
57
|
+
};
|
|
58
|
+
'vz-playlist-end': undefined;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,OAAO,GACP,SAAS,GACT,SAAS,GACT,QAAQ,GACR,OAAO,GACP,WAAW,GACX,UAAU,GACV,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,gBAAgB,GAChB,YAAY,GACZ,SAAS,GACT,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,cAAc,GACd,SAAS,CAAC;AAEd,mCAAmC;AACnC,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,kBAAkB,GAClB,qBAAqB,GACrB,qBAAqB,GACrB,mBAAmB,GACnB,aAAa,GACb,YAAY,GACZ,qBAAqB,GACrB,oBAAoB,GACpB,uBAAuB,GACvB,kBAAkB,GAClB,mBAAmB,GACnB,gBAAgB,GAChB,iBAAiB,GACjB,UAAU,GACV,YAAY,GACZ,oBAAoB,GACpB,iBAAiB,CAAC;AAEtB,4CAA4C;AAC5C,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG,aAAa,CAAC;AAEnD,4BAA4B;AAC5B,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,SAAS,CAAC;IACtB,kBAAkB,EAAE,SAAS,CAAC;IAC9B,qBAAqB,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,qBAAqB,EAAE,SAAS,CAAC;IACjC,mBAAmB,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC;IACxD,aAAa,EAAE,SAAS,CAAC;IACzB,YAAY,EAAE,SAAS,CAAC;IACxB,qBAAqB,EAAE,SAAS,CAAC;IACjC,oBAAoB,EAAE,SAAS,CAAC;IAChC,uBAAuB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,kBAAkB,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,mBAAmB,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7E,gBAAgB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,iBAAiB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,YAAY,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,oBAAoB,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACtE,iBAAiB,EAAE,SAAS,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** All supported video/image format identifiers matching Delight VR + extensions */
|
|
2
|
+
export declare enum VzFormat {
|
|
3
|
+
MONO_360 = "MONO_360",
|
|
4
|
+
MONO_FLAT = "MONO_FLAT",
|
|
5
|
+
STEREO_180_LR = "STEREO_180_LR",
|
|
6
|
+
STEREO_180_TB = "STEREO_180_TB",
|
|
7
|
+
STEREO_180_LR_SPHERICAL = "STEREO_180_LR_SPHERICAL",
|
|
8
|
+
STEREO_180_TB_SPHERICAL = "STEREO_180_TB_SPHERICAL",
|
|
9
|
+
STEREO_360_LR = "STEREO_360_LR",
|
|
10
|
+
STEREO_360_TB = "STEREO_360_TB",
|
|
11
|
+
STEREO_FLAT_LR = "STEREO_FLAT_LR",
|
|
12
|
+
STEREO_FLAT_LR_SQUARE = "STEREO_FLAT_LR_SQUARE",
|
|
13
|
+
STEREO_FLAT_TB = "STEREO_FLAT_TB",
|
|
14
|
+
STEREO_FLAT_TB_SQUARE = "STEREO_FLAT_TB_SQUARE",
|
|
15
|
+
MONO_CUBEMAP = "MONO_CUBEMAP",
|
|
16
|
+
STEREO_CUBEMAP = "STEREO_CUBEMAP",
|
|
17
|
+
MONO_EAC = "MONO_EAC",
|
|
18
|
+
STEREO_EAC_TB = "STEREO_EAC_TB",
|
|
19
|
+
MONO_FISHEYE = "MONO_FISHEYE",
|
|
20
|
+
STEREO_FISHEYE_LR = "STEREO_FISHEYE_LR",
|
|
21
|
+
CARDBOARD_PHOTO = "CARDBOARD_PHOTO"
|
|
22
|
+
}
|
|
23
|
+
/** Projection geometry type */
|
|
24
|
+
export type ProjectionType = 'equirect' | 'spherical' | 'flat' | 'cubemap' | 'eac' | 'fisheye';
|
|
25
|
+
/** Stereo eye layout */
|
|
26
|
+
export type StereoMode = 'mono' | 'sbs' | 'tb' | 'separate';
|
|
27
|
+
/** Metadata for each format defining rendering behavior */
|
|
28
|
+
export interface FormatMeta {
|
|
29
|
+
format: VzFormat;
|
|
30
|
+
projection: ProjectionType;
|
|
31
|
+
stereoMode: StereoMode;
|
|
32
|
+
/** Horizontal field of view in degrees */
|
|
33
|
+
fovH: number;
|
|
34
|
+
/** Vertical field of view in degrees */
|
|
35
|
+
fovV: number;
|
|
36
|
+
supportsVideo: boolean;
|
|
37
|
+
supportsImage: boolean;
|
|
38
|
+
/** Whether this is a flat (non-panoramic) format */
|
|
39
|
+
isFlat: boolean;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=formats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../../src/types/formats.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,oBAAY,QAAQ;IAElB,QAAQ,aAAa;IACrB,SAAS,cAAc;IAGvB,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAG/B,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;IAGnD,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAG/B,cAAc,mBAAmB;IACjC,qBAAqB,0BAA0B;IAC/C,cAAc,mBAAmB;IACjC,qBAAqB,0BAA0B;IAG/C,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IAGjC,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAG/B,YAAY,iBAAiB;IAC7B,iBAAiB,sBAAsB;IAGvC,eAAe,oBAAoB;CACpC;AAED,+BAA+B;AAC/B,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;AAE/F,wBAAwB;AACxB,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,UAAU,CAAC;AAE5D,2DAA2D;AAC3D,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,QAAQ,CAAC;IACjB,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,oDAAoD;IACpD,MAAM,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** All supported video/image format identifiers matching Delight VR + extensions */
|
|
2
|
+
export var VzFormat;
|
|
3
|
+
(function (VzFormat) {
|
|
4
|
+
// Mono formats
|
|
5
|
+
VzFormat["MONO_360"] = "MONO_360";
|
|
6
|
+
VzFormat["MONO_FLAT"] = "MONO_FLAT";
|
|
7
|
+
// 180 stereo equirectangular
|
|
8
|
+
VzFormat["STEREO_180_LR"] = "STEREO_180_LR";
|
|
9
|
+
VzFormat["STEREO_180_TB"] = "STEREO_180_TB";
|
|
10
|
+
// 180 stereo spherical (VR180 cameras)
|
|
11
|
+
VzFormat["STEREO_180_LR_SPHERICAL"] = "STEREO_180_LR_SPHERICAL";
|
|
12
|
+
VzFormat["STEREO_180_TB_SPHERICAL"] = "STEREO_180_TB_SPHERICAL";
|
|
13
|
+
// 360 stereo equirectangular
|
|
14
|
+
VzFormat["STEREO_360_LR"] = "STEREO_360_LR";
|
|
15
|
+
VzFormat["STEREO_360_TB"] = "STEREO_360_TB";
|
|
16
|
+
// Flat stereo (3D movies)
|
|
17
|
+
VzFormat["STEREO_FLAT_LR"] = "STEREO_FLAT_LR";
|
|
18
|
+
VzFormat["STEREO_FLAT_LR_SQUARE"] = "STEREO_FLAT_LR_SQUARE";
|
|
19
|
+
VzFormat["STEREO_FLAT_TB"] = "STEREO_FLAT_TB";
|
|
20
|
+
VzFormat["STEREO_FLAT_TB_SQUARE"] = "STEREO_FLAT_TB_SQUARE";
|
|
21
|
+
// Cubemap
|
|
22
|
+
VzFormat["MONO_CUBEMAP"] = "MONO_CUBEMAP";
|
|
23
|
+
VzFormat["STEREO_CUBEMAP"] = "STEREO_CUBEMAP";
|
|
24
|
+
// EAC (Equi-Angular Cubemap)
|
|
25
|
+
VzFormat["MONO_EAC"] = "MONO_EAC";
|
|
26
|
+
VzFormat["STEREO_EAC_TB"] = "STEREO_EAC_TB";
|
|
27
|
+
// Fisheye (Dual)
|
|
28
|
+
VzFormat["MONO_FISHEYE"] = "MONO_FISHEYE";
|
|
29
|
+
VzFormat["STEREO_FISHEYE_LR"] = "STEREO_FISHEYE_LR";
|
|
30
|
+
// Special
|
|
31
|
+
VzFormat["CARDBOARD_PHOTO"] = "CARDBOARD_PHOTO";
|
|
32
|
+
})(VzFormat || (VzFormat = {}));
|
|
33
|
+
//# sourceMappingURL=formats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formats.js","sourceRoot":"","sources":["../../src/types/formats.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,CAAN,IAAY,QAqCX;AArCD,WAAY,QAAQ;IAClB,eAAe;IACf,iCAAqB,CAAA;IACrB,mCAAuB,CAAA;IAEvB,6BAA6B;IAC7B,2CAA+B,CAAA;IAC/B,2CAA+B,CAAA;IAE/B,uCAAuC;IACvC,+DAAmD,CAAA;IACnD,+DAAmD,CAAA;IAEnD,6BAA6B;IAC7B,2CAA+B,CAAA;IAC/B,2CAA+B,CAAA;IAE/B,0BAA0B;IAC1B,6CAAiC,CAAA;IACjC,2DAA+C,CAAA;IAC/C,6CAAiC,CAAA;IACjC,2DAA+C,CAAA;IAE/C,UAAU;IACV,yCAA6B,CAAA;IAC7B,6CAAiC,CAAA;IAEjC,6BAA6B;IAC7B,iCAAqB,CAAA;IACrB,2CAA+B,CAAA;IAE/B,iBAAiB;IACjB,yCAA6B,CAAA;IAC7B,mDAAuC,CAAA;IAEvC,UAAU;IACV,+CAAmC,CAAA;AACrC,CAAC,EArCW,QAAQ,KAAR,QAAQ,QAqCnB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type { VzFormat, ProjectionType, StereoMode, FormatMeta, } from './formats.js';
|
|
2
|
+
export { VzFormat as VzFormatEnum } from './formats.js';
|
|
3
|
+
export type { QualityLevel, PlayerConfig, PlaybackState, RendererState, VzError, ParsedSource, } from './player.js';
|
|
4
|
+
export type { VzMediaEvent, VzCustomEvent, VzEvent, VzEventDetailMap, } from './events.js';
|
|
5
|
+
export type { LicenseTier, FeatureFlags, LicenseResult, LicenseMode, } from './license.js';
|
|
6
|
+
export type { TourProbe, TourPortal, } from './tour.js';
|
|
7
|
+
export type { AnalyticsEventType, AnalyticsEvent, GazeSample, AnalyticsBatch, GazeBatch, } from './analytics.js';
|
|
8
|
+
export type { CollabParticipant, ClientMessage, ServerMessage, } from './collaborative.js';
|
|
9
|
+
export type { AnnotationData, } from './annotations.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,QAAQ,EACR,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,cAAc,CAAC;AAExD,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,OAAO,EACP,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,YAAY,EACZ,aAAa,EACb,OAAO,EACP,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,SAAS,EACT,UAAU,GACX,MAAM,WAAW,CAAC;AAEnB,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,cAAc,EACd,SAAS,GACV,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,aAAa,GACd,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,cAAc,GACf,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** License tiers */
|
|
2
|
+
export type LicenseTier = 'free' | 'starter' | 'pro' | 'enterprise';
|
|
3
|
+
/** Feature flags unlocked per tier */
|
|
4
|
+
export interface FeatureFlags {
|
|
5
|
+
stereoFormats: boolean;
|
|
6
|
+
formats180: boolean;
|
|
7
|
+
adaptiveStreaming: boolean;
|
|
8
|
+
qualitySelector: boolean;
|
|
9
|
+
tours: boolean;
|
|
10
|
+
cinema: boolean;
|
|
11
|
+
hub: boolean;
|
|
12
|
+
spatialAudio: boolean;
|
|
13
|
+
webxr: boolean;
|
|
14
|
+
customBranding: boolean;
|
|
15
|
+
brandLogoColors: boolean;
|
|
16
|
+
analytics: boolean;
|
|
17
|
+
analyticsHeatmaps: boolean;
|
|
18
|
+
collaborative: boolean;
|
|
19
|
+
chapters: boolean;
|
|
20
|
+
aiChaptering: boolean;
|
|
21
|
+
captions: boolean;
|
|
22
|
+
keyboardShortcuts: boolean;
|
|
23
|
+
playlist: boolean;
|
|
24
|
+
drm: boolean;
|
|
25
|
+
webhooks: boolean;
|
|
26
|
+
removeWatermark: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** Result of license validation */
|
|
29
|
+
export interface LicenseResult {
|
|
30
|
+
valid: boolean;
|
|
31
|
+
tier: LicenseTier;
|
|
32
|
+
features: FeatureFlags;
|
|
33
|
+
domains?: string[];
|
|
34
|
+
expiresAt?: string;
|
|
35
|
+
message?: string;
|
|
36
|
+
}
|
|
37
|
+
/** License validation mode */
|
|
38
|
+
export type LicenseMode = 'saas' | 'standalone';
|
|
39
|
+
//# sourceMappingURL=license.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"license.d.ts","sourceR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":"","sources":["../../src/types/license.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { VzFormat, StereoMode } from './formats.js';
|
|
2
|
+
import type { LicenseMode } from './license.js';
|
|
3
|
+
/** Quality level for multi-source or adaptive streaming */
|
|
4
|
+
export interface QualityLevel {
|
|
5
|
+
label: string;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
bitrate?: number;
|
|
9
|
+
/** Whether this is the currently active quality */
|
|
10
|
+
active: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Resolved player configuration (merged from attributes + meta tags) */
|
|
13
|
+
export interface PlayerConfig {
|
|
14
|
+
format: VzFormat;
|
|
15
|
+
title?: string;
|
|
16
|
+
author?: string;
|
|
17
|
+
authorHref?: string;
|
|
18
|
+
poster?: string;
|
|
19
|
+
loop: boolean;
|
|
20
|
+
muted: boolean;
|
|
21
|
+
preload: 'auto' | 'metadata' | 'none';
|
|
22
|
+
fps: number;
|
|
23
|
+
startLat: number;
|
|
24
|
+
startLon: number;
|
|
25
|
+
focalLength: number;
|
|
26
|
+
minFocalLength: number;
|
|
27
|
+
maxFocalLength: number;
|
|
28
|
+
displayMode: 'inline' | 'fullscreen';
|
|
29
|
+
width?: string;
|
|
30
|
+
height?: string;
|
|
31
|
+
aspect?: string;
|
|
32
|
+
crossorigin?: 'anonymous' | 'use-credentials';
|
|
33
|
+
corsFallbackUrl?: string;
|
|
34
|
+
corsFallbackRedirectConfirmation: boolean;
|
|
35
|
+
audioFormat?: 'ambix';
|
|
36
|
+
seekable: boolean;
|
|
37
|
+
apiKey?: string;
|
|
38
|
+
licenseKey?: string;
|
|
39
|
+
licenseMode?: LicenseMode;
|
|
40
|
+
apiEndpoint?: string;
|
|
41
|
+
contentId?: string;
|
|
42
|
+
primaryColor: string;
|
|
43
|
+
secondaryColor: string;
|
|
44
|
+
brandName?: string;
|
|
45
|
+
brandLogo?: string;
|
|
46
|
+
brandUrl?: string;
|
|
47
|
+
watermarkLogo?: string;
|
|
48
|
+
collabServer?: string;
|
|
49
|
+
collabRoom?: string;
|
|
50
|
+
collabRole?: 'host' | 'viewer';
|
|
51
|
+
collabUserId?: string;
|
|
52
|
+
collabDisplayName?: string;
|
|
53
|
+
collabPassword?: string;
|
|
54
|
+
hideCompass: boolean;
|
|
55
|
+
hideVrButton: boolean;
|
|
56
|
+
hideSettings: boolean;
|
|
57
|
+
hideFullscreen: boolean;
|
|
58
|
+
hideControls: boolean;
|
|
59
|
+
hideTitle: boolean;
|
|
60
|
+
hideBrandLogo: boolean;
|
|
61
|
+
hideWatermark: boolean;
|
|
62
|
+
}
|
|
63
|
+
/** Current playback state */
|
|
64
|
+
export interface PlaybackState {
|
|
65
|
+
playing: boolean;
|
|
66
|
+
paused: boolean;
|
|
67
|
+
currentTime: number;
|
|
68
|
+
duration: number;
|
|
69
|
+
buffered: number;
|
|
70
|
+
seeking: boolean;
|
|
71
|
+
ended: boolean;
|
|
72
|
+
volume: number;
|
|
73
|
+
muted: boolean;
|
|
74
|
+
playbackRate: number;
|
|
75
|
+
loading: boolean;
|
|
76
|
+
loadProgress: number;
|
|
77
|
+
}
|
|
78
|
+
/** Current renderer state */
|
|
79
|
+
export interface RendererState {
|
|
80
|
+
format: VzFormat;
|
|
81
|
+
stereoMode: StereoMode;
|
|
82
|
+
lat: number;
|
|
83
|
+
lon: number;
|
|
84
|
+
fov: number;
|
|
85
|
+
xrSupported: boolean;
|
|
86
|
+
xrActive: boolean;
|
|
87
|
+
controlsVisible: boolean;
|
|
88
|
+
fullscreen: boolean;
|
|
89
|
+
isLive: boolean;
|
|
90
|
+
isAtLiveEdge: boolean;
|
|
91
|
+
}
|
|
92
|
+
/** Player error */
|
|
93
|
+
export interface VzError {
|
|
94
|
+
code: string;
|
|
95
|
+
message: string;
|
|
96
|
+
details?: unknown;
|
|
97
|
+
}
|
|
98
|
+
/** Parsed source from <source> element */
|
|
99
|
+
export interface ParsedSource {
|
|
100
|
+
url: string;
|
|
101
|
+
type: string;
|
|
102
|
+
quality?: string;
|
|
103
|
+
fps?: number;
|
|
104
|
+
format?: VzFormat;
|
|
105
|
+
audioFormat?: 'ambix';
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=player.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player.d.ts","sourceRoot":"","sources":["../../src/types/player.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,2DAA2D;AAC3D,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,yEAAyE;AACzE,MAAM,WAAW,YAAY;IAE3B,MAAM,EAAE,QAAQ,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IACtC,GAAG,EAAE,MAAM,CAAC;IAGZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IAGvB,WAAW,EAAE,QAAQ,GAAG,YAAY,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CA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C;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,6BAA6B;AAC7B,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,QAAQ,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,mBAAmB;AACnB,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,0CAA0C;AAC1C,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player.js","sourceRoot":"","sources":["../../src/types/player.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { VzFormat } from './formats.js';
|
|
2
|
+
/** Configuration for a tour probe (viewpoint) */
|
|
3
|
+
export interface TourProbe {
|
|
4
|
+
probeId: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
format: VzFormat;
|
|
7
|
+
src: string;
|
|
8
|
+
srcLeft?: string;
|
|
9
|
+
srcRight?: string;
|
|
10
|
+
rotationY?: number;
|
|
11
|
+
portals: TourPortal[];
|
|
12
|
+
}
|
|
13
|
+
/** Configuration for a tour portal (navigation hotspot) */
|
|
14
|
+
export interface TourPortal {
|
|
15
|
+
to: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
lat?: number;
|
|
18
|
+
lon?: number;
|
|
19
|
+
distance?: number;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=tour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour.d.ts","sourceRoot":"","sources":["../../src/types/tour.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,iDAAiD;AACjD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,QAAQ,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,2DAA2D;AAC3D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tour.js","sourceRoot":"","sources":["../../src/types/tour.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,MAAM,WAAW,CAAC"}
|