@reveldigital/player-client 1.0.15 → 2.0.2

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 (58) hide show
  1. package/README.md +236 -236
  2. package/esm2022/lib/app-init.service.mjs +113 -0
  3. package/esm2022/lib/interfaces/client.interface.mjs +2 -0
  4. package/esm2022/lib/interfaces/command.interface.mjs +2 -0
  5. package/esm2022/lib/interfaces/config.interface.mjs +50 -0
  6. package/esm2022/lib/interfaces/device.interface.mjs +2 -0
  7. package/esm2022/lib/interfaces/event-properties.interface.mjs +2 -0
  8. package/esm2022/lib/interfaces/location.interface.mjs +2 -0
  9. package/esm2022/lib/player-client.module.mjs +71 -0
  10. package/esm2022/lib/player-client.service.mjs +928 -0
  11. package/esm2022/lib/safe-style.pipe.mjs +41 -0
  12. package/{esm2020 → esm2022}/lib/version.mjs +3 -3
  13. package/{esm2020 → esm2022}/public-api.mjs +6 -6
  14. package/{esm2020 → esm2022}/reveldigital-player-client.mjs +4 -4
  15. package/{fesm2020 → fesm2022}/reveldigital-player-client.mjs +1132 -1134
  16. package/fesm2022/reveldigital-player-client.mjs.map +1 -0
  17. package/{reveldigital-player-client.d.ts → index.d.ts} +5 -5
  18. package/lib/app-init.service.d.ts +18 -18
  19. package/lib/app-init.service.d.ts.map +1 -1
  20. package/lib/interfaces/client.interface.d.ts +406 -406
  21. package/lib/interfaces/command.interface.d.ts +78 -78
  22. package/lib/interfaces/config.interface.d.ts +151 -151
  23. package/lib/interfaces/device.interface.d.ts +139 -139
  24. package/lib/interfaces/event-properties.interface.d.ts +134 -134
  25. package/lib/interfaces/location.interface.d.ts +187 -187
  26. package/lib/player-client.module.d.ts +9 -9
  27. package/lib/player-client.service.d.ts +640 -640
  28. package/lib/safe-style.pipe.d.ts +23 -23
  29. package/lib/safe-style.pipe.d.ts.map +1 -1
  30. package/lib/version.d.ts +1 -1
  31. package/lib/version.d.ts.map +1 -1
  32. package/package.json +12 -18
  33. package/public-api.d.ts +3 -3
  34. package/schematics/collection.json +15 -15
  35. package/schematics/ng-add/assets/gadget.yaml +54 -54
  36. package/schematics/ng-add/index.d.ts +18 -4
  37. package/schematics/ng-add/index.js +391 -287
  38. package/schematics/ng-add/index.js.map +1 -1
  39. package/schematics/ng-add/schema.d.ts +4 -4
  40. package/schematics/ng-add/schema.js +2 -2
  41. package/schematics/ng-add/schema.json +23 -23
  42. package/schematics/ng-add/templates/index.html +30 -30
  43. package/schematics/ng-add/templates/polyfills.ts +72 -72
  44. package/schematics/ng-add/utils/changeBasePath.js +19 -19
  45. package/schematics/ng-add/utils/yml2xml.js +132 -132
  46. package/esm2020/lib/app-init.service.mjs +0 -110
  47. package/esm2020/lib/interfaces/client.interface.mjs +0 -2
  48. package/esm2020/lib/interfaces/command.interface.mjs +0 -2
  49. package/esm2020/lib/interfaces/config.interface.mjs +0 -50
  50. package/esm2020/lib/interfaces/device.interface.mjs +0 -2
  51. package/esm2020/lib/interfaces/event-properties.interface.mjs +0 -2
  52. package/esm2020/lib/interfaces/location.interface.mjs +0 -2
  53. package/esm2020/lib/player-client.module.mjs +0 -73
  54. package/esm2020/lib/player-client.service.mjs +0 -928
  55. package/esm2020/lib/safe-style.pipe.mjs +0 -40
  56. package/fesm2015/reveldigital-player-client.mjs +0 -1219
  57. package/fesm2015/reveldigital-player-client.mjs.map +0 -1
  58. package/fesm2020/reveldigital-player-client.mjs.map +0 -1
@@ -1,1219 +0,0 @@
1
- import { __awaiter } from 'tslib';
2
- import * as i0 from '@angular/core';
3
- import { Injectable, enableProdMode, isDevMode, Pipe, NgModule, APP_INITIALIZER, LOCALE_ID } from '@angular/core';
4
- import { Subject, BehaviorSubject, fromEvent } from 'rxjs';
5
- import { share, tap, map, filter } from 'rxjs/operators';
6
- import * as yaml from 'js-yaml';
7
- import * as WebFont from 'webfontloader';
8
- import * as i1 from '@angular/common/http';
9
- import { HttpClientModule } from '@angular/common/http';
10
- import * as i2 from '@angular/router';
11
- import { RouterModule } from '@angular/router';
12
- import { APP_BASE_HREF } from '@angular/common';
13
- import * as i1$1 from '@angular/platform-browser';
14
-
15
- // Generated by genversion.
16
- const version = '1.0.15';
17
-
18
- /**
19
- * Service for interacting with the Revel Digital player client.
20
- *
21
- * This service provides a comprehensive interface for gadgets and web applications
22
- * to communicate with the Revel Digital player environment. It handles device
23
- * information, commands, events, analytics tracking, and configuration management.
24
- *
25
- * The service supports both direct API calls and event-based communication patterns,
26
- * allowing gadgets to respond to player lifecycle events (start, stop, commands) and
27
- * send data back to the player or remote devices.
28
- *
29
- * ```typescript
30
- * constructor(private client: PlayerClientService) {
31
- * // Subscribe to player events
32
- * this.client.onStart$.subscribe(() => {
33
- * console.log('Gadget started');
34
- * });
35
- *
36
- * this.client.onCommand$.subscribe(command => {
37
- * console.log('Received command:', command);
38
- * });
39
- * }
40
- *
41
- * async ngOnInit() {
42
- * // Get device information
43
- * const device = await this.client.getDevice();
44
- * const deviceTime = await this.client.getDeviceTime();
45
- *
46
- * // Track analytics
47
- * this.client.track('gadget_loaded', { version: '1.0' });
48
- * }
49
- * ```
50
- *
51
- * @since 1.0.0
52
- */
53
- class PlayerClientService {
54
- /** @ignore */
55
- constructor(zone) {
56
- /**
57
- * Observable stream of commands sent to this player from the Revel Digital platform.
58
- * Subscribe to this to handle custom commands sent from templates, playlists, or remote devices.
59
- *
60
- * ```typescript
61
- * this.client.onCommand$.subscribe(command => {
62
- * if (command.name === 'customAction') {
63
- * this.handleCustomAction(command.arg);
64
- * }
65
- * });
66
- * ```
67
- */
68
- this.onCommand$ = new Subject();
69
- /**
70
- * Observable that signals when the gadget has been loaded and is ready to start.
71
- * Emits `true` when ready, `false` when destroyed.
72
- *
73
- * ```typescript
74
- * this.client.onReady$.subscribe(isReady => {
75
- * if (isReady) {
76
- * console.log('Client is ready');
77
- * this.initializeGadget();
78
- * }
79
- * });
80
- * ```
81
- */
82
- this.onReady$ = new BehaviorSubject(false);
83
- /**
84
- * Observable that signals when the gadget has been started by the player.
85
- * This event occurs when the player begins execution of the gadget content.
86
- *
87
- * ```typescript
88
- * this.client.onStart$.subscribe(() => {
89
- * console.log('Gadget started');
90
- * this.startAnimation();
91
- * });
92
- * ```
93
- */
94
- this.onStart$ = new Subject();
95
- /**
96
- * Observable that signals when the gadget has been stopped by the player.
97
- * This event occurs when the player stops execution, typically when moving
98
- * to the next item in a playlist or when the content duration expires.
99
- *
100
- * ```typescript
101
- * this.client.onStop$.subscribe(() => {
102
- * console.log('Gadget stopped');
103
- * this.cleanup();
104
- * });
105
- * ```
106
- */
107
- this.onStop$ = new Subject();
108
- /**
109
- * Observable that signals when the gadget should open the configuration window.
110
- * This allows gadgets to respond to configuration requests from the player.
111
- *
112
- * ```typescript
113
- * this.client.onConfig$.subscribe(() => {
114
- * this.openConfigurationDialog();
115
- * });
116
- * ```
117
- */
118
- this.onConfig$ = new Subject();
119
- /**
120
- * Observable that signals when the gadget has received a postMessage event from the player.
121
- * This handles communication between the gadget and player via the postMessage API.
122
- *
123
- * ```typescript
124
- * this.client.onPostMessage$.subscribe(message => {
125
- * console.log('Received message:', message);
126
- * this.handlePlayerMessage(message);
127
- * });
128
- * ```
129
- */
130
- this.onPostMessage$ = new Subject();
131
- /** @ignore */
132
- this.onStartEvt$ = fromEvent(window, 'RevelDigital.Start').pipe(share(), tap(this.onStart$));
133
- /** @ignore */
134
- this.onStopEvt$ = fromEvent(window, 'RevelDigital.Stop').pipe(share(), tap(this.onStop$));
135
- /** @ignore */
136
- this.onCommandEvt$ = fromEvent(window, 'RevelDigital.Command').pipe(map((e) => { return { name: e.detail.name, arg: e.detail.arg }; }), share(), tap(this.onCommand$));
137
- this.onPostMessageEvt$ = fromEvent(window, 'message').pipe(filter((messageEvent) =>
138
- //messageEvent.source !== window.parent &&
139
- typeof messageEvent.data === 'string'), map((e) => JSON.parse(e.data)), share(), tap((e) => {
140
- if (e.type === 'applyConfig' && e.isOpener) {
141
- e.isOpener = false;
142
- // propagate config to iframe parent from the popup window
143
- window.parent.postMessage(JSON.stringify(e), '*');
144
- }
145
- else if (e.type === 'openConfig') {
146
- this.onConfig$.next(null);
147
- }
148
- }), tap(e => this.onPostMessage$.next(e)));
149
- let self = this;
150
- window.RevelDigital = {
151
- Controller: {
152
- onCommand: function (name, arg) {
153
- zone.run(() => {
154
- self.onCommand$.next({ name: name, arg: arg });
155
- });
156
- },
157
- onStart: function () {
158
- zone.run(() => {
159
- self.onStart$.next(null);
160
- });
161
- },
162
- onStop: function () {
163
- zone.run(() => {
164
- self.onStop$.next(null);
165
- });
166
- }
167
- }
168
- };
169
- this.onStartSub = this.onStartEvt$.subscribe(() => { });
170
- this.onStopSub = this.onStopEvt$.subscribe(() => { });
171
- this.onCommandSub = this.onCommandEvt$.subscribe(() => { });
172
- //this.onConfigSub = this.onConfigEvt$.subscribe(() => { });
173
- this.onPostMessageSub = this.onPostMessageEvt$.subscribe(() => { });
174
- this.clientPromise = null;
175
- this.onReady$.next(true);
176
- }
177
- /** @ignore */
178
- ngOnDestroy() {
179
- var _a, _b, _c, _d;
180
- (_a = this.onStartSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
181
- (_b = this.onStopSub) === null || _b === void 0 ? void 0 : _b.unsubscribe();
182
- (_c = this.onCommandSub) === null || _c === void 0 ? void 0 : _c.unsubscribe();
183
- //this.onConfigSub?.unsubscribe();
184
- (_d = this.onPostMessageSub) === null || _d === void 0 ? void 0 : _d.unsubscribe();
185
- this.onReady$.next(false);
186
- }
187
- /** @ignore */
188
- static init(data) {
189
- console.log('%c⚙️ Initializing Revel Digital client library', 'background-color:blue; color:yellow;');
190
- }
191
- /**
192
- * Sends a callback to player scripting with variable arguments.
193
- *
194
- * This method allows the gadget to communicate with player scripting.
195
- * If the appropriate scripting is in place in the currently running template,
196
- * calling this method will initiate a callback which can be acted upon in player script.
197
- *
198
- * @param args - Variable number of arguments to pass to the callback (max 5 arguments)
199
- *
200
- * ```typescript
201
- * // Send a simple callback
202
- * this.client.callback('test', 'data');
203
- *
204
- * // Send multiple parameters
205
- * this.client.callback('action', 'value1', 'value2', { data: 'object' });
206
- * ```
207
- */
208
- callback(...args) {
209
- this.getClient().then((client) => {
210
- switch (args.length) {
211
- case 0:
212
- client.callback();
213
- break;
214
- case 1:
215
- client.callback(args[0]);
216
- break;
217
- case 2:
218
- client.callback(args[1]);
219
- break;
220
- case 3:
221
- client.callback(args[2]);
222
- break;
223
- case 4:
224
- client.callback(args[3]);
225
- break;
226
- case 5:
227
- client.callback(args[4]);
228
- break;
229
- }
230
- });
231
- }
232
- /**
233
- * Gets the user preferences interface exposed by the Google Gadgets API.
234
- *
235
- * This method provides access to gadget preferences which can be configured
236
- * in the Revel Digital CMS. Use this to retrieve user-configurable settings
237
- * for your gadget.
238
- *
239
- * @returns The Gadgets API Prefs object for accessing preference values
240
- *
241
- * ```typescript
242
- * constructor(public client: PlayerClientService) {
243
- * const prefs = client.getPrefs();
244
- * const myString = prefs.getString('myStringPref');
245
- * const myNumber = prefs.getInt('myNumberPref');
246
- * const myBool = prefs.getBool('myBoolPref');
247
- * }
248
- * ```
249
- *
250
- * @see {@link https://developers.google.com/gadgets/docs/basic} Google Gadgets API documentation
251
- */
252
- getPrefs() {
253
- return new window['gadgets']['Prefs']();
254
- }
255
- /**
256
- * Gets the current device time in ISO8601 format.
257
- *
258
- * Current device time is determined by the device timezone assigned to the device in the CMS.
259
- * This is useful for displaying time-sensitive content or scheduling operations based on
260
- * the device's local time rather than browser time.
261
- *
262
- * @param date - Optional. If supplied, will translate the supplied date/time to device time based on respective timezones
263
- * @returns Promise resolving to date/time in ISO8601 format
264
- *
265
- * ```typescript
266
- * // Get current device time
267
- * const currentTime = await this.client.getDeviceTime();
268
- * console.log('Device time:', currentTime);
269
- *
270
- * // Convert a specific date to device time
271
- * const specificDate = new Date('2023-01-01T12:00:00Z');
272
- * const deviceTime = await this.client.getDeviceTime(specificDate);
273
- * ```
274
- */
275
- getDeviceTime(date) {
276
- return __awaiter(this, void 0, void 0, function* () {
277
- const client = yield this.getClient();
278
- if (date !== undefined) {
279
- return client.getDeviceTime(date);
280
- }
281
- return client.getDeviceTime();
282
- });
283
- }
284
- /**
285
- * Gets the timezone name currently assigned to the device.
286
- *
287
- * @returns Promise resolving to the timezone name (e.g., "America/New_York")
288
- *
289
- * ```typescript
290
- * const timezoneName = await this.client.getDeviceTimeZoneName();
291
- * console.log('Device timezone:', timezoneName);
292
- * ```
293
- */
294
- getDeviceTimeZoneName() {
295
- return __awaiter(this, void 0, void 0, function* () {
296
- const client = yield this.getClient();
297
- return client.getDeviceTimeZoneName();
298
- });
299
- }
300
- /**
301
- * Gets the timezone ID currently assigned to the device.
302
- *
303
- * @returns Promise resolving to the timezone ID
304
- *
305
- * ```typescript
306
- * const timezoneId = await this.client.getDeviceTimeZoneID();
307
- * console.log('Device timezone ID:', timezoneId);
308
- * ```
309
- */
310
- getDeviceTimeZoneID() {
311
- return __awaiter(this, void 0, void 0, function* () {
312
- const client = yield this.getClient();
313
- return client.getDeviceTimeZoneID();
314
- });
315
- }
316
- /**
317
- * Gets the numerical offset from GMT of the timezone currently assigned to the device.
318
- *
319
- * @returns Promise resolving to the timezone offset in hours (e.g., -5 for EST)
320
- *
321
- * ```typescript
322
- * const offset = await this.client.getDeviceTimeZoneOffset();
323
- * console.log('Device timezone offset:', offset, 'hours from GMT');
324
- * ```
325
- */
326
- getDeviceTimeZoneOffset() {
327
- return __awaiter(this, void 0, void 0, function* () {
328
- const client = yield this.getClient();
329
- return client.getDeviceTimeZoneOffset();
330
- });
331
- }
332
- /**
333
- * Gets the language code of the language currently assigned to the device.
334
- *
335
- * @returns Promise resolving to the language code (e.g., "en-US", "fr-FR")
336
- *
337
- * ```typescript
338
- * const languageCode = await this.client.getLanguageCode();
339
- * console.log('Device language:', languageCode);
340
- * // Use for localization
341
- * this.loadLanguageResources(languageCode);
342
- * ```
343
- */
344
- getLanguageCode() {
345
- return __awaiter(this, void 0, void 0, function* () {
346
- const client = yield this.getClient();
347
- return client.getLanguageCode();
348
- });
349
- }
350
- /**
351
- * Gets the unique Revel Digital device key associated with the device.
352
- *
353
- * The device key is a unique identifier for this specific player device
354
- * and can be used for device-specific operations or remote commands.
355
- *
356
- * @returns Promise resolving to the device key string
357
- *
358
- * ```typescript
359
- * const deviceKey = await this.client.getDeviceKey();
360
- * console.log('Device key:', deviceKey);
361
- * ```
362
- */
363
- getDeviceKey() {
364
- return __awaiter(this, void 0, void 0, function* () {
365
- const client = yield this.getClient();
366
- return client.getDeviceKey();
367
- });
368
- }
369
- /**
370
- * Sends a command to the local player device.
371
- *
372
- * Commands can be used to control various aspects of the player or trigger
373
- * specific behaviors. The command is processed by the local player only.
374
- *
375
- * @param name - The command name/identifier
376
- * @param arg - The command argument/payload
377
- *
378
- * ```typescript
379
- * // Send a simple command
380
- * this.client.sendCommand('refresh', '');
381
- *
382
- * // Send a command with data
383
- * this.client.sendCommand('setVolume', '50');
384
- *
385
- * // Send a command with JSON data
386
- * this.client.sendCommand('configure', JSON.stringify({ setting: 'value' }));
387
- * ```
388
- */
389
- sendCommand(name, arg) {
390
- this.getClient().then((client) => {
391
- client.sendCommand(name, arg);
392
- });
393
- }
394
- /**
395
- * Sends a command to remote player devices with the specified device keys.
396
- *
397
- * Remote commands allow cross-device communication within the same Revel Digital account.
398
- * This is useful for synchronized displays, device coordination, or remote control scenarios.
399
- *
400
- * Note: Remote commands can only be delivered to devices within the same account as the sender device.
401
- *
402
- * @param deviceKeys - Array of target device keys to send the command to
403
- * @param name - The command name/identifier
404
- * @param arg - The command argument/payload
405
- *
406
- * ```typescript
407
- * // Send command to specific devices
408
- * const targetDevices = ['device-key-1', 'device-key-2'];
409
- * this.client.sendRemoteCommand(targetDevices, 'syncAction', 'start');
410
- *
411
- * // Broadcast to multiple devices
412
- * this.client.sendRemoteCommand(
413
- * ['lobby-display', 'kiosk-1', 'kiosk-2'],
414
- * 'updateContent',
415
- * JSON.stringify({ contentId: '12345' })
416
- * );
417
- * ```
418
- */
419
- sendRemoteCommand(deviceKeys, name, arg) {
420
- this.getClient().then((client) => {
421
- client.sendRemoteCommand(deviceKeys, name, arg);
422
- });
423
- }
424
- /**
425
- * Logs an analytics event for use with AdHawk analytics and reporting.
426
- *
427
- * Events are used for tracking various metrics including usage statistics,
428
- * player condition, state changes, user interactions, and custom business metrics.
429
- * These events can be viewed in the Revel Digital analytics dashboard.
430
- *
431
- * @param eventName - Unique name for this event (should be descriptive and consistent)
432
- * @param properties - Optional map of user-defined properties to associate with this event
433
- *
434
- * ```typescript
435
- * // Simple event tracking
436
- * this.client.track('gadget_loaded');
437
- *
438
- * // Event with properties
439
- * this.client.track('user_interaction', {
440
- * action: 'button_click',
441
- * button_id: 'start_button',
442
- * timestamp: new Date().toISOString()
443
- * });
444
- *
445
- * // Performance tracking
446
- * this.client.track('content_displayed', {
447
- * content_type: 'video',
448
- * duration: 30,
449
- * quality: 'HD'
450
- * });
451
- * ```
452
- */
453
- track(eventName, properties) {
454
- this.getClient().then((client) => {
455
- client.track(eventName, JSON.stringify(properties));
456
- });
457
- }
458
- /**
459
- * Initiates a timed event for duration tracking.
460
- *
461
- * Timed events are useful for tracking the duration of operations or user interactions.
462
- * This method must be followed by a call to track() with the same event name to complete
463
- * the timing measurement. The duration will be automatically calculated and included
464
- * in the event properties.
465
- *
466
- * @param eventName - Unique name for this timed event (must match the subsequent track() call)
467
- *
468
- * ```typescript
469
- * // Start timing an event
470
- * this.client.timeEvent('video_playback');
471
- *
472
- * // ... video plays for some duration ...
473
- *
474
- * // End timing and log the event with duration
475
- * this.client.track('video_playback', {
476
- * video_id: 'abc123',
477
- * quality: 'HD'
478
- * }); // Duration will be automatically added
479
- *
480
- * // Example for user interaction timing
481
- * this.client.timeEvent('form_completion');
482
- * // ... user fills out form ...
483
- * this.client.track('form_completion', { form_type: 'contact' });
484
- * ```
485
- */
486
- timeEvent(eventName) {
487
- this.getClient().then((client) => {
488
- client.timeEvent(eventName);
489
- });
490
- }
491
- /**
492
- * Creates a new analytics event session for grouping related events.
493
- *
494
- * A session is a way of grouping events together for analysis. Each event tracked
495
- * after calling this method will have the same session ID until a new session is created.
496
- * Session IDs are randomly generated unless explicitly provided.
497
- *
498
- * This is useful for tracking user journeys, workflow completion, or grouping
499
- * related interactions within a specific time period.
500
- *
501
- * @param id - Optional user-supplied session ID. If not provided, a random session ID will be generated
502
- *
503
- * ```typescript
504
- * // Start a new session with auto-generated ID
505
- * this.client.newEventSession();
506
- * this.client.track('session_start');
507
- * this.client.track('user_action_1');
508
- * this.client.track('user_action_2');
509
- *
510
- * // Start a session with custom ID
511
- * this.client.newEventSession('user-workflow-12345');
512
- * this.client.track('workflow_start');
513
- * this.client.track('step_completed', { step: 1 });
514
- *
515
- * // Start a new session for different workflow
516
- * this.client.newEventSession();
517
- * this.client.track('different_workflow_start');
518
- * ```
519
- */
520
- newEventSession(id) {
521
- this.getClient().then((client) => {
522
- if (id !== undefined) {
523
- client.newEventSession();
524
- }
525
- else {
526
- client.newEventSession(id);
527
- }
528
- });
529
- }
530
- /**
531
- * Gets the root folder path utilized by this player device.
532
- *
533
- * This returns the base directory path where the Revel Digital player
534
- * stores its files and resources on the local device.
535
- *
536
- * @returns Promise resolving to the path of the root folder
537
- *
538
- * ```typescript
539
- * const rootPath = await this.client.getRevelRoot();
540
- * console.log('Player root directory:', rootPath);
541
- * // Use for constructing file paths or understanding storage structure
542
- * ```
543
- */
544
- getRevelRoot() {
545
- return __awaiter(this, void 0, void 0, function* () {
546
- const client = yield this.getClient();
547
- return client.getRevelRoot();
548
- });
549
- }
550
- /**
551
- * Gets a map of commands currently active for this device.
552
- *
553
- * This returns the current command configuration that defines how the device
554
- * responds to various command triggers and remote commands.
555
- *
556
- * @returns Promise resolving to a map of currently active commands
557
- *
558
- * ```typescript
559
- * const commandMap = await this.client.getCommandMap();
560
- * console.log('Active commands:', commandMap);
561
- *
562
- * // Check if specific command is available
563
- * if (commandMap['customCommand']) {
564
- * console.log('Custom command is available');
565
- * }
566
- * ```
567
- */
568
- getCommandMap() {
569
- return __awaiter(this, void 0, void 0, function* () {
570
- const client = yield this.getClient();
571
- return JSON.parse(yield client.getCommandMap());
572
- });
573
- }
574
- /**
575
- * Signals to the player that this gadget has completed its visualization.
576
- *
577
- * This method notifies the player that the current gadget has finished its
578
- * content display or interaction cycle. The player can then proceed with
579
- * the next item in a playlist if applicable, or handle the completion
580
- * according to its configuration.
581
- *
582
- * Call this method when your gadget has completed its intended function,
583
- * such as finishing an animation, completing a form, or reaching a natural
584
- * stopping point.
585
- *
586
- * ```typescript
587
- * // After completing an animation
588
- * private onAnimationComplete(): void {
589
- * this.client.finish();
590
- * }
591
- *
592
- * // After user interaction is complete
593
- * private onFormSubmitted(): void {
594
- * this.saveFormData();
595
- * this.client.finish();
596
- * }
597
- *
598
- * // After a timed display period
599
- * setTimeout(() => {
600
- * this.client.finish();
601
- * }, 30000); // 30 seconds
602
- * ```
603
- */
604
- finish() {
605
- this.getClient().then((client) => {
606
- client.finish();
607
- });
608
- }
609
- /**
610
- * Checks if the gadget is running in preview mode.
611
- *
612
- * Preview mode is enabled when the gadget is being edited in the Revel Digital CMS,
613
- * tested in the gadget editor, or otherwise not running in a normal player environment.
614
- * This is useful for providing different behavior during development/testing versus
615
- * production deployment.
616
- *
617
- * @returns Promise resolving to true if running in preview mode, false if running on actual player
618
- *
619
- * ```typescript
620
- * const isPreview = await this.client.isPreviewMode();
621
- *
622
- * if (isPreview) {
623
- * console.log('Running in preview mode - using mock data');
624
- * this.loadMockData();
625
- * } else {
626
- * console.log('Running on player device - using live data');
627
- * this.loadLiveData();
628
- * }
629
- *
630
- * // Show different UI in preview
631
- * this.showPreviewIndicator = isPreview;
632
- * ```
633
- */
634
- isPreviewMode() {
635
- return __awaiter(this, void 0, void 0, function* () {
636
- const client = yield this.getClient();
637
- return client instanceof NoopClient;
638
- });
639
- }
640
- /**
641
- * Gets detailed information about the device running the player.
642
- *
643
- * Returns comprehensive device details including name, registration key, type,
644
- * service date, language, timezone, tags, and location information. This data
645
- * is configured in the Revel Digital CMS for each device.
646
- *
647
- * @returns Promise resolving to device details object, or null if not available
648
- *
649
- * ```typescript
650
- * const device = await this.client.getDevice();
651
- *
652
- * if (device) {
653
- * console.log('Device name:', device.name);
654
- * console.log('Device type:', device.deviceType);
655
- * console.log('Location:', device.location.city, device.location.state);
656
- * console.log('Tags:', device.tags);
657
- *
658
- * // Use device info for customization
659
- * if (device.location.country === 'US') {
660
- * this.loadUSContent();
661
- * }
662
- *
663
- * // Check device capabilities based on type
664
- * if (device.deviceType === 'android') {
665
- * this.enableTouchFeatures();
666
- * }
667
- * }
668
- * ```
669
- */
670
- getDevice() {
671
- return __awaiter(this, void 0, void 0, function* () {
672
- const client = yield this.getClient();
673
- let obj = JSON.parse(yield client.getDevice());
674
- const device = [obj].map((device) => {
675
- var _a, _b, _c, _d, _e, _f, _g, _h;
676
- return {
677
- name: device.name,
678
- registrationKey: device.key,
679
- deviceType: device.devicetype,
680
- enteredService: new Date(device.enteredservice),
681
- langCode: device.langcode,
682
- timeZone: device.timezone,
683
- tags: (_a = device.description) === null || _a === void 0 ? void 0 : _a.split('\n'),
684
- location: {
685
- city: (_b = device.location) === null || _b === void 0 ? void 0 : _b.city,
686
- state: (_c = device.location) === null || _c === void 0 ? void 0 : _c.state,
687
- country: (_d = device.location) === null || _d === void 0 ? void 0 : _d.country,
688
- postalCode: (_e = device.location) === null || _e === void 0 ? void 0 : _e.postalcode,
689
- address: (_f = device.location) === null || _f === void 0 ? void 0 : _f.address,
690
- latitude: (_g = device.location) === null || _g === void 0 ? void 0 : _g.latitude,
691
- longitude: (_h = device.location) === null || _h === void 0 ? void 0 : _h.longitude
692
- }
693
- };
694
- });
695
- return device[0];
696
- });
697
- }
698
- /**
699
- * Gets the width of the visualization area in pixels.
700
- *
701
- * This returns the available width for content display, which may be
702
- * different from the full screen width depending on player configuration
703
- * and template layout.
704
- *
705
- * @returns Promise resolving to width in pixels, or null if not available
706
- *
707
- * ```typescript
708
- * const width = await this.client.getWidth();
709
- *
710
- * if (width) {
711
- * console.log('Available width:', width, 'pixels');
712
- *
713
- * // Adapt content layout based on width
714
- * if (width < 800) {
715
- * this.enableMobileLayout();
716
- * } else {
717
- * this.enableDesktopLayout();
718
- * }
719
- * }
720
- * ```
721
- */
722
- getWidth() {
723
- return __awaiter(this, void 0, void 0, function* () {
724
- const client = yield this.getClient();
725
- return client.getWidth();
726
- });
727
- }
728
- /**
729
- * Gets the height of the visualization area in pixels.
730
- *
731
- * This returns the available height for content display, which may be
732
- * different from the full screen height depending on player configuration
733
- * and template layout.
734
- *
735
- * @returns Promise resolving to height in pixels, or null if not available
736
- *
737
- * ```typescript
738
- * const height = await this.client.getHeight();
739
- *
740
- * if (height) {
741
- * console.log('Available height:', height, 'pixels');
742
- *
743
- * // Calculate aspect ratio for responsive design
744
- * const width = await this.client.getWidth();
745
- * const aspectRatio = width / height;
746
- * this.adjustContentForAspectRatio(aspectRatio);
747
- * }
748
- * ```
749
- */
750
- getHeight() {
751
- return __awaiter(this, void 0, void 0, function* () {
752
- const client = yield this.getClient();
753
- return client.getHeight();
754
- });
755
- }
756
- /**
757
- * Gets the duration of the currently playing content item.
758
- *
759
- * This method is only applicable when the gadget is associated with a playlist
760
- * and returns the duration assigned to the current playlist item. The duration
761
- * determines how long the content should be displayed before moving to the next item.
762
- *
763
- * @returns Promise resolving to duration in milliseconds, or null if not applicable/available
764
- *
765
- * ```typescript
766
- * const duration = await this.client.getDuration();
767
- *
768
- * if (duration) {
769
- * console.log('Content duration:', duration, 'milliseconds');
770
- *
771
- * // Set up auto-finish timer
772
- * setTimeout(() => {
773
- * this.client.finish();
774
- * }, duration);
775
- *
776
- * // Show progress indicator
777
- * this.startProgressIndicator(duration);
778
- * }
779
- * ```
780
- */
781
- getDuration() {
782
- return __awaiter(this, void 0, void 0, function* () {
783
- const client = yield this.getClient();
784
- return client.getDuration();
785
- });
786
- }
787
- /**
788
- * Gets the current version of the Revel Digital SDK.
789
- *
790
- * @returns Promise resolving to the SDK version string
791
- *
792
- * ```typescript
793
- * const version = await this.client.getSdkVersion();
794
- * console.log('SDK Version:', version);
795
- *
796
- * // Use for compatibility checks or logging
797
- * this.client.track('gadget_loaded', { sdkVersion: version });
798
- * ```
799
- */
800
- getSdkVersion() {
801
- return __awaiter(this, void 0, void 0, function* () {
802
- return Promise.resolve(version);
803
- });
804
- }
805
- /**
806
- * Applies configuration preferences to the gadget (preview mode only).
807
- *
808
- * This method is only available when running in preview mode (typically during
809
- * gadget development or testing in the CMS). It allows applying configuration
810
- * changes that would normally come from the gadget's preference settings.
811
- *
812
- * @param prefs - Dictionary of preference key-value pairs to apply
813
- *
814
- * ```typescript
815
- * if (await this.client.isPreviewMode()) {
816
- * // Apply test configuration in preview
817
- * await this.client.applyConfig({
818
- * 'title': 'Test Title',
819
- * 'backgroundColor': '#ff0000',
820
- * 'showBorder': true,
821
- * 'refreshInterval': 30
822
- * });
823
- * }
824
- * ```
825
- */
826
- applyConfig(prefs) {
827
- return __awaiter(this, void 0, void 0, function* () {
828
- if (yield this.isPreviewMode()) {
829
- const client = yield this.getClient();
830
- client.applyConfig(prefs);
831
- }
832
- else {
833
- console.log('%capplyConfig() is only available in preview mode.', 'background-color:blue; color:yellow;');
834
- }
835
- });
836
- }
837
- // ---
838
- // PRIVATE METHODS.
839
- // ---
840
- /** @ignore */
841
- getClient() {
842
- if (this.clientPromise) {
843
- return (this.clientPromise);
844
- }
845
- if (window.Client) {
846
- return (this.clientPromise = Promise.resolve(window.Client));
847
- }
848
- // A "complete" status indicates that the "load" event has been fired on the
849
- // window; and, that all sub-resources such as Scripts, Images, and Frames have
850
- // been loaded.
851
- if (window.document.readyState === "complete") {
852
- // If this event has fired AND the 3rd-party script isn't available (see IF-
853
- // condition BEFORE this one), it means that the 3rd-party script either
854
- // failed on the network or was BLOCKED by an ad-blocker. As such, we have to
855
- // fall-back to using a mock API.
856
- return (this.clientPromise = Promise.resolve(new NoopClient()));
857
- }
858
- // ASSERT: If we made it this far, the document has not completed loading (but it
859
- // may be in an "interactive" state which is when I believe that the Angular app
860
- // gets bootstrapped). As such, we need bind to the LOAD event to wait for our
861
- // third-party scripts to load (or fail to load, or be blocked).
862
- this.clientPromise = new Promise((resolve) => {
863
- window.addEventListener("load", function handleWindowLoad() {
864
- // At this point, the 3rd-party library is either available or
865
- // it's not - there's no further loading to do. If it's not
866
- // present on the global scope, we're going to fall-back to using
867
- // a mock API.
868
- resolve(window.Client || new NoopClient());
869
- });
870
- });
871
- return (this.clientPromise);
872
- }
873
- }
874
- PlayerClientService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PlayerClientService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
875
- PlayerClientService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PlayerClientService, providedIn: 'root' });
876
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PlayerClientService, decorators: [{
877
- type: Injectable,
878
- args: [{
879
- providedIn: 'root'
880
- }]
881
- }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
882
- // ----------------------------------------------------------------------------------- //
883
- // ----------------------------------------------------------------------------------- //
884
- /**
885
- * Mock implementation of the IClient interface.
886
- *
887
- * This class provides a no-operation (NOOP) implementation of the client API
888
- * that allows consuming code to function normally even when the actual player
889
- * API is not available. This typically occurs during development, testing,
890
- * or when the player script is blocked by ad-blockers.
891
- *
892
- * All methods in this class either return null/empty values or perform no
893
- * operations, allowing gadgets to function without errors while providing
894
- * appropriate fallback behavior.
895
- *
896
- * @private
897
- */
898
- class NoopClient {
899
- constructor() {
900
- console.log('%cClient API not available, falling back to mock API', 'background-color:blue; color:yellow;');
901
- }
902
- callback(...args) {
903
- // NOOP implement, nothing to do....
904
- }
905
- getDeviceTime(date) {
906
- return Promise.resolve(new Date().toISOString());
907
- }
908
- getDeviceTimeZoneName() {
909
- return __awaiter(this, void 0, void 0, function* () {
910
- return Promise.resolve(null);
911
- });
912
- }
913
- getDeviceTimeZoneID() {
914
- return __awaiter(this, void 0, void 0, function* () {
915
- return Promise.resolve(null);
916
- });
917
- }
918
- getDeviceTimeZoneOffset() {
919
- return __awaiter(this, void 0, void 0, function* () {
920
- return Promise.resolve(null);
921
- });
922
- }
923
- getLanguageCode() {
924
- return __awaiter(this, void 0, void 0, function* () {
925
- return Promise.resolve(null);
926
- });
927
- }
928
- getDeviceKey() {
929
- return __awaiter(this, void 0, void 0, function* () {
930
- return Promise.resolve(null);
931
- });
932
- }
933
- sendCommand(name, arg) {
934
- // NOOP implement, nothing to do....
935
- }
936
- sendRemoteCommand(deviceKeys, name, arg) {
937
- // NOOP implement, nothing to do....
938
- }
939
- track(eventName, properties) {
940
- // NOOP implement, nothing to do....
941
- }
942
- timeEvent(eventName) {
943
- // NOOP implement, nothing to do....
944
- }
945
- newEventSession(id) {
946
- // NOOP implement, nothing to do....
947
- }
948
- getRevelRoot() {
949
- return __awaiter(this, void 0, void 0, function* () {
950
- return Promise.resolve(null);
951
- });
952
- }
953
- getCommandMap() {
954
- return __awaiter(this, void 0, void 0, function* () {
955
- return Promise.resolve('{}');
956
- });
957
- }
958
- finish() {
959
- // NOOP implement, nothing to do....
960
- }
961
- getDevice() {
962
- return __awaiter(this, void 0, void 0, function* () {
963
- return Promise.resolve(null);
964
- });
965
- }
966
- getWidth() {
967
- return __awaiter(this, void 0, void 0, function* () {
968
- return Promise.resolve(null);
969
- });
970
- }
971
- getHeight() {
972
- return __awaiter(this, void 0, void 0, function* () {
973
- return Promise.resolve(null);
974
- });
975
- }
976
- getDuration() {
977
- return __awaiter(this, void 0, void 0, function* () {
978
- return Promise.resolve(null);
979
- });
980
- }
981
- getSdkVersion() {
982
- return __awaiter(this, void 0, void 0, function* () {
983
- return Promise.resolve(version);
984
- });
985
- }
986
- applyConfig(prefs) {
987
- let evt = { type: 'applyConfig', prefs: prefs, isOpener: window.opener !== null };
988
- if (window.opener) {
989
- window.opener.postMessage(JSON.stringify(evt), '*');
990
- }
991
- else {
992
- window.parent.postMessage(JSON.stringify(evt), '*');
993
- }
994
- }
995
- }
996
-
997
- const isLocal = /localhost/.test(document.location.host);
998
- !isLocal && enableProdMode();
999
- /** @ignore */
1000
- class AppInitService {
1001
- constructor(http, _route, _router) {
1002
- this.http = http;
1003
- this._route = _route;
1004
- this._router = _router;
1005
- }
1006
- init() {
1007
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
1008
- this.loadFonts();
1009
- if (isDevMode()) {
1010
- console.log('%cRunning in development mode', 'background-color:blue; color:yellow;');
1011
- /**
1012
- * Shim the shindig prefs functionality for dev mode
1013
- */
1014
- window.gadgets = {
1015
- Prefs: class {
1016
- getString(key) { return this.getParameterByName(key); }
1017
- getArray(key) { return this.getParameterByName(key).split(','); }
1018
- getBool(key) { return this.getParameterByName(key) === 'true'; }
1019
- getCountry() { }
1020
- getFloat(key) { return parseFloat(this.getParameterByName(key)); }
1021
- getInt(key) { return parseInt(this.getParameterByName(key)); }
1022
- getLang() { return this.getParameterByName('lang') === '' ? 'en' : this.getParameterByName('lang'); }
1023
- getParameterByName(name, search = window.location.href) {
1024
- name = name.replace(/[\[\]]/g, '\\$&');
1025
- let regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(search);
1026
- if (!results)
1027
- return '';
1028
- if (!results[2])
1029
- return '';
1030
- return decodeURIComponent(results[2].replace(/\+/g, ' '));
1031
- }
1032
- }
1033
- };
1034
- this.http.get('assets/gadget.yaml', {
1035
- responseType: 'text'
1036
- }).subscribe(data => {
1037
- const doc = yaml.load(data);
1038
- let params = {};
1039
- for (const val of doc.prefs) {
1040
- params[val.name] = val.default_value;
1041
- }
1042
- this._router.navigate([], {
1043
- relativeTo: this._route,
1044
- queryParams: params,
1045
- });
1046
- console.log(`%cUser prefs loaded successfully`, 'background-color:blue; color:yellow;');
1047
- }, (err) => {
1048
- console.log(`%cUnable to load user preferences YAML definition file: ${err}`, 'background-color:blue; color:yellow;');
1049
- console.log(`%cPlease see our developer documentation for help with your app configuration: https://developer.reveldigital.com`, 'background-color:red; color:yellow;');
1050
- });
1051
- }
1052
- resolve();
1053
- }));
1054
- }
1055
- getFamilyName(css) {
1056
- let FONT_FAMILY_REGEX = /font-family:\s*(?:[&#39;&#34;])*['"]*(.+?)['"]*(?:[&#39;&#34;])*\s*;/i;
1057
- if (FONT_FAMILY_REGEX.test(css)) {
1058
- var matches = css.match(FONT_FAMILY_REGEX);
1059
- return matches[1].split(',')[0];
1060
- }
1061
- else {
1062
- return '';
1063
- }
1064
- }
1065
- /**
1066
- * Loads the given font from Google Web Fonts.
1067
- */
1068
- loadFonts() {
1069
- const parameters = new URLSearchParams(window.location.search);
1070
- parameters.forEach((val, key) => {
1071
- try {
1072
- let fontFamily = this.getFamilyName(val);
1073
- if (fontFamily !== '') {
1074
- WebFont.load({
1075
- google: {
1076
- families: [fontFamily]
1077
- },
1078
- fontactive: (familyName) => {
1079
- console.log(`%cActivating font: ${familyName}`, 'background-color:blue; color:yellow;');
1080
- },
1081
- fontinactive: (familyName) => {
1082
- console.log(`%cFont inactive: ${familyName}`, 'background-color:red; color:yellow;');
1083
- }
1084
- });
1085
- }
1086
- }
1087
- catch (e) {
1088
- }
1089
- });
1090
- }
1091
- }
1092
- AppInitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AppInitService, deps: [{ token: i1.HttpClient }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1093
- AppInitService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AppInitService, providedIn: 'root' });
1094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AppInitService, decorators: [{
1095
- type: Injectable,
1096
- args: [{
1097
- providedIn: 'root'
1098
- }]
1099
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: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bmFtZSArICcoPShbXiYjXSopfCZ8I3wkKScpLFxyXG4gICAgICAgICAgICAgICAgcmVzdWx0cyA9IHJlZ2V4LmV4ZWMoc2VhcmNoKTtcclxuICAgICAgICAgICAgICBpZiAoIXJlc3VsdHMpIHJldHVybiAnJztcclxuICAgICAgICAgICAgICBpZiAoIXJlc3VsdHNbMl0pIHJldHVybiAnJztcclxuICAgICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KHJlc3VsdHNbMl0ucmVwbGFjZSgvXFwrL2csICcgJykpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgdGhpcy5odHRwLmdldCgnYXNzZXRzL2dhZGdldC55YW1sJywge1xyXG4gICAgICAgICAgcmVzcG9uc2VUeXBlOiAndGV4dCdcclxuICAgICAgICB9KS5zdWJzY3JpYmUoZGF0YSA9PiB7XHJcbiAgICAgICAgICBjb25zdCBkb2M6IGFueSA9IHlhbWwubG9hZChkYXRhKTtcclxuICAgICAgICAgIGxldCBwYXJhbXM6IGFueSA9IHt9XHJcbiAgICAgICAgICBmb3IgKGNvbnN0IHZhbCBvZiBkb2MucHJlZnMpIHtcclxuICAgICAgICAgICAgcGFyYW1zW3ZhbC5uYW1lXSA9IHZhbC5kZWZhdWx0X3ZhbHVlXHJcbiAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgdGhpcy5fcm91dGVyLm5hdmlnYXRlKFtdLCB7XHJcbiAgICAgICAgICAgIHJlbGF0aXZlVG86IHRoaXMuX3JvdXRlLFxyXG4gICAgICAgICAgICBxdWVyeVBhcmFtczogcGFyYW1zLFxyXG4gICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgY29uc29sZS5sb2coXHJcbiAgICAgICAgICAgIGAlY1VzZXIgcHJlZnMgbG9hZGVkIHN1Y2Nlc3NmdWxseWAsXHJcbiAgICAgICAgICAgICdiYWNrZ3JvdW5kLWNvbG9yOmJ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ge1xyXG4gICAgICByZXR1cm4gJyc7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBMb2FkcyB0aGUgZ2l2ZW4gZm9udCBmcm9tIEdvb2dsZSBXZWIgRm9udHMuXHJcbiAgICovXHJcbiAgcHJpdmF0ZSBsb2FkRm9udHMoKTogdm9pZCB7XHJcblxyXG4gICAgY29uc3QgcGFyYW1ldGVycyA9IG5ldyBVUkxTZWFyY2hQYXJhbXMod2luZG93LmxvY2F0aW9uLnNlYXJjaCk7XHJcbiAgICBwYXJhbWV0ZXJzLmZvckVhY2goKHZhbCwga2V5KSA9PiB7XHJcbiAgICAgIHRyeSB7XHJcbiAgICAgICAgbGV0IGZvbnRGYW1pbHkgPSB0aGlzLmdldEZhbWlseU5hbWUodmFsKTtcclxuICAgICAgICBpZiAoZm9udEZhbWlseSAhPT0gJycpIHtcclxuICAgICAgICAgIFdlYkZvbnQubG9hZCh7XHJcbiAgICAgICAgICAgIGdvb2dsZToge1xyXG4gICAgICAgICAgICAgIGZhbWlsaWVzOiBbZm9udEZhbWlseV1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZm9udGFjdGl2ZTogKGZhbWlseU5hbWUpID0+IHtcclxuICAgICAgICAgICAgICBjb25zb2xlLmxvZyhgJWNBY3RpdmF0aW5nIGZvbnQ6ICR7ZmFtaWx5TmFtZX1gLFxyXG4gICAgICAgICAgICAgICAgJ2JhY2tncm91bmQtY29sb3I6Ymx1ZTsgY29sb3I6eWVsbG93OycpO1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBmb250aW5hY3RpdmU6IChmYW1pbHlOYW1lKSA9PiB7XHJcbiAgICAgICAgICAgICAgY29uc29sZS5sb2coYCVjRm9udCBpbmFjdGl2ZTogJHtmYW1pbHlOYW1lfWAsXHJcbiAgICAgICAgICAgICAgICAnYmFja2dyb3VuZC1jb2xvcjpyZWQ7IGNvbG9yOnllbGxvdzsnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG4gIH1cclxufVxyXG4iXX0=
1101
- //# sourceMappingURL=C:/Users/mike_/Documents/GitHub/reveldigital-client-library/dist/reveldigital/player-client/esm2020/lib/module.js.map
1102
-
1103
- /**
1104
- * The safe style pipe is used when custom styles are defined for a gadget and must be applied to an Angular
1105
- * component. This pipe will ensure the style can be appied safely by utilizing the DomSanitizer.
1106
- *
1107
- * ```html
1108
- * <h2 [style]="style | safeStyle">Sample Pref: {{ prefs.getString('myStringPref') }}</h2>
1109
- * ```
1110
- */
1111
- class SafeStylePipe {
1112
- constructor(sanitized) {
1113
- this.sanitized = sanitized;
1114
- }
1115
- transform(value) {
1116
- return this.sanitized.bypassSecurityTrustStyle(value);
1117
- }
1118
- }
1119
- SafeStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SafeStylePipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1120
- SafeStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SafeStylePipe, name: "safeStyle" });
1121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SafeStylePipe, decorators: [{
1122
- type: Pipe,
1123
- args: [{
1124
- name: 'safeStyle',
1125
- }]
1126
- }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
1127
- class NgSafeStylePipeModule {
1128
- }
1129
- NgSafeStylePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NgSafeStylePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1130
- NgSafeStylePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NgSafeStylePipeModule, declarations: [SafeStylePipe], exports: [SafeStylePipe] });
1131
- NgSafeStylePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NgSafeStylePipeModule });
1132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: NgSafeStylePipeModule, decorators: [{
1133
- type: NgModule,
1134
- args: [{
1135
- declarations: [SafeStylePipe],
1136
- exports: [SafeStylePipe],
1137
- }]
1138
- }] });
1139
-
1140
- class PlayerClientModule {
1141
- }
1142
- PlayerClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PlayerClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1143
- PlayerClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PlayerClientModule, imports: [HttpClientModule, i2.RouterModule, NgSafeStylePipeModule], exports: [NgSafeStylePipeModule] });
1144
- PlayerClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PlayerClientModule, providers: [{
1145
- provide: APP_INITIALIZER,
1146
- useFactory: initializeApp,
1147
- deps: [AppInitService, PlayerClientService],
1148
- multi: true
1149
- },
1150
- {
1151
- provide: LOCALE_ID,
1152
- useFactory: () => {
1153
- try {
1154
- return new gadgets.Prefs().getLang();
1155
- }
1156
- catch (_a) {
1157
- return 'en';
1158
- }
1159
- }
1160
- },
1161
- { provide: APP_BASE_HREF, useValue: '/gadgets/ifr' }], imports: [[
1162
- HttpClientModule,
1163
- RouterModule.forRoot([]),
1164
- NgSafeStylePipeModule
1165
- ], NgSafeStylePipeModule] });
1166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PlayerClientModule, decorators: [{
1167
- type: NgModule,
1168
- args: [{
1169
- imports: [
1170
- HttpClientModule,
1171
- RouterModule.forRoot([]),
1172
- NgSafeStylePipeModule
1173
- ],
1174
- exports: [
1175
- NgSafeStylePipeModule
1176
- ],
1177
- providers: [{
1178
- provide: APP_INITIALIZER,
1179
- useFactory: initializeApp,
1180
- deps: [AppInitService, PlayerClientService],
1181
- multi: true
1182
- },
1183
- {
1184
- provide: LOCALE_ID,
1185
- useFactory: () => {
1186
- try {
1187
- return new gadgets.Prefs().getLang();
1188
- }
1189
- catch (_a) {
1190
- return 'en';
1191
- }
1192
- }
1193
- },
1194
- { provide: APP_BASE_HREF, useValue: '/gadgets/ifr' }]
1195
- }]
1196
- }] });
1197
- function initializeApp(appInitService) {
1198
- return () => __awaiter(this, void 0, void 0, function* () {
1199
- PlayerClientService.init({});
1200
- yield appInitService.init();
1201
- });
1202
- }
1203
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxheWVyLWNsaWVudC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9yZXZlbGRpZ2l0YWwvcGxheWVyLWNsaWVudC9zcmMvbGliL3BsYXllci1jbGllbnQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxlQUFlLEVBQUUsU0FBUyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNyRSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDcEQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDeEQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxhQUFhLEVB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Rpb24gaW5pdGlhbGl6ZUFwcChhcHBJbml0U2VydmljZTogQXBwSW5pdFNlcnZpY2UpIHtcbiAgcmV0dXJuIGFzeW5jICgpID0+IHtcbiAgICBQbGF5ZXJDbGllbnRTZXJ2aWNlLmluaXQoe30pO1xuICAgIGF3YWl0IGFwcEluaXRTZXJ2aWNlLmluaXQoKTtcbiAgfVxufVxuIl19
1204
- //# sourceMappingURL=C:/Users/mike_/Documents/GitHub/reveldigital-client-library/dist/reveldigital/player-client/esm2020/lib/module.js.map
1205
-
1206
- /*
1207
- * Public API Surface of player-client
1208
- */
1209
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3JldmVsZGlnaXRhbC9wbGF5ZXItY2xpZW50L3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMsdUJBQXVCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIHBsYXllci1jbGllbnRcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9wbGF5ZXItY2xpZW50LnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcGxheWVyLWNsaWVudC5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvc2FmZS1zdHlsZS5waXBlJzsiXX0=
1210
- //# sourceMappingURL=C:/Users/mike_/Documents/GitHub/reveldigital-client-library/dist/reveldigital/player-client/esm2020/module.js.map
1211
-
1212
- /**
1213
- * Generated bundle index. Do not edit.
1214
- */
1215
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmV2ZWxkaWdpdGFsLXBsYXllci1jbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9yZXZlbGRpZ2l0YWwvcGxheWVyLWNsaWVudC9zcmMvcmV2ZWxkaWdpdGFsLXBsYXllci1jbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
1216
- //# sourceMappingURL=C:/Users/mike_/Documents/GitHub/reveldigital-client-library/dist/reveldigital/player-client/esm2020/module.js.map
1217
-
1218
- export { NgSafeStylePipeModule, PlayerClientModule, PlayerClientService, SafeStylePipe };
1219
- //# sourceMappingURL=reveldigital-player-client.mjs.map