@jaaq/jaaq-sdk-js 1.0.1 → 1.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/README.md +733 -92
- package/dist/embed/embed-collection.html +275 -0
- package/dist/embed/embed.html +270 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/jaaq-sdk.min.js.map +1 -1
- package/dist/ui/index.cjs +5051 -0
- package/dist/ui/index.cjs.map +1 -0
- package/dist/ui/index.d.ts +378 -0
- package/dist/ui/index.mjs +5044 -0
- package/dist/ui/index.mjs.map +1 -0
- package/dist/ui/jaaq-ui-bundled.min.js +8 -0
- package/dist/ui/jaaq-ui-bundled.min.js.map +1 -0
- package/dist/ui/jaaq-ui.min.js +8 -0
- package/dist/ui/jaaq-ui.min.js.map +1 -0
- package/dist/ui/react/index.cjs +4756 -0
- package/dist/ui/react/index.cjs.map +1 -0
- package/dist/ui/react/index.d.ts +182 -0
- package/dist/ui/react/index.mjs +4735 -0
- package/dist/ui/react/index.mjs.map +1 -0
- package/dist/ui/react/jaaq-ui-react.min.js +8 -0
- package/dist/ui/react/jaaq-ui-react.min.js.map +1 -0
- package/dist/ui/vanilla/index.cjs +5052 -0
- package/dist/ui/vanilla/index.cjs.map +1 -0
- package/dist/ui/vanilla/index.d.ts +465 -0
- package/dist/ui/vanilla/index.mjs +5044 -0
- package/dist/ui/vanilla/index.mjs.map +1 -0
- package/dist/ui/vanilla/jaaq-vanilla-bundled.min.js +8 -0
- package/dist/ui/vanilla/jaaq-vanilla-bundled.min.js.map +1 -0
- package/dist/ui/vanilla/jaaq-vanilla.min.js +8 -0
- package/dist/ui/vanilla/jaaq-vanilla.min.js.map +1 -0
- package/dist/ui/webcomponents/index.cjs +4619 -0
- package/dist/ui/webcomponents/index.cjs.map +1 -0
- package/dist/ui/webcomponents/index.d.ts +288 -0
- package/dist/ui/webcomponents/index.mjs +4614 -0
- package/dist/ui/webcomponents/index.mjs.map +1 -0
- package/dist/ui/webcomponents/jaaq-webcomponents-bundled.min.js +8 -0
- package/dist/ui/webcomponents/jaaq-webcomponents-bundled.min.js.map +1 -0
- package/dist/ui/webcomponents/jaaq-webcomponents.min.js +8 -0
- package/dist/ui/webcomponents/jaaq-webcomponents.min.js.map +1 -0
- package/package.json +42 -2
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
type FetchLike = typeof globalThis.fetch;
|
|
2
|
+
type RequestOptions = Parameters<typeof globalThis.fetch>[1];
|
|
3
|
+
interface HttpClient {
|
|
4
|
+
get<T>(_path: string, _init?: RequestOptions): Promise<T>;
|
|
5
|
+
post<T>(_path: string, _body?: unknown, _init?: RequestOptions): Promise<T>;
|
|
6
|
+
put<T>(_path: string, _body?: unknown, _init?: RequestOptions): Promise<T>;
|
|
7
|
+
patch<T>(_path: string, _body?: unknown, _init?: RequestOptions): Promise<T>;
|
|
8
|
+
delete<T>(_path: string, _init?: RequestOptions): Promise<T>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type VideoDTO = {
|
|
12
|
+
id: string;
|
|
13
|
+
videoId: string;
|
|
14
|
+
question: string;
|
|
15
|
+
status: number;
|
|
16
|
+
transcription: string;
|
|
17
|
+
subtitle: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
videoUrl: string;
|
|
20
|
+
published: boolean;
|
|
21
|
+
tags: string[];
|
|
22
|
+
severity: number | null;
|
|
23
|
+
duration: number;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type VideosResource = {
|
|
28
|
+
getById(_id: string): Promise<VideoDTO>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
type CollectionDTO = {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
imageUrl: string;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
videos: VideoDTO[];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type CollectionsResource = {
|
|
41
|
+
list(): Promise<CollectionDTO[]>;
|
|
42
|
+
getById(_id: string): Promise<CollectionDTO>;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
interface SDKConfig {
|
|
46
|
+
baseUrl?: string;
|
|
47
|
+
apiKey: string;
|
|
48
|
+
clientId: string;
|
|
49
|
+
fetch?: FetchLike;
|
|
50
|
+
timeoutMs?: number;
|
|
51
|
+
}
|
|
52
|
+
declare class JaaqClient {
|
|
53
|
+
readonly videos: VideosResource;
|
|
54
|
+
readonly collections: CollectionsResource;
|
|
55
|
+
private constructor();
|
|
56
|
+
/**
|
|
57
|
+
* Public "friend" constructor that remains inside the class boundary.
|
|
58
|
+
* This method is callable from the module-level build function
|
|
59
|
+
* without exposing `new JaaqClient(...)` to consumers.
|
|
60
|
+
*/
|
|
61
|
+
static fromHttp(http: HttpClient): JaaqClient;
|
|
62
|
+
/**
|
|
63
|
+
* OO-friendly static initializer.
|
|
64
|
+
* Delegates to the single source of truth: `buildClient`.
|
|
65
|
+
*/
|
|
66
|
+
static init(config: SDKConfig): JaaqClient;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Configuration options for video player components
|
|
71
|
+
*/
|
|
72
|
+
type PlayerConfig = {
|
|
73
|
+
/** Video ID to load */
|
|
74
|
+
videoId: string;
|
|
75
|
+
/** API key for authentication (required if no client provided) */
|
|
76
|
+
apiKey?: string;
|
|
77
|
+
/** Client ID for authentication (required if no client provided) */
|
|
78
|
+
clientId?: string;
|
|
79
|
+
/** Existing JaaqClient instance to use instead of creating a new one */
|
|
80
|
+
client?: JaaqClient;
|
|
81
|
+
/** Custom API base URL */
|
|
82
|
+
baseUrl?: string;
|
|
83
|
+
/** Whether to automatically start playback when video loads */
|
|
84
|
+
autoplay?: boolean;
|
|
85
|
+
/** Whether to show player controls */
|
|
86
|
+
controls?: boolean;
|
|
87
|
+
/** CSS width of the player container */
|
|
88
|
+
width?: string;
|
|
89
|
+
/** CSS height of the player container */
|
|
90
|
+
height?: string;
|
|
91
|
+
/** Additional CSS class name(s) to apply to the player */
|
|
92
|
+
className?: string;
|
|
93
|
+
/** Whether to show the JAAQ logo */
|
|
94
|
+
showLogo?: boolean;
|
|
95
|
+
/** Whether to show the video title */
|
|
96
|
+
showTitle?: boolean;
|
|
97
|
+
/** Whether to show the author name */
|
|
98
|
+
showAuthor?: boolean;
|
|
99
|
+
/** Whether to show the description */
|
|
100
|
+
showDescription?: boolean;
|
|
101
|
+
/** Whether to show captions button */
|
|
102
|
+
showCaptions?: boolean;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Current state of the video player
|
|
106
|
+
*/
|
|
107
|
+
type PlayerState = {
|
|
108
|
+
/** Whether the video is currently playing */
|
|
109
|
+
isPlaying: boolean;
|
|
110
|
+
/** Current playback time in seconds */
|
|
111
|
+
currentTime: number;
|
|
112
|
+
/** Total video duration in seconds */
|
|
113
|
+
duration: number;
|
|
114
|
+
/** Current volume level (0-1) */
|
|
115
|
+
volume: number;
|
|
116
|
+
/** Whether the audio is muted */
|
|
117
|
+
isMuted: boolean;
|
|
118
|
+
/** Whether the player is in fullscreen mode */
|
|
119
|
+
isFullscreen: boolean;
|
|
120
|
+
/** Whether the video is currently loading */
|
|
121
|
+
isLoading: boolean;
|
|
122
|
+
/** Error message if an error occurred, null otherwise */
|
|
123
|
+
error: string | null;
|
|
124
|
+
/** Loaded video data, null if not yet loaded */
|
|
125
|
+
videoData: VideoDTO | null;
|
|
126
|
+
/** Whether captions are currently enabled */
|
|
127
|
+
captionsEnabled: boolean;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Map of player event names to their payload types
|
|
131
|
+
*/
|
|
132
|
+
type PlayerEventMap = {
|
|
133
|
+
/** Fired when playback starts */
|
|
134
|
+
play: void;
|
|
135
|
+
/** Fired when playback pauses */
|
|
136
|
+
pause: void;
|
|
137
|
+
/** Fired when playback time updates, provides current time in seconds */
|
|
138
|
+
timeupdate: number;
|
|
139
|
+
/** Fired when volume changes, provides new volume level (0-1) */
|
|
140
|
+
volumechange: number;
|
|
141
|
+
/** Fired when playback reaches the end */
|
|
142
|
+
ended: void;
|
|
143
|
+
/** Fired when an error occurs, provides Error object */
|
|
144
|
+
error: Error;
|
|
145
|
+
/** Fired when video metadata is loaded, provides VideoDTO */
|
|
146
|
+
loaded: VideoDTO;
|
|
147
|
+
/** Fired when fullscreen state changes, provides boolean fullscreen state */
|
|
148
|
+
fullscreenchange: boolean;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Event callback function type for player events
|
|
152
|
+
* @template T - The type of data passed to the callback
|
|
153
|
+
*/
|
|
154
|
+
type PlayerEventCallback<T> = (_data: T) => void;
|
|
155
|
+
|
|
156
|
+
declare class JaaqVideoPlayer {
|
|
157
|
+
private container;
|
|
158
|
+
private config;
|
|
159
|
+
private client;
|
|
160
|
+
private hls;
|
|
161
|
+
private videoElement;
|
|
162
|
+
private state;
|
|
163
|
+
private listeners;
|
|
164
|
+
private captionCues;
|
|
165
|
+
private elements;
|
|
166
|
+
/**
|
|
167
|
+
* Creates a new video player instance
|
|
168
|
+
* @param container - HTML element or CSS selector to render the player into
|
|
169
|
+
* @param config - Player configuration options
|
|
170
|
+
* @throws {Error} If container element is not found or if authentication credentials are missing
|
|
171
|
+
*/
|
|
172
|
+
constructor(container: HTMLElement | string, config: PlayerConfig);
|
|
173
|
+
private init;
|
|
174
|
+
private createDOM;
|
|
175
|
+
private updateControlsVisibility;
|
|
176
|
+
private loadVideo;
|
|
177
|
+
private parseWebVTT;
|
|
178
|
+
private updateOverlayContent;
|
|
179
|
+
private attachEventListeners;
|
|
180
|
+
private setState;
|
|
181
|
+
private updatePlayPauseButton;
|
|
182
|
+
private updateProgress;
|
|
183
|
+
private updateVolumeUI;
|
|
184
|
+
private updateCaptions;
|
|
185
|
+
private handleSeek;
|
|
186
|
+
private showError;
|
|
187
|
+
private togglePlayPause;
|
|
188
|
+
private toggleCaptions;
|
|
189
|
+
private updateCaptionsButton;
|
|
190
|
+
private toggleFullscreen;
|
|
191
|
+
/**
|
|
192
|
+
* Starts or resumes video playback
|
|
193
|
+
*/
|
|
194
|
+
play(): void;
|
|
195
|
+
/**
|
|
196
|
+
* Pauses video playback
|
|
197
|
+
*/
|
|
198
|
+
pause(): void;
|
|
199
|
+
/**
|
|
200
|
+
* Sets the playback volume
|
|
201
|
+
* @param volume - Volume level between 0 (silent) and 1 (maximum)
|
|
202
|
+
*/
|
|
203
|
+
setVolume(volume: number): void;
|
|
204
|
+
/**
|
|
205
|
+
* Toggles audio mute state
|
|
206
|
+
*/
|
|
207
|
+
toggleMute(): void;
|
|
208
|
+
/**
|
|
209
|
+
* Seeks to a specific time in the video
|
|
210
|
+
* @param time - Target time in seconds
|
|
211
|
+
*/
|
|
212
|
+
seek(time: number): void;
|
|
213
|
+
setFeatures(features: Partial<Pick<PlayerConfig, 'showLogo' | 'showTitle' | 'showAuthor' | 'showDescription' | 'showCaptions' | 'controls'>>): void;
|
|
214
|
+
/**
|
|
215
|
+
* Returns a copy of the current player state
|
|
216
|
+
* @returns Current player state object
|
|
217
|
+
*/
|
|
218
|
+
getState(): PlayerState;
|
|
219
|
+
/**
|
|
220
|
+
* Registers an event listener for player events
|
|
221
|
+
* @param event - Event name to listen for
|
|
222
|
+
* @param callback - Function to call when event fires
|
|
223
|
+
*/
|
|
224
|
+
on<K extends keyof PlayerEventMap>(event: K, callback: PlayerEventCallback<PlayerEventMap[K]>): void;
|
|
225
|
+
/**
|
|
226
|
+
* Removes an event listener for player events
|
|
227
|
+
* @param event - Event name to stop listening for
|
|
228
|
+
* @param callback - Function to remove from listeners
|
|
229
|
+
*/
|
|
230
|
+
off<K extends keyof PlayerEventMap>(event: K, callback: PlayerEventCallback<PlayerEventMap[K]>): void;
|
|
231
|
+
private emit;
|
|
232
|
+
/**
|
|
233
|
+
* Destroys the player instance and cleans up resources
|
|
234
|
+
* Removes all event listeners, stops playback, and clears the DOM
|
|
235
|
+
*/
|
|
236
|
+
destroy(): void;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
type CollectionPlayerConfig = {
|
|
240
|
+
collectionId: string;
|
|
241
|
+
client?: JaaqClient;
|
|
242
|
+
apiKey?: string;
|
|
243
|
+
clientId?: string;
|
|
244
|
+
baseUrl?: string;
|
|
245
|
+
autoplay?: boolean;
|
|
246
|
+
showArrows?: boolean;
|
|
247
|
+
showDots?: boolean;
|
|
248
|
+
className?: string;
|
|
249
|
+
};
|
|
250
|
+
type CollectionPlayerEventMap = {
|
|
251
|
+
loaded: CollectionDTO;
|
|
252
|
+
slidechange: {
|
|
253
|
+
index: number;
|
|
254
|
+
video: VideoDTO;
|
|
255
|
+
};
|
|
256
|
+
error: Error;
|
|
257
|
+
};
|
|
258
|
+
type CollectionPlayerEventCallback<T> = (_data: T) => void;
|
|
259
|
+
declare class JaaqCollectionPlayer {
|
|
260
|
+
private container;
|
|
261
|
+
private config;
|
|
262
|
+
private client;
|
|
263
|
+
private splide;
|
|
264
|
+
private playerElement;
|
|
265
|
+
private carouselElement;
|
|
266
|
+
private collectionData;
|
|
267
|
+
private autoplayTimeoutId;
|
|
268
|
+
private listeners;
|
|
269
|
+
constructor(container: HTMLElement | string, config: CollectionPlayerConfig);
|
|
270
|
+
private init;
|
|
271
|
+
private render;
|
|
272
|
+
private initCarousel;
|
|
273
|
+
private showLoading;
|
|
274
|
+
private renderCarousel;
|
|
275
|
+
private initSplide;
|
|
276
|
+
private handleSlideChange;
|
|
277
|
+
private destroyCarousel;
|
|
278
|
+
private emitError;
|
|
279
|
+
on<K extends keyof CollectionPlayerEventMap>(event: K, callback: CollectionPlayerEventCallback<CollectionPlayerEventMap[K]>): void;
|
|
280
|
+
off<K extends keyof CollectionPlayerEventMap>(event: K, callback: CollectionPlayerEventCallback<CollectionPlayerEventMap[K]>): void;
|
|
281
|
+
private emit;
|
|
282
|
+
refresh(): void;
|
|
283
|
+
next(): void;
|
|
284
|
+
prev(): void;
|
|
285
|
+
go(index: number): void;
|
|
286
|
+
destroy(): void;
|
|
287
|
+
getCollection(): CollectionDTO | null;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Initializes all video players with data-jaaq-player attribute
|
|
292
|
+
* @param rootElement - Root element to search for players (defaults to document)
|
|
293
|
+
*/
|
|
294
|
+
declare function initializePlayers(rootElement?: Document | Element): void;
|
|
295
|
+
/**
|
|
296
|
+
* Retrieves a player instance for a given element or selector
|
|
297
|
+
* @param elementOrSelector - DOM element or CSS selector
|
|
298
|
+
* @returns Player instance or null if not found
|
|
299
|
+
*/
|
|
300
|
+
declare function getPlayer(elementOrSelector: Element | string): JaaqVideoPlayer | null;
|
|
301
|
+
/**
|
|
302
|
+
* Destroys all initialized player instances and cleans up resources
|
|
303
|
+
*/
|
|
304
|
+
declare function destroyAll(): void;
|
|
305
|
+
/**
|
|
306
|
+
* Auto-initialization API for declarative video player setup
|
|
307
|
+
* Automatically finds and initializes players marked with [data-jaaq-player]
|
|
308
|
+
* @example
|
|
309
|
+
* // Auto-initialization on page load
|
|
310
|
+
* <div data-jaaq-player data-api-key="key" data-client-id="id" data-video-id="video"></div>
|
|
311
|
+
*
|
|
312
|
+
* // Manual initialization
|
|
313
|
+
* JaaqPlayer.init();
|
|
314
|
+
*
|
|
315
|
+
* // Get player instance
|
|
316
|
+
* const player = JaaqPlayer.getPlayer('[data-video-id="video"]');
|
|
317
|
+
* player.on('play', () => console.log('Playing'));
|
|
318
|
+
*/
|
|
319
|
+
declare const JaaqPlayer: {
|
|
320
|
+
/** Initialize all players with [data-jaaq-player] attribute */
|
|
321
|
+
init: typeof initializePlayers;
|
|
322
|
+
/** Get player instance by element or selector */
|
|
323
|
+
getPlayer: typeof getPlayer;
|
|
324
|
+
/** Destroy all initialized players */
|
|
325
|
+
destroyAll: typeof destroyAll;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Custom web component for JAAQ video player with Shadow DOM encapsulation
|
|
330
|
+
* Provides a framework-agnostic video player with custom controls and HLS support
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* // Declarative usage
|
|
334
|
+
* <jaaq-video-player
|
|
335
|
+
* video-id="video-123"
|
|
336
|
+
* api-key="key"
|
|
337
|
+
* client-id="client"
|
|
338
|
+
* autoplay="false">
|
|
339
|
+
* </jaaq-video-player>
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* // Programmatic usage
|
|
343
|
+
* const player = document.createElement('jaaq-video-player');
|
|
344
|
+
* player.setAttribute('video-id', 'video-123');
|
|
345
|
+
* player.addEventListener('jaaq:play', () => console.log('Playing'));
|
|
346
|
+
* document.body.appendChild(player);
|
|
347
|
+
*/
|
|
348
|
+
declare class JaaqVideoPlayerElement extends HTMLElement {
|
|
349
|
+
private player;
|
|
350
|
+
private container;
|
|
351
|
+
private clientInstance;
|
|
352
|
+
private connected;
|
|
353
|
+
static get observedAttributes(): string[];
|
|
354
|
+
constructor();
|
|
355
|
+
connectedCallback(): void;
|
|
356
|
+
disconnectedCallback(): void;
|
|
357
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
358
|
+
private render;
|
|
359
|
+
private updateContainerStyles;
|
|
360
|
+
private initPlayer;
|
|
361
|
+
private attachPlayerEvents;
|
|
362
|
+
private emitError;
|
|
363
|
+
private destroyPlayer;
|
|
364
|
+
/**
|
|
365
|
+
* Gets the current JaaqClient instance
|
|
366
|
+
*/
|
|
367
|
+
get client(): JaaqClient | null;
|
|
368
|
+
/**
|
|
369
|
+
* Sets a JaaqClient instance for the player to use
|
|
370
|
+
* Reinitializes the player if already connected
|
|
371
|
+
*/
|
|
372
|
+
set client(value: JaaqClient | null);
|
|
373
|
+
/**
|
|
374
|
+
* Gets the current video ID
|
|
375
|
+
*/
|
|
376
|
+
get videoId(): string | null;
|
|
377
|
+
/**
|
|
378
|
+
* Sets the video ID
|
|
379
|
+
* Updates the video-id attribute and triggers player reinitialization
|
|
380
|
+
*/
|
|
381
|
+
set videoId(value: string | null);
|
|
382
|
+
/**
|
|
383
|
+
* Starts or resumes video playback
|
|
384
|
+
*/
|
|
385
|
+
play(): void;
|
|
386
|
+
/**
|
|
387
|
+
* Pauses video playback
|
|
388
|
+
*/
|
|
389
|
+
pause(): void;
|
|
390
|
+
/**
|
|
391
|
+
* Sets the playback volume
|
|
392
|
+
* @param volume - Volume level between 0 (silent) and 1 (maximum)
|
|
393
|
+
*/
|
|
394
|
+
setVolume(volume: number): void;
|
|
395
|
+
/**
|
|
396
|
+
* Toggles audio mute state
|
|
397
|
+
*/
|
|
398
|
+
toggleMute(): void;
|
|
399
|
+
/**
|
|
400
|
+
* Seeks to a specific time in the video
|
|
401
|
+
* @param time - Target time in seconds
|
|
402
|
+
*/
|
|
403
|
+
seek(time: number): void;
|
|
404
|
+
/**
|
|
405
|
+
* Returns the current player state
|
|
406
|
+
* @returns Current player state object or null if player not initialized
|
|
407
|
+
*/
|
|
408
|
+
getState(): PlayerState | null;
|
|
409
|
+
/**
|
|
410
|
+
* Destroys the player instance and cleans up resources
|
|
411
|
+
*/
|
|
412
|
+
destroy(): void;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
declare class JaaqCollectionPlayerElement extends HTMLElement {
|
|
416
|
+
private splide;
|
|
417
|
+
private container;
|
|
418
|
+
private carouselElement;
|
|
419
|
+
private clientInstance;
|
|
420
|
+
private connected;
|
|
421
|
+
private collectionData;
|
|
422
|
+
private autoplayTimeoutId;
|
|
423
|
+
static get observedAttributes(): string[];
|
|
424
|
+
constructor();
|
|
425
|
+
connectedCallback(): void;
|
|
426
|
+
disconnectedCallback(): void;
|
|
427
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
428
|
+
private getBooleanAttr;
|
|
429
|
+
private render;
|
|
430
|
+
private initCarousel;
|
|
431
|
+
private showLoading;
|
|
432
|
+
private renderCarousel;
|
|
433
|
+
private initSplide;
|
|
434
|
+
private handleSlideChange;
|
|
435
|
+
private destroyCarousel;
|
|
436
|
+
private emitError;
|
|
437
|
+
get client(): JaaqClient | null;
|
|
438
|
+
set client(value: JaaqClient | null);
|
|
439
|
+
get collectionId(): string | null;
|
|
440
|
+
set collectionId(value: string | null);
|
|
441
|
+
refresh(): void;
|
|
442
|
+
next(): void;
|
|
443
|
+
prev(): void;
|
|
444
|
+
go(index: number): void;
|
|
445
|
+
destroy(): void;
|
|
446
|
+
getCollection(): CollectionDTO | null;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Registers JAAQ custom elements (<jaaq-video-player> and <jaaq-collection-player>)
|
|
451
|
+
* Safe to call multiple times - only registers if not already registered
|
|
452
|
+
*
|
|
453
|
+
* @example
|
|
454
|
+
* import { registerJaaqComponents } from '@jaaq/jaaq-sdk-js/ui/webcomponents';
|
|
455
|
+
* registerJaaqComponents();
|
|
456
|
+
*/
|
|
457
|
+
declare function registerJaaqComponents(): void;
|
|
458
|
+
/**
|
|
459
|
+
* Checks if the JAAQ web components are already registered
|
|
460
|
+
* @returns True if components are registered, false otherwise
|
|
461
|
+
*/
|
|
462
|
+
declare function isRegistered(): boolean;
|
|
463
|
+
|
|
464
|
+
export { JaaqCollectionPlayer, JaaqCollectionPlayerElement, JaaqPlayer, JaaqVideoPlayer, JaaqVideoPlayerElement, isRegistered, registerJaaqComponents };
|
|
465
|
+
export type { PlayerConfig, PlayerEventMap, PlayerState };
|