@amazon-devices/kepler-media-controls 1.0.17 → 1.0.21

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.
@@ -1,2277 +0,0 @@
1
- var __BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date.now(),__DEV__=false,process=this.process||{},__METRO_GLOBAL_PREFIX__='';process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||"production";
2
- (function (global) {
3
- /**
4
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- *
9
- * @polyfill
10
- * @nolint
11
- * @format
12
- */
13
-
14
- /* eslint-disable no-shadow, eqeqeq, curly, no-unused-vars, no-void, no-control-regex */
15
-
16
- /**
17
- * This pipes all of our console logging functions to native logging so that
18
- * JavaScript errors in required modules show up in Xcode via NSLog.
19
- */
20
- var inspect = function () {
21
- // Copyright Joyent, Inc. and other Node contributors.
22
- //
23
- // Permission is hereby granted, free of charge, to any person obtaining a
24
- // copy of this software and associated documentation files (the
25
- // "Software"), to deal in the Software without restriction, including
26
- // without limitation the rights to use, copy, modify, merge, publish,
27
- // distribute, sublicense, and/or sell copies of the Software, and to permit
28
- // persons to whom the Software is furnished to do so, subject to the
29
- // following conditions:
30
- //
31
- // The above copyright notice and this permission notice shall be included
32
- // in all copies or substantial portions of the Software.
33
- //
34
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
35
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
37
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
38
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
39
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
40
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
41
- //
42
- // https://github.com/joyent/node/blob/master/lib/util.js
43
-
44
- function inspect(obj, opts) {
45
- var ctx = {
46
- seen: [],
47
- formatValueCalls: 0,
48
- stylize: stylizeNoColor
49
- };
50
- return formatValue(ctx, obj, opts.depth);
51
- }
52
- function stylizeNoColor(str, styleType) {
53
- return str;
54
- }
55
- function arrayToHash(array) {
56
- var hash = {};
57
- array.forEach(function (val, idx) {
58
- hash[val] = true;
59
- });
60
- return hash;
61
- }
62
- function formatValue(ctx, value, recurseTimes) {
63
- ctx.formatValueCalls++;
64
- if (ctx.formatValueCalls > 200) {
65
- return `[TOO BIG formatValueCalls ${ctx.formatValueCalls} exceeded limit of 200]`;
66
- }
67
-
68
- // Primitive types cannot have properties
69
- var primitive = formatPrimitive(ctx, value);
70
- if (primitive) {
71
- return primitive;
72
- }
73
-
74
- // Look up the keys of the object.
75
- var keys = Object.keys(value);
76
- var visibleKeys = arrayToHash(keys);
77
-
78
- // IE doesn't make error fields non-enumerable
79
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
80
- if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
81
- return formatError(value);
82
- }
83
-
84
- // Some type of object without properties can be shortcutted.
85
- if (keys.length === 0) {
86
- if (isFunction(value)) {
87
- var name = value.name ? ': ' + value.name : '';
88
- return ctx.stylize('[Function' + name + ']', 'special');
89
- }
90
- if (isRegExp(value)) {
91
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
92
- }
93
- if (isDate(value)) {
94
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
95
- }
96
- if (isError(value)) {
97
- return formatError(value);
98
- }
99
- }
100
- var base = '',
101
- array = false,
102
- braces = ['{', '}'];
103
-
104
- // Make Array say that they are Array
105
- if (isArray(value)) {
106
- array = true;
107
- braces = ['[', ']'];
108
- }
109
-
110
- // Make functions say that they are functions
111
- if (isFunction(value)) {
112
- var n = value.name ? ': ' + value.name : '';
113
- base = ' [Function' + n + ']';
114
- }
115
-
116
- // Make RegExps say that they are RegExps
117
- if (isRegExp(value)) {
118
- base = ' ' + RegExp.prototype.toString.call(value);
119
- }
120
-
121
- // Make dates with properties first say the date
122
- if (isDate(value)) {
123
- base = ' ' + Date.prototype.toUTCString.call(value);
124
- }
125
-
126
- // Make error with message first say the error
127
- if (isError(value)) {
128
- base = ' ' + formatError(value);
129
- }
130
- if (keys.length === 0 && (!array || value.length == 0)) {
131
- return braces[0] + base + braces[1];
132
- }
133
- if (recurseTimes < 0) {
134
- if (isRegExp(value)) {
135
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
136
- } else {
137
- return ctx.stylize('[Object]', 'special');
138
- }
139
- }
140
- ctx.seen.push(value);
141
- var output;
142
- if (array) {
143
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
144
- } else {
145
- output = keys.map(function (key) {
146
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
147
- });
148
- }
149
- ctx.seen.pop();
150
- return reduceToSingleString(output, base, braces);
151
- }
152
- function formatPrimitive(ctx, value) {
153
- if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');
154
- if (isString(value)) {
155
- var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
156
- return ctx.stylize(simple, 'string');
157
- }
158
- if (isNumber(value)) return ctx.stylize('' + value, 'number');
159
- if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');
160
- // For some reason typeof null is "object", so special case here.
161
- if (isNull(value)) return ctx.stylize('null', 'null');
162
- }
163
- function formatError(value) {
164
- return '[' + Error.prototype.toString.call(value) + ']';
165
- }
166
- function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
167
- var output = [];
168
- for (var i = 0, l = value.length; i < l; ++i) {
169
- if (hasOwnProperty(value, String(i))) {
170
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
171
- } else {
172
- output.push('');
173
- }
174
- }
175
- keys.forEach(function (key) {
176
- if (!key.match(/^\d+$/)) {
177
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
178
- }
179
- });
180
- return output;
181
- }
182
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
183
- var name, str, desc;
184
- desc = Object.getOwnPropertyDescriptor(value, key) || {
185
- value: value[key]
186
- };
187
- if (desc.get) {
188
- if (desc.set) {
189
- str = ctx.stylize('[Getter/Setter]', 'special');
190
- } else {
191
- str = ctx.stylize('[Getter]', 'special');
192
- }
193
- } else {
194
- if (desc.set) {
195
- str = ctx.stylize('[Setter]', 'special');
196
- }
197
- }
198
- if (!hasOwnProperty(visibleKeys, key)) {
199
- name = '[' + key + ']';
200
- }
201
- if (!str) {
202
- if (ctx.seen.indexOf(desc.value) < 0) {
203
- if (isNull(recurseTimes)) {
204
- str = formatValue(ctx, desc.value, null);
205
- } else {
206
- str = formatValue(ctx, desc.value, recurseTimes - 1);
207
- }
208
- if (str.indexOf('\n') > -1) {
209
- if (array) {
210
- str = str.split('\n').map(function (line) {
211
- return ' ' + line;
212
- }).join('\n').substr(2);
213
- } else {
214
- str = '\n' + str.split('\n').map(function (line) {
215
- return ' ' + line;
216
- }).join('\n');
217
- }
218
- }
219
- } else {
220
- str = ctx.stylize('[Circular]', 'special');
221
- }
222
- }
223
- if (isUndefined(name)) {
224
- if (array && key.match(/^\d+$/)) {
225
- return str;
226
- }
227
- name = JSON.stringify('' + key);
228
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
229
- name = name.substr(1, name.length - 2);
230
- name = ctx.stylize(name, 'name');
231
- } else {
232
- name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
233
- name = ctx.stylize(name, 'string');
234
- }
235
- }
236
- return name + ': ' + str;
237
- }
238
- function reduceToSingleString(output, base, braces) {
239
- var numLinesEst = 0;
240
- var length = output.reduce(function (prev, cur) {
241
- numLinesEst++;
242
- if (cur.indexOf('\n') >= 0) numLinesEst++;
243
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
244
- }, 0);
245
- if (length > 60) {
246
- return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1];
247
- }
248
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
249
- }
250
-
251
- // NOTE: These type checking functions intentionally don't use `instanceof`
252
- // because it is fragile and can be easily faked with `Object.create()`.
253
- function isArray(ar) {
254
- return Array.isArray(ar);
255
- }
256
- function isBoolean(arg) {
257
- return typeof arg === 'boolean';
258
- }
259
- function isNull(arg) {
260
- return arg === null;
261
- }
262
- function isNumber(arg) {
263
- return typeof arg === 'number';
264
- }
265
- function isString(arg) {
266
- return typeof arg === 'string';
267
- }
268
- function isUndefined(arg) {
269
- return arg === undefined;
270
- }
271
- function isRegExp(re) {
272
- return isObject(re) && objectToString(re) === '[object RegExp]';
273
- }
274
- function isObject(arg) {
275
- return typeof arg === 'object' && arg !== null;
276
- }
277
- function isDate(d) {
278
- return isObject(d) && objectToString(d) === '[object Date]';
279
- }
280
- function isError(e) {
281
- return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error);
282
- }
283
- function isFunction(arg) {
284
- return typeof arg === 'function';
285
- }
286
- function objectToString(o) {
287
- return Object.prototype.toString.call(o);
288
- }
289
- function hasOwnProperty(obj, prop) {
290
- return Object.prototype.hasOwnProperty.call(obj, prop);
291
- }
292
- return inspect;
293
- }();
294
- var OBJECT_COLUMN_NAME = '(index)';
295
- var LOG_LEVELS = {
296
- trace: 0,
297
- info: 1,
298
- warn: 2,
299
- error: 3
300
- };
301
- var INSPECTOR_LEVELS = [];
302
- INSPECTOR_LEVELS[LOG_LEVELS.trace] = 'debug';
303
- INSPECTOR_LEVELS[LOG_LEVELS.info] = 'log';
304
- INSPECTOR_LEVELS[LOG_LEVELS.warn] = 'warning';
305
- INSPECTOR_LEVELS[LOG_LEVELS.error] = 'error';
306
-
307
- // Strip the inner function in getNativeLogFunction(), if in dev also
308
- // strip method printing to originalConsole.
309
- var INSPECTOR_FRAMES_TO_SKIP = 1;
310
- function getNativeLogFunction(level) {
311
- return function () {
312
- var str;
313
- if (arguments.length === 1 && typeof arguments[0] === 'string') {
314
- str = arguments[0];
315
- } else {
316
- str = Array.prototype.map.call(arguments, function (arg) {
317
- return inspect(arg, {
318
- depth: 10
319
- });
320
- }).join(', ');
321
- }
322
-
323
- // TRICKY
324
- // If more than one argument is provided, the code above collapses them all
325
- // into a single formatted string. This transform wraps string arguments in
326
- // single quotes (e.g. "foo" -> "'foo'") which then breaks the "Warning:"
327
- // check below. So it's important that we look at the first argument, rather
328
- // than the formatted argument string.
329
- var firstArg = arguments[0];
330
- var logLevel = level;
331
- if (typeof firstArg === 'string' && firstArg.slice(0, 9) === 'Warning: ' && logLevel >= LOG_LEVELS.error) {
332
- // React warnings use console.error so that a stack trace is shown,
333
- // but we don't (currently) want these to show a redbox
334
- // (Note: Logic duplicated in ExceptionsManager.js.)
335
- logLevel = LOG_LEVELS.warn;
336
- }
337
- if (global.__inspectorLog) {
338
- global.__inspectorLog(INSPECTOR_LEVELS[logLevel], str, [].slice.call(arguments), INSPECTOR_FRAMES_TO_SKIP);
339
- }
340
- if (groupStack.length) {
341
- str = groupFormat('', str);
342
- }
343
- global.nativeLoggingHook(str, logLevel);
344
- };
345
- }
346
- function repeat(element, n) {
347
- return Array.apply(null, Array(n)).map(function () {
348
- return element;
349
- });
350
- }
351
- function consoleTablePolyfill(rows) {
352
- // convert object -> array
353
- if (!Array.isArray(rows)) {
354
- var data = rows;
355
- rows = [];
356
- for (var key in data) {
357
- if (data.hasOwnProperty(key)) {
358
- var row = data[key];
359
- row[OBJECT_COLUMN_NAME] = key;
360
- rows.push(row);
361
- }
362
- }
363
- }
364
- if (rows.length === 0) {
365
- global.nativeLoggingHook('', LOG_LEVELS.info);
366
- return;
367
- }
368
- var columns = Object.keys(rows[0]).sort();
369
- var stringRows = [];
370
- var columnWidths = [];
371
-
372
- // Convert each cell to a string. Also
373
- // figure out max cell width for each column
374
- columns.forEach(function (k, i) {
375
- columnWidths[i] = k.length;
376
- for (var j = 0; j < rows.length; j++) {
377
- var cellStr = (rows[j][k] || '?').toString();
378
- stringRows[j] = stringRows[j] || [];
379
- stringRows[j][i] = cellStr;
380
- columnWidths[i] = Math.max(columnWidths[i], cellStr.length);
381
- }
382
- });
383
-
384
- // Join all elements in the row into a single string with | separators
385
- // (appends extra spaces to each cell to make separators | aligned)
386
- function joinRow(row, space) {
387
- var cells = row.map(function (cell, i) {
388
- var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');
389
- return cell + extraSpaces;
390
- });
391
- space = space || ' ';
392
- return cells.join(space + '|' + space);
393
- }
394
- var separators = columnWidths.map(function (columnWidth) {
395
- return repeat('-', columnWidth).join('');
396
- });
397
- var separatorRow = joinRow(separators, '-');
398
- var header = joinRow(columns);
399
- var table = [header, separatorRow];
400
- for (var i = 0; i < rows.length; i++) {
401
- table.push(joinRow(stringRows[i]));
402
- }
403
-
404
- // Notice extra empty line at the beginning.
405
- // Native logging hook adds "RCTLog >" at the front of every
406
- // logged string, which would shift the header and screw up
407
- // the table
408
- global.nativeLoggingHook('\n' + table.join('\n'), LOG_LEVELS.info);
409
- }
410
- var GROUP_PAD = "\u2502"; // Box light vertical
411
- var GROUP_OPEN = "\u2510"; // Box light down+left
412
- var GROUP_CLOSE = "\u2518"; // Box light up+left
413
-
414
- var groupStack = [];
415
- function groupFormat(prefix, msg) {
416
- // Insert group formatting before the console message
417
- return groupStack.join('') + prefix + ' ' + (msg || '');
418
- }
419
- function consoleGroupPolyfill(label) {
420
- global.nativeLoggingHook(groupFormat(GROUP_OPEN, label), LOG_LEVELS.info);
421
- groupStack.push(GROUP_PAD);
422
- }
423
- function consoleGroupCollapsedPolyfill(label) {
424
- global.nativeLoggingHook(groupFormat(GROUP_CLOSE, label), LOG_LEVELS.info);
425
- groupStack.push(GROUP_PAD);
426
- }
427
- function consoleGroupEndPolyfill() {
428
- groupStack.pop();
429
- global.nativeLoggingHook(groupFormat(GROUP_CLOSE), LOG_LEVELS.info);
430
- }
431
- function consoleAssertPolyfill(expression, label) {
432
- if (!expression) {
433
- global.nativeLoggingHook('Assertion failed: ' + label, LOG_LEVELS.error);
434
- }
435
- }
436
- if (global.nativeLoggingHook) {
437
- var originalConsole = global.console;
438
- // Preserve the original `console` as `originalConsole`
439
-
440
- global.console = {
441
- error: getNativeLogFunction(LOG_LEVELS.error),
442
- info: getNativeLogFunction(LOG_LEVELS.info),
443
- log: getNativeLogFunction(LOG_LEVELS.info),
444
- warn: getNativeLogFunction(LOG_LEVELS.warn),
445
- trace: getNativeLogFunction(LOG_LEVELS.trace),
446
- debug: getNativeLogFunction(LOG_LEVELS.trace),
447
- table: consoleTablePolyfill,
448
- group: consoleGroupPolyfill,
449
- groupEnd: consoleGroupEndPolyfill,
450
- groupCollapsed: consoleGroupCollapsedPolyfill,
451
- assert: consoleAssertPolyfill
452
- };
453
- Object.defineProperty(console, '_isPolyfilled', {
454
- value: true,
455
- enumerable: false
456
- });
457
-
458
- // If available, also call the original `console` method since that is
459
- // sometimes useful. Ex: on OS X, this will let you see rich output in
460
- // the Safari Web Inspector console.
461
- } else if (!global.console) {
462
- var stub = function stub() {};
463
- var log = global.print || stub;
464
- global.console = {
465
- debug: log,
466
- error: log,
467
- info: log,
468
- log: log,
469
- trace: log,
470
- warn: log,
471
- assert: function assert(expression, label) {
472
- if (!expression) {
473
- log('Assertion failed: ' + label);
474
- }
475
- },
476
- clear: stub,
477
- dir: stub,
478
- dirxml: stub,
479
- group: stub,
480
- groupCollapsed: stub,
481
- groupEnd: stub,
482
- profile: stub,
483
- profileEnd: stub,
484
- table: stub
485
- };
486
- Object.defineProperty(console, '_isPolyfilled', {
487
- value: true,
488
- enumerable: false
489
- });
490
- }
491
- })(typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
492
- (function (global) {
493
- /**
494
- * Copyright (c) Meta Platforms, Inc. and affiliates.
495
- *
496
- * This source code is licensed under the MIT license found in the
497
- * LICENSE file in the root directory of this source tree.
498
- *
499
- * @format
500
- *
501
- * @polyfill
502
- */
503
-
504
- var _inGuard = 0;
505
- /**
506
- * This is the error handler that is called when we encounter an exception
507
- * when loading a module. This will report any errors encountered before
508
- * ExceptionsManager is configured.
509
- */
510
- var _globalHandler = function onError(e, isFatal) {
511
- throw e;
512
- };
513
-
514
- /**
515
- * The particular require runtime that we are using looks for a global
516
- * `ErrorUtils` object and if it exists, then it requires modules with the
517
- * error handler specified via ErrorUtils.setGlobalHandler by calling the
518
- * require function with applyWithGuard. Since the require module is loaded
519
- * before any of the modules, this ErrorUtils must be defined (and the handler
520
- * set) globally before requiring anything.
521
- */
522
- var ErrorUtils = {
523
- setGlobalHandler: function setGlobalHandler(fun) {
524
- _globalHandler = fun;
525
- },
526
- getGlobalHandler: function getGlobalHandler() {
527
- return _globalHandler;
528
- },
529
- reportError: function reportError(error) {
530
- _globalHandler && _globalHandler(error, false);
531
- },
532
- reportFatalError: function reportFatalError(error) {
533
- // NOTE: This has an untyped call site in Metro.
534
- _globalHandler && _globalHandler(error, true);
535
- },
536
- applyWithGuard: function applyWithGuard(fun, context, args,
537
- // Unused, but some code synced from www sets it to null.
538
- unused_onError,
539
- // Some callers pass a name here, which we ignore.
540
- unused_name) {
541
- try {
542
- _inGuard++;
543
- /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,
544
- * null) is fine. (2) array -> rest array should work */
545
- /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,
546
- * null) is fine. (2) array -> rest array should work */
547
- return fun.apply(context, args);
548
- } catch (e) {
549
- ErrorUtils.reportError(e);
550
- } finally {
551
- _inGuard--;
552
- }
553
- return null;
554
- },
555
- applyWithGuardIfNeeded: function applyWithGuardIfNeeded(fun, context, args) {
556
- if (ErrorUtils.inGuard()) {
557
- /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,
558
- * null) is fine. (2) array -> rest array should work */
559
- /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,
560
- * null) is fine. (2) array -> rest array should work */
561
- return fun.apply(context, args);
562
- } else {
563
- ErrorUtils.applyWithGuard(fun, context, args);
564
- }
565
- return null;
566
- },
567
- inGuard: function inGuard() {
568
- return !!_inGuard;
569
- },
570
- guard: function guard(fun, name, context) {
571
- var _ref;
572
- // TODO: (moti) T48204753 Make sure this warning is never hit and remove it - types
573
- // should be sufficient.
574
- if (typeof fun !== 'function') {
575
- console.warn('A function must be passed to ErrorUtils.guard, got ', fun);
576
- return null;
577
- }
578
- var guardName = (_ref = name != null ? name : fun.name) != null ? _ref : '<generated guard>';
579
- /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by
580
- * Flow's LTI update could not be added via codemod */
581
- function guarded() {
582
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
583
- args[_key] = arguments[_key];
584
- }
585
- return ErrorUtils.applyWithGuard(fun, context != null ? context : this, args, null, guardName);
586
- }
587
- return guarded;
588
- }
589
- };
590
- global.ErrorUtils = ErrorUtils;
591
- })(typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
592
- (function (global) {
593
- /**
594
- * Copyright (c) Meta Platforms, Inc. and affiliates.
595
- *
596
- * This source code is licensed under the MIT license found in the
597
- * LICENSE file in the root directory of this source tree.
598
- *
599
- * @format
600
- * @polyfill
601
- * @nolint
602
- */
603
-
604
- (function () {
605
- 'use strict';
606
-
607
- var hasOwnProperty = Object.prototype.hasOwnProperty;
608
-
609
- /**
610
- * Returns an array of the given object's own enumerable entries.
611
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
612
- */
613
- if (typeof Object.entries !== 'function') {
614
- Object.entries = function (object) {
615
- // `null` and `undefined` values are not allowed.
616
- if (object == null) {
617
- throw new TypeError('Object.entries called on non-object');
618
- }
619
- var entries = [];
620
- for (var key in object) {
621
- if (hasOwnProperty.call(object, key)) {
622
- entries.push([key, object[key]]);
623
- }
624
- }
625
- return entries;
626
- };
627
- }
628
-
629
- /**
630
- * Returns an array of the given object's own enumerable entries.
631
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values
632
- */
633
- if (typeof Object.values !== 'function') {
634
- Object.values = function (object) {
635
- // `null` and `undefined` values are not allowed.
636
- if (object == null) {
637
- throw new TypeError('Object.values called on non-object');
638
- }
639
- var values = [];
640
- for (var key in object) {
641
- if (hasOwnProperty.call(object, key)) {
642
- values.push(object[key]);
643
- }
644
- }
645
- return values;
646
- };
647
- }
648
- })();
649
- })(typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
650
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
651
- "use strict";
652
-
653
- var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
654
- if (k2 === undefined) k2 = k;
655
- var desc = Object.getOwnPropertyDescriptor(m, k);
656
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
657
- desc = {
658
- enumerable: true,
659
- get: function get() {
660
- return m[k];
661
- }
662
- };
663
- }
664
- Object.defineProperty(o, k2, desc);
665
- } : function (o, m, k, k2) {
666
- if (k2 === undefined) k2 = k;
667
- o[k2] = m[k];
668
- });
669
- var __exportStar = this && this.__exportStar || function (m, exports) {
670
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
671
- };
672
- var __importDefault = this && this.__importDefault || function (mod) {
673
- return mod && mod.__esModule ? mod : {
674
- "default": mod
675
- };
676
- };
677
- Object.defineProperty(exports, "__esModule", {
678
- value: true
679
- });
680
- exports.MediaControlServerComponentAsync = exports.MediaControlComponentAsync = undefined;
681
- Object.defineProperty(exports, "MediaControlComponentAsync", {
682
- enumerable: true,
683
- get: function get() {
684
- return __importDefault(_$$_REQUIRE(_dependencyMap[0])).default;
685
- }
686
- });
687
- Object.defineProperty(exports, "MediaControlServerComponentAsync", {
688
- enumerable: true,
689
- get: function get() {
690
- return _$$_REQUIRE(_dependencyMap[1]).MediaControlServerComponentAsync;
691
- }
692
- });
693
- __exportStar(_$$_REQUIRE(_dependencyMap[2]), exports);
694
- },"50f17b882ad6b57cfe9e",["c3681d89c2db7e0b561a","1392d11b985f9a3487f1","151202f922ff9331c254"]);
695
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
696
- "use strict";
697
-
698
- /*
699
- * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
700
- *
701
- * AMAZON PROPRIETARY/CONFIDENTIAL
702
- *
703
- * You may not use this file except in compliance with the terms and
704
- * conditions set forth in the accompanying LICENSE.TXT file.
705
- *
706
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
707
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
708
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
709
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
710
- */
711
- Object.defineProperty(exports, "__esModule", {
712
- value: true
713
- });
714
- exports.MediaControlComponentAsync = undefined;
715
- /**
716
- * This class is used to obtain an instance of the MediaControlEndpointLocatorAsync class.
717
- */
718
- exports.MediaControlComponentAsync = {
719
- makeMediaControlEndpointLocator: function makeMediaControlEndpointLocator() {
720
- return new (_$$_REQUIRE(_dependencyMap[0]).MediaControlEndpointLocatorAsync)();
721
- }
722
- };
723
- exports.default = exports.MediaControlComponentAsync;
724
- },"c3681d89c2db7e0b561a",["3bd93760e1197049a529"]);
725
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
726
- "use strict";
727
-
728
- /*
729
- * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
730
- *
731
- * AMAZON PROPRIETARY/CONFIDENTIAL
732
- *
733
- * You may not use this file except in compliance with the terms and
734
- * conditions set forth in the accompanying LICENSE.TXT file.
735
- *
736
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
737
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
738
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
739
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
740
- */
741
- var __importDefault = this && this.__importDefault || function (mod) {
742
- return mod && mod.__esModule ? mod : {
743
- "default": mod
744
- };
745
- };
746
- Object.defineProperty(exports, "__esModule", {
747
- value: true
748
- });
749
- exports.MediaControlEndpointLocatorAsync = undefined;
750
- var KeplerMediaControlsClientTM_1 = __importDefault(_$$_REQUIRE(_dependencyMap[0]));
751
- if (KeplerMediaControlsClientTM_1.default === undefined || KeplerMediaControlsClientTM_1.default === null) {
752
- throw new Error('Media Controls Client TurboModule is null');
753
- }
754
- /**
755
- * Class to represent a subscription to a listener from the endpoint locator changes.
756
- * Used to remove a listener.
757
- */
758
- var Subscription = /*#__PURE__*/function () {
759
- function Subscription(token) {
760
- _$$_REQUIRE(_dependencyMap[1])(this, Subscription);
761
- this.token = token;
762
- }
763
- /**
764
- * called to unsubscribe the listener from the endpoint locator changes
765
- */
766
- return _$$_REQUIRE(_dependencyMap[2])(Subscription, [{
767
- key: "unsubscribe",
768
- value: function unsubscribe() {
769
- KeplerMediaControlsClientTM_1.default.removeChangeListener(this.token);
770
- }
771
- }]);
772
- }();
773
- /**
774
- * MediaControlEndpointLocatorAsync class used to locate media control endpoints
775
- */
776
- var MediaControlEndpointLocatorAsync = /*#__PURE__*/function () {
777
- function MediaControlEndpointLocatorAsync() {
778
- _$$_REQUIRE(_dependencyMap[1])(this, MediaControlEndpointLocatorAsync);
779
- }
780
- return _$$_REQUIRE(_dependencyMap[2])(MediaControlEndpointLocatorAsync, [{
781
- key: "getMediaControlEndpoints",
782
- value: (
783
- /**
784
- * Call to obtain a list of media control clients
785
- * @returns @type {Promise} of @type {MediaControlTypes.IMediaControlClientAsync[]} containing
786
- * clients to interact with all available media control endpoints
787
- */
788
- function () {
789
- var _getMediaControlEndpoints = _$$_REQUIRE(_dependencyMap[3])(function* () {
790
- return yield KeplerMediaControlsClientTM_1.default.getMediaControlEndpoints().then(function (endpoints) {
791
- var clients = endpoints.map(function (endpoint) {
792
- return new (_$$_REQUIRE(_dependencyMap[4]).MediaControlClientAsync)(endpoint);
793
- });
794
- return clients;
795
- });
796
- });
797
- function getMediaControlEndpoints() {
798
- return _getMediaControlEndpoints.apply(this, arguments);
799
- }
800
- return getMediaControlEndpoints;
801
- }()
802
- /**
803
- * Subscribes a listener to any changes in the list of control endpoints
804
- * @param listener @type {MediaControlTypes.IMediaControlEndpointLocatorListener}
805
- * @returns @type {Promise} of @type {MediaControlTypes.ISubscription} which can be used
806
- * to remove the listener
807
- */
808
- )
809
- }, {
810
- key: "addChangeListener",
811
- value: (function () {
812
- var _addChangeListener = _$$_REQUIRE(_dependencyMap[3])(function* (listener) {
813
- return yield new Promise(function (resolve) {
814
- KeplerMediaControlsClientTM_1.default.addChangeListener(listener.onEndpointsChanged).then(function (token) {
815
- resolve(new Subscription(token));
816
- }).catch(function (error) {
817
- return error;
818
- });
819
- });
820
- });
821
- function addChangeListener(_x) {
822
- return _addChangeListener.apply(this, arguments);
823
- }
824
- return addChangeListener;
825
- }())
826
- }]);
827
- }();
828
- exports.MediaControlEndpointLocatorAsync = MediaControlEndpointLocatorAsync;
829
- },"3bd93760e1197049a529",["91143ff2955b9a1a861e","3508abd8c6b891008c0d","5533cec96f6a88041c69","ff7d8d645536d793bbec","10f1ad3ac843613ecf5d"]);
830
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
831
- "use strict";
832
-
833
- /*
834
- * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
835
- *
836
- * AMAZON PROPRIETARY/CONFIDENTIAL
837
- *
838
- * You may not use this file except in compliance with the terms and
839
- * conditions set forth in the accompanying LICENSE.TXT file.
840
- *
841
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
842
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
843
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
844
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
845
- */
846
- Object.defineProperty(exports, "__esModule", {
847
- value: true
848
- });
849
- // prettier-ignore
850
- exports.default = _$$_REQUIRE(_dependencyMap[0]).TurboModuleRegistry.getEnforcing('KeplerMediaControlsClientTM');
851
- },"91143ff2955b9a1a861e",["8a35a86b7946c72e0207"]);
852
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
853
- "use strict";
854
-
855
- /**
856
- * Copyright (c) 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
857
- *
858
- * PROPRIETARY/CONFIDENTIAL
859
- *
860
- * Use is subject to license terms.
861
- *
862
- */
863
- Object.defineProperty(exports, "__esModule", {
864
- value: true
865
- });
866
- exports.TurboModuleRegistry = undefined;
867
- exports.TurboModuleRegistry = _$$_REQUIRE(_dependencyMap[0]);
868
- },"8a35a86b7946c72e0207",["33d6b98d6e39f6b0a8f9"]);
869
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
870
- "use strict";
871
-
872
- /**
873
- * Copyright (c) Meta Platforms, Inc. and affiliates.
874
- *
875
- * This source code is licensed under the MIT license found in the
876
- * LICENSE file in the root directory of this source tree.
877
- *
878
- * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its
879
- * affiliates. All rights reserved.
880
- *
881
- * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO
882
- * LICENSE TERMS.
883
- *
884
- * Amazon modifications are indicated by [amznmod_* comments].
885
- */
886
- Object.defineProperty(exports, "__esModule", {
887
- value: true
888
- });
889
- exports.getEnforcing = exports.get = undefined;
890
- var turboModuleProxy = global.__turboModuleProxy;
891
- function requireModule(name) {
892
- if (turboModuleProxy != null) {
893
- return turboModuleProxy(name);
894
- }
895
- return null;
896
- }
897
- function get(name) {
898
- return requireModule(name);
899
- }
900
- exports.get = get;
901
- function getEnforcing(name) {
902
- var module = requireModule(name);
903
- (0, _$$_REQUIRE(_dependencyMap[0]).default)(module != null, `TurboModuleRegistry.getEnforcing(...): '${name}' could not be found. ` + 'Verify that a module by this name is registered in the native binary.');
904
- return module;
905
- }
906
- exports.getEnforcing = getEnforcing;
907
- },"33d6b98d6e39f6b0a8f9",["8d9475a2cb77b53e450d"]);
908
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
909
- /**
910
- * Copyright (c) 2013-present, Facebook, Inc.
911
- *
912
- * This source code is licensed under the MIT license found in the
913
- * LICENSE file in the root directory of this source tree.
914
- *
915
- * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its
916
- * affiliates. All rights reserved.
917
- *
918
- * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO
919
- * LICENSE TERMS.
920
- *
921
- * Amazon modifications are indicated by [amznmod_* comments].
922
- */
923
- /**
924
- * amznmod_tmapi: Migrated to typescript
925
- */
926
- 'use strict';
927
-
928
- Object.defineProperty(exports, "__esModule", {
929
- value: true
930
- });
931
- /**
932
- * Use invariant() to assert state which your program assumes to be true.
933
- *
934
- * Provide sprintf-style format (only %s is supported) and arguments
935
- * to provide information about what broke and what you were
936
- * expecting.
937
- *
938
- * The invariant message will be stripped in production, but the invariant
939
- * will remain to ensure logic does not differ in production.
940
- */
941
- var NODE_ENV = "production";
942
- var invariant = function invariant(condition, format) {
943
- for (var _len = arguments.length, extraArgs = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
944
- extraArgs[_key - 2] = arguments[_key];
945
- }
946
- if (!condition) {
947
- var error;
948
- if (format === undefined) {
949
- error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
950
- } else {
951
- var argIndex = 0;
952
- error = new Error(format.replace(/%s/g, function () {
953
- return extraArgs[argIndex++];
954
- }));
955
- error.name = 'Invariant Violation';
956
- }
957
- // @ts-ignore `framesToPop` is not part of Error type but something Meta (and maybe RN) uses.
958
- error.framesToPop = 1; // we don't care about invariant's own frame
959
- throw error;
960
- }
961
- };
962
- exports.default = invariant;
963
- },"8d9475a2cb77b53e450d",[]);
964
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
965
- function _classCallCheck(a, n) {
966
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
967
- }
968
- module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
969
- },"3508abd8c6b891008c0d",[]);
970
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
971
- function _defineProperties(e, r) {
972
- for (var t = 0; t < r.length; t++) {
973
- var o = r[t];
974
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _$$_REQUIRE(_dependencyMap[0])(o.key), o);
975
- }
976
- }
977
- function _createClass(e, r, t) {
978
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
979
- writable: false
980
- }), e;
981
- }
982
- module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
983
- },"5533cec96f6a88041c69",["a8c8780df4560174ada7"]);
984
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
985
- function toPropertyKey(t) {
986
- var i = _$$_REQUIRE(_dependencyMap[0])(t, "string");
987
- return "symbol" == _$$_REQUIRE(_dependencyMap[1])["default"](i) ? i : i + "";
988
- }
989
- module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
990
- },"a8c8780df4560174ada7",["ffc6df13d33bb305555d","d8362e1f4a4e80eaa9d4"]);
991
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
992
- function toPrimitive(t, r) {
993
- if ("object" != _$$_REQUIRE(_dependencyMap[0])["default"](t) || !t) return t;
994
- var e = t[Symbol.toPrimitive];
995
- if (undefined !== e) {
996
- var i = e.call(t, r || "default");
997
- if ("object" != _$$_REQUIRE(_dependencyMap[0])["default"](i)) return i;
998
- throw new TypeError("@@toPrimitive must return a primitive value.");
999
- }
1000
- return ("string" === r ? String : Number)(t);
1001
- }
1002
- module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
1003
- },"ffc6df13d33bb305555d",["d8362e1f4a4e80eaa9d4"]);
1004
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1005
- function _typeof(o) {
1006
- "@babel/helpers - typeof";
1007
-
1008
- return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
1009
- return typeof o;
1010
- } : function (o) {
1011
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1012
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
1013
- }
1014
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
1015
- },"d8362e1f4a4e80eaa9d4",[]);
1016
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1017
- function asyncGeneratorStep(n, t, e, r, o, a, c) {
1018
- try {
1019
- var i = n[a](c),
1020
- u = i.value;
1021
- } catch (n) {
1022
- return void e(n);
1023
- }
1024
- i.done ? t(u) : Promise.resolve(u).then(r, o);
1025
- }
1026
- function _asyncToGenerator(n) {
1027
- return function () {
1028
- var t = this,
1029
- e = arguments;
1030
- return new Promise(function (r, o) {
1031
- var a = n.apply(t, e);
1032
- function _next(n) {
1033
- asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
1034
- }
1035
- function _throw(n) {
1036
- asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
1037
- }
1038
- _next(undefined);
1039
- });
1040
- };
1041
- }
1042
- module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
1043
- },"ff7d8d645536d793bbec",[]);
1044
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1045
- "use strict";
1046
-
1047
- /*
1048
- * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
1049
- *
1050
- * AMAZON PROPRIETARY/CONFIDENTIAL
1051
- *
1052
- * You may not use this file except in compliance with the terms and
1053
- * conditions set forth in the accompanying LICENSE.TXT file.
1054
- *
1055
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
1056
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
1057
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
1058
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
1059
- */
1060
- var __importDefault = this && this.__importDefault || function (mod) {
1061
- return mod && mod.__esModule ? mod : {
1062
- "default": mod
1063
- };
1064
- };
1065
- Object.defineProperty(exports, "__esModule", {
1066
- value: true
1067
- });
1068
- exports.MediaControlClientAsync = undefined;
1069
- var KeplerMediaControlsClientTM_1 = __importDefault(_$$_REQUIRE(_dependencyMap[0]));
1070
- if (KeplerMediaControlsClientTM_1.default === undefined || KeplerMediaControlsClientTM_1.default === null) {
1071
- throw new Error('Media Controls Client TurboModule is null');
1072
- }
1073
- var EXCEPTION_MAP = {
1074
- 'com.amazon.kepler.media.control.InvalidStateError': _$$_REQUIRE(_dependencyMap[1]).InvalidStateError,
1075
- 'com.amazon.kepler.media.control.NotAllowedError': _$$_REQUIRE(_dependencyMap[1]).NotAllowedError,
1076
- 'com.amazon.kepler.media.control.SpeedOutOfRangeError': _$$_REQUIRE(_dependencyMap[1]).SpeedOutOfRangeError,
1077
- 'com.amazon.kepler.media.control.SeekOutOfRangeError': _$$_REQUIRE(_dependencyMap[1]).SeekOutOfRangeError,
1078
- 'com.amazon.kepler.media.control.NotAvailableError': _$$_REQUIRE(_dependencyMap[1]).NotAvailableError
1079
- };
1080
- var isPromiseResultSuccessful = function isPromiseResultSuccessful(result) {
1081
- var _EXCEPTION_MAP$result;
1082
- if (result.isSuccess === undefined || result.isSuccess === true) {
1083
- return result;
1084
- }
1085
- var MappedError = (_EXCEPTION_MAP$result = EXCEPTION_MAP[result.errorTypes]) != null ? _EXCEPTION_MAP$result : Error;
1086
- throw new MappedError(result.errorMessage);
1087
- };
1088
- /**
1089
- * Class representing a susbscription to changes in a media control endpoint's
1090
- * session states. Used to remove a listener.
1091
- */
1092
- var Subscription = /*#__PURE__*/function () {
1093
- function Subscription(token) {
1094
- _$$_REQUIRE(_dependencyMap[2])(this, Subscription);
1095
- this.token = token;
1096
- }
1097
- /**
1098
- * Called to remove the subscription
1099
- */
1100
- return _$$_REQUIRE(_dependencyMap[3])(Subscription, [{
1101
- key: "unsubscribe",
1102
- value: function unsubscribe() {
1103
- KeplerMediaControlsClientTM_1.default.removeListener(this.token);
1104
- }
1105
- }]);
1106
- }();
1107
- /**
1108
- * Class representing a client for a media control endpoint. This class is used
1109
- * to interact with the media control endpoint and perform various actions such
1110
- * as play, pause, seek, and more.
1111
- */
1112
- var MediaControlClientAsync = /*#__PURE__*/function () {
1113
- function MediaControlClientAsync(client) {
1114
- _$$_REQUIRE(_dependencyMap[2])(this, MediaControlClientAsync);
1115
- this.emptySession = {
1116
- id: NaN
1117
- };
1118
- this.client = client;
1119
- }
1120
- /**
1121
- * Get the package id of this endpoint if any
1122
- * @returns @type {Promise} of @type {MediaControlTypes.IPackageId} the id
1123
- * of the endpoint's package
1124
- */
1125
- return _$$_REQUIRE(_dependencyMap[3])(MediaControlClientAsync, [{
1126
- key: "getEndpointPackageId",
1127
- value: function getEndpointPackageId() {
1128
- return KeplerMediaControlsClientTM_1.default.getEndpointPackageId(this.client.clientId);
1129
- }
1130
- /**
1131
- * Send a play request to this media control endpoint
1132
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1133
- * to send the request for
1134
- * @returns @type {Promise} of @type {void} which resolves on a successful
1135
- * request, and rejects with an error otherwise
1136
- */
1137
- }, {
1138
- key: "play",
1139
- value: (function () {
1140
- var _play = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1141
- return yield KeplerMediaControlsClientTM_1.default.play(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1142
- return isPromiseResultSuccessful(result);
1143
- });
1144
- });
1145
- function play(_x) {
1146
- return _play.apply(this, arguments);
1147
- }
1148
- return play;
1149
- }()
1150
- /**
1151
- * Send a pause request to this media control endpoint
1152
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1153
- * to send the request for
1154
- * @returns @type {Promise} of @type {void} which resolves on a successful
1155
- * request, and rejects with an error otherwise
1156
- */
1157
- )
1158
- }, {
1159
- key: "pause",
1160
- value: (function () {
1161
- var _pause = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1162
- return yield KeplerMediaControlsClientTM_1.default.pause(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1163
- return isPromiseResultSuccessful(result);
1164
- });
1165
- });
1166
- function pause(_x2) {
1167
- return _pause.apply(this, arguments);
1168
- }
1169
- return pause;
1170
- }()
1171
- /**
1172
- * Send a toggle play pause request to this media control endpoint
1173
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1174
- * to send the request for
1175
- * @returns @type {Promise} of @type {void} which resolves on a successful
1176
- * request, and rejects with an error otherwise
1177
- */
1178
- )
1179
- }, {
1180
- key: "togglePlayPause",
1181
- value: (function () {
1182
- var _togglePlayPause = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1183
- return yield KeplerMediaControlsClientTM_1.default.togglePlayPause(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1184
- return isPromiseResultSuccessful(result);
1185
- });
1186
- });
1187
- function togglePlayPause(_x3) {
1188
- return _togglePlayPause.apply(this, arguments);
1189
- }
1190
- return togglePlayPause;
1191
- }()
1192
- /**
1193
- * Send a stop request to this media control endpoint
1194
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1195
- * to send the request for
1196
- * @returns @type {Promise} of @type {void} which resolves on a successful
1197
- * request, and rejects with an error otherwise
1198
- */
1199
- )
1200
- }, {
1201
- key: "stop",
1202
- value: (function () {
1203
- var _stop = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1204
- return yield KeplerMediaControlsClientTM_1.default.stop(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1205
- return isPromiseResultSuccessful(result);
1206
- });
1207
- });
1208
- function stop(_x4) {
1209
- return _stop.apply(this, arguments);
1210
- }
1211
- return stop;
1212
- }()
1213
- /**
1214
- * Send a start over request to this media control endpoint
1215
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1216
- * to send the request for
1217
- * @returns @type {Promise} of @type {void} which resolves on a successful
1218
- * request, and rejects with an error otherwise
1219
- */
1220
- )
1221
- }, {
1222
- key: "startOver",
1223
- value: (function () {
1224
- var _startOver = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1225
- return yield KeplerMediaControlsClientTM_1.default.startOver(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1226
- return isPromiseResultSuccessful(result);
1227
- });
1228
- });
1229
- function startOver(_x5) {
1230
- return _startOver.apply(this, arguments);
1231
- }
1232
- return startOver;
1233
- }()
1234
- /**
1235
- * Send a fast forward request to this media control endpoint
1236
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1237
- * to send the request for
1238
- * @returns @type {Promise} of @type {void} which resolves on a successful
1239
- * request, and rejects with an error otherwise
1240
- */
1241
- )
1242
- }, {
1243
- key: "fastForward",
1244
- value: (function () {
1245
- var _fastForward = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1246
- return yield KeplerMediaControlsClientTM_1.default.fastForward(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1247
- return isPromiseResultSuccessful(result);
1248
- });
1249
- });
1250
- function fastForward(_x6) {
1251
- return _fastForward.apply(this, arguments);
1252
- }
1253
- return fastForward;
1254
- }()
1255
- /**
1256
- * Send a rewind request to this media control endpoint
1257
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1258
- * to send the request for
1259
- * @returns @type {Promise} of @type {void} which resolves on a successful
1260
- * request, and rejects with an error otherwise
1261
- */
1262
- )
1263
- }, {
1264
- key: "rewind",
1265
- value: (function () {
1266
- var _rewind = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1267
- return yield KeplerMediaControlsClientTM_1.default.rewind(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1268
- return isPromiseResultSuccessful(result);
1269
- });
1270
- });
1271
- function rewind(_x7) {
1272
- return _rewind.apply(this, arguments);
1273
- }
1274
- return rewind;
1275
- }()
1276
- /**
1277
- * Send a set playback speed request to this media control endpoint
1278
- * @param speed @type {number} the speed to set the playback to
1279
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1280
- * to send the request for
1281
- * @returns @type {Promise} of @type {void} which resolves on a successful
1282
- * request, and rejects with an error otherwise
1283
- */
1284
- )
1285
- }, {
1286
- key: "setPlaybackSpeed",
1287
- value: (function () {
1288
- var _setPlaybackSpeed = _$$_REQUIRE(_dependencyMap[4])(function* (speed, session) {
1289
- return yield KeplerMediaControlsClientTM_1.default.setPlaybackSpeed(this.client.clientId, speed, session != null ? session : this.emptySession).then(function (result) {
1290
- return isPromiseResultSuccessful(result);
1291
- });
1292
- });
1293
- function setPlaybackSpeed(_x8, _x9) {
1294
- return _setPlaybackSpeed.apply(this, arguments);
1295
- }
1296
- return setPlaybackSpeed;
1297
- }()
1298
- /**
1299
- * Send a skip forward request to this media control endpoint
1300
- * @param delta @type {MediaControlTypes.ITimeValue} the delta to skip forward by
1301
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1302
- * to send the request for
1303
- * @returns @type {Promise} of @type {void} which resolves on a successful
1304
- * request, and rejects with an error otherwise
1305
- */
1306
- )
1307
- }, {
1308
- key: "skipForward",
1309
- value: (function () {
1310
- var _skipForward = _$$_REQUIRE(_dependencyMap[4])(function* (delta, session) {
1311
- return yield KeplerMediaControlsClientTM_1.default.skipForward(this.client.clientId, delta, session != null ? session : this.emptySession).then(function (result) {
1312
- return isPromiseResultSuccessful(result);
1313
- });
1314
- });
1315
- function skipForward(_x10, _x11) {
1316
- return _skipForward.apply(this, arguments);
1317
- }
1318
- return skipForward;
1319
- }()
1320
- /**
1321
- * Send a skip backward request to this media control endpoint
1322
- * @param delta @type {MediaControlTypes.ITimeValue} the delta to skip backward by
1323
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1324
- * to send the request for
1325
- * @returns @type {Promise} of @type {void} which resolves on a successful
1326
- * request, and rejects with an error otherwise
1327
- */
1328
- )
1329
- }, {
1330
- key: "skipBackward",
1331
- value: (function () {
1332
- var _skipBackward = _$$_REQUIRE(_dependencyMap[4])(function* (delta, session) {
1333
- return yield KeplerMediaControlsClientTM_1.default.skipBackward(this.client.clientId, delta, session != null ? session : this.emptySession).then(function (result) {
1334
- return isPromiseResultSuccessful(result);
1335
- });
1336
- });
1337
- function skipBackward(_x12, _x13) {
1338
- return _skipBackward.apply(this, arguments);
1339
- }
1340
- return skipBackward;
1341
- }()
1342
- /**
1343
- * Send a seek request to this media control endpoint
1344
- * @param position @type {MediaControlTypes.ITimeValue} the position to seek to
1345
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1346
- * to send the request for
1347
- * @returns @type {Promise} of @type {void} which resolves on a successful
1348
- * request, and rejects with an error otherwise
1349
- */
1350
- )
1351
- }, {
1352
- key: "seek",
1353
- value: (function () {
1354
- var _seek = _$$_REQUIRE(_dependencyMap[4])(function* (position, session) {
1355
- return yield KeplerMediaControlsClientTM_1.default.seek(this.client.clientId, position, session != null ? session : this.emptySession).then(function (result) {
1356
- return isPromiseResultSuccessful(result);
1357
- });
1358
- });
1359
- function seek(_x14, _x15) {
1360
- return _seek.apply(this, arguments);
1361
- }
1362
- return seek;
1363
- }()
1364
- /**
1365
- * Send a set audio volume request to this media control endpoint
1366
- * @param volume @type {number} the volume to set the audio to
1367
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1368
- * to send the request for
1369
- * @returns @type {Promise} of @type {void} which resolves on a successful
1370
- * request, and rejects with an error otherwise
1371
- */
1372
- )
1373
- }, {
1374
- key: "setAudioVolume",
1375
- value: (function () {
1376
- var _setAudioVolume = _$$_REQUIRE(_dependencyMap[4])(function* (volume, session) {
1377
- return yield KeplerMediaControlsClientTM_1.default.setAudioVolume(this.client.clientId, volume, session != null ? session : this.emptySession).then(function (result) {
1378
- return isPromiseResultSuccessful(result);
1379
- });
1380
- });
1381
- function setAudioVolume(_x16, _x17) {
1382
- return _setAudioVolume.apply(this, arguments);
1383
- }
1384
- return setAudioVolume;
1385
- }()
1386
- /**
1387
- * Send a set audio track request to this media control endpoint
1388
- * @param audioTrack @type {MediaControlTypes.ITrack} the audio track to set
1389
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1390
- * to send the request for
1391
- * @returns @type {Promise} of @type {void} which resolves on a successful
1392
- * request, and rejects with an error otherwise
1393
- */
1394
- )
1395
- }, {
1396
- key: "setAudioTrack",
1397
- value: (function () {
1398
- var _setAudioTrack = _$$_REQUIRE(_dependencyMap[4])(function* (audioTrack, session) {
1399
- return yield KeplerMediaControlsClientTM_1.default.setAudioTrack(this.client.clientId, audioTrack, session != null ? session : this.emptySession).then(function (result) {
1400
- return isPromiseResultSuccessful(result);
1401
- });
1402
- });
1403
- function setAudioTrack(_x18, _x19) {
1404
- return _setAudioTrack.apply(this, arguments);
1405
- }
1406
- return setAudioTrack;
1407
- }()
1408
- /**
1409
- * Send an enable text track request to this media control endpoint
1410
- * @param textTrack @type {MediaControlTypes.ITrack} the text track to enable
1411
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1412
- * to send the request for
1413
- * @returns @type {Promise} of @type {void} which resolves on a successful
1414
- * request, and rejects with an error otherwise
1415
- */
1416
- )
1417
- }, {
1418
- key: "enableTextTrack",
1419
- value: (function () {
1420
- var _enableTextTrack = _$$_REQUIRE(_dependencyMap[4])(function* (textTrack, session) {
1421
- return yield KeplerMediaControlsClientTM_1.default.enableTextTrack(this.client.clientId, textTrack, session != null ? session : this.emptySession).then(function (result) {
1422
- return isPromiseResultSuccessful(result);
1423
- });
1424
- });
1425
- function enableTextTrack(_x20, _x21) {
1426
- return _enableTextTrack.apply(this, arguments);
1427
- }
1428
- return enableTextTrack;
1429
- }()
1430
- /**
1431
- * Send a disable text track request to this media control endpoint
1432
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1433
- * to send the request for
1434
- * @returns @type {Promise} of @type {void} which resolves on a successful
1435
- * request, and rejects with an error otherwise
1436
- */
1437
- )
1438
- }, {
1439
- key: "disableTextTrack",
1440
- value: (function () {
1441
- var _disableTextTrack = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1442
- return yield KeplerMediaControlsClientTM_1.default.disableTextTrack(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1443
- return isPromiseResultSuccessful(result);
1444
- });
1445
- });
1446
- function disableTextTrack(_x22) {
1447
- return _disableTextTrack.apply(this, arguments);
1448
- }
1449
- return disableTextTrack;
1450
- }()
1451
- /**
1452
- * Send a next request to this media control endpoint
1453
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1454
- * to send the request for
1455
- * @returns @type {Promise} of @type {void} which resolves on a successful
1456
- * request, and rejects with an error otherwise
1457
- */
1458
- )
1459
- }, {
1460
- key: "next",
1461
- value: (function () {
1462
- var _next = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1463
- return yield KeplerMediaControlsClientTM_1.default.next(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1464
- return isPromiseResultSuccessful(result);
1465
- });
1466
- });
1467
- function next(_x23) {
1468
- return _next.apply(this, arguments);
1469
- }
1470
- return next;
1471
- }()
1472
- /**
1473
- * Send a previous request to this media control endpoint
1474
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1475
- * to send the request for
1476
- * @returns @type {Promise} of @type {void} which resolves on a successful
1477
- * request, and rejects with an error otherwise
1478
- */
1479
- )
1480
- }, {
1481
- key: "previous",
1482
- value: (function () {
1483
- var _previous = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1484
- return yield KeplerMediaControlsClientTM_1.default.previous(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1485
- return isPromiseResultSuccessful(result);
1486
- });
1487
- });
1488
- function previous(_x24) {
1489
- return _previous.apply(this, arguments);
1490
- }
1491
- return previous;
1492
- }()
1493
- /**
1494
- * Send an enable shuffle request to this media control endpoint
1495
- * @param enable @type {boolean} whether to enable or disable shuffle
1496
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1497
- * to send the request for
1498
- * @returns @type {Promise} of @type {void} which resolves on a successful
1499
- * request, and rejects with an error otherwise
1500
- */
1501
- )
1502
- }, {
1503
- key: "enableShuffle",
1504
- value: (function () {
1505
- var _enableShuffle = _$$_REQUIRE(_dependencyMap[4])(function* (enable, session) {
1506
- return yield KeplerMediaControlsClientTM_1.default.enableShuffle(this.client.clientId, enable, session != null ? session : this.emptySession).then(function (result) {
1507
- return isPromiseResultSuccessful(result);
1508
- });
1509
- });
1510
- function enableShuffle(_x25, _x26) {
1511
- return _enableShuffle.apply(this, arguments);
1512
- }
1513
- return enableShuffle;
1514
- }()
1515
- /**
1516
- * Send a set repeat mode request to this media control endpoint
1517
- * @param mode @type {MediaControlTypes.RepeatMode} the repeat mode to set
1518
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1519
- * to send the request for
1520
- * @returns @type {Promise} of @type {void} which resolves on a successful
1521
- * request, and rejects with an error otherwise
1522
- */
1523
- )
1524
- }, {
1525
- key: "setRepeatMode",
1526
- value: (function () {
1527
- var _setRepeatMode = _$$_REQUIRE(_dependencyMap[4])(function* (mode, session) {
1528
- return yield KeplerMediaControlsClientTM_1.default.setRepeatMode(this.client.clientId, mode, session != null ? session : this.emptySession).then(function (result) {
1529
- return isPromiseResultSuccessful(result);
1530
- });
1531
- });
1532
- function setRepeatMode(_x27, _x28) {
1533
- return _setRepeatMode.apply(this, arguments);
1534
- }
1535
- return setRepeatMode;
1536
- }()
1537
- /**
1538
- * Send a set rating request to this media control endpoint
1539
- * @param id @type {MediaId} the media id to set the rating for
1540
- * @param rating @type {number} the rating to set
1541
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1542
- * to send the request for
1543
- * @returns @type {Promise} of @type {void} which resolves on a successful
1544
- * request, and rejects with an error otherwise
1545
- */
1546
- )
1547
- }, {
1548
- key: "setRating",
1549
- value: (function () {
1550
- var _setRating = _$$_REQUIRE(_dependencyMap[4])(function* (id, rating, session) {
1551
- return yield KeplerMediaControlsClientTM_1.default.setRating(this.client.clientId, id, rating, session != null ? session : this.emptySession).then(function (result) {
1552
- return isPromiseResultSuccessful(result);
1553
- });
1554
- });
1555
- function setRating(_x29, _x30, _x31) {
1556
- return _setRating.apply(this, arguments);
1557
- }
1558
- return setRating;
1559
- }()
1560
- /**
1561
- * Send a get metadata request to this media control endpoint
1562
- * @param id @type {MediaId} the media id to get the metadata for
1563
- * @returns @type {Promise} of @type {MediaControlTypes.IMediaMetadat} which resolves with
1564
- * the metadata on a successful request and rejects with an error otherwise
1565
- */
1566
- )
1567
- }, {
1568
- key: "getMetadata",
1569
- value: (function () {
1570
- var _getMetadata = _$$_REQUIRE(_dependencyMap[4])(function* (id) {
1571
- return yield KeplerMediaControlsClientTM_1.default.getMetadata(this.client.clientId, id);
1572
- });
1573
- function getMetadata(_x32) {
1574
- return _getMetadata.apply(this, arguments);
1575
- }
1576
- return getMetadata;
1577
- }()
1578
- /**
1579
- * Send a start over request to this media control endpoint
1580
- * @param action @type {MediaControlTypes.Action} the action to send
1581
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1582
- * to send the request for
1583
- * @returns @type {Promise} of @type {void} which resolves on a successful
1584
- * request, and rejects with an error otherwise
1585
- */
1586
- )
1587
- }, {
1588
- key: "sendCustomAction",
1589
- value: (function () {
1590
- var _sendCustomAction = _$$_REQUIRE(_dependencyMap[4])(function* (action, session) {
1591
- return yield KeplerMediaControlsClientTM_1.default.sendCustomAction(this.client.clientId, action, session != null ? session : this.emptySession).then(function (result) {
1592
- return isPromiseResultSuccessful(result);
1593
- });
1594
- });
1595
- function sendCustomAction(_x33, _x34) {
1596
- return _sendCustomAction.apply(this, arguments);
1597
- }
1598
- return sendCustomAction;
1599
- }()
1600
- /**
1601
- * Get the session state for this media control endpoint
1602
- * @param session @type {MediaControlTypes.IMediaSessionId} the session id
1603
- * to get the session state for. Leave null to retrieve states for all active sessions
1604
- * @returns @type {Promise} of @type {MediaControlTypes.MediaSessionState[]} which resolves with
1605
- * a list of session states on a successful request and rejects with an error otherwise
1606
- */
1607
- )
1608
- }, {
1609
- key: "getSessionState",
1610
- value: (function () {
1611
- var _getSessionState = _$$_REQUIRE(_dependencyMap[4])(function* (session) {
1612
- return yield KeplerMediaControlsClientTM_1.default.getSessionState(this.client.clientId, session != null ? session : this.emptySession).then(function (result) {
1613
- return isPromiseResultSuccessful(result);
1614
- });
1615
- });
1616
- function getSessionState(_x35) {
1617
- return _getSessionState.apply(this, arguments);
1618
- }
1619
- return getSessionState;
1620
- }()
1621
- /**
1622
- * Add a listener to this media control endpoint
1623
- * @param listener @type {MediaControlTypes.IMediaControlListener} the listener to add
1624
- * @returns @type {Promise} of @type {MediaControlTypes.ISubscription} which resolves with
1625
- * a subscription object on a successful request and rejects with an error otherwise
1626
- */
1627
- )
1628
- }, {
1629
- key: "addListener",
1630
- value: (function () {
1631
- var _addListener = _$$_REQUIRE(_dependencyMap[4])(function* (listener) {
1632
- return yield KeplerMediaControlsClientTM_1.default.addListener(this.client.clientId, listener.onStateChanged).then(function (token) {
1633
- return new Subscription(token);
1634
- });
1635
- });
1636
- function addListener(_x36) {
1637
- return _addListener.apply(this, arguments);
1638
- }
1639
- return addListener;
1640
- }()
1641
- /**
1642
- * Destroy this media control endpoint, releasing all assigned listeners.
1643
- * Must be called if a listener was added.
1644
- */
1645
- )
1646
- }, {
1647
- key: "destroy",
1648
- value: function destroy() {
1649
- KeplerMediaControlsClientTM_1.default.destroy(this.client.clientId);
1650
- }
1651
- }]);
1652
- }();
1653
- exports.MediaControlClientAsync = MediaControlClientAsync;
1654
- },"10f1ad3ac843613ecf5d",["91143ff2955b9a1a861e","6fdfb04c7ae618493e91","3508abd8c6b891008c0d","5533cec96f6a88041c69","ff7d8d645536d793bbec"]);
1655
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1656
- "use strict";
1657
-
1658
- /*
1659
- * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
1660
- *
1661
- * AMAZON PROPRIETARY/CONFIDENTIAL
1662
- *
1663
- * You may not use this file except in compliance with the terms and
1664
- * conditions set forth in the accompanying LICENSE.TXT file.
1665
- *
1666
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
1667
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
1668
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
1669
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
1670
- */
1671
- var _Action;
1672
- function _callSuper(t, o, e) { return o = _$$_REQUIRE(_dependencyMap[0])(o), _$$_REQUIRE(_dependencyMap[1])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _$$_REQUIRE(_dependencyMap[0])(t).constructor) : o.apply(t, e)); }
1673
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1674
- Object.defineProperty(exports, "__esModule", {
1675
- value: true
1676
- });
1677
- exports.NotAvailableError = exports.SeekOutOfRangeError = exports.SpeedOutOfRangeError = exports.NotAllowedError = exports.InvalidStateError = exports.CommandSource = exports.RadioBand = exports.RepeatMode = exports.Action = exports.PlaybackStatus = undefined;
1678
- /**
1679
- * Specifies the playback status.
1680
- */
1681
- var PlaybackStatus;
1682
- (function (PlaybackStatus) {
1683
- /* The media player is currently playing. */
1684
- PlaybackStatus["PLAYING"] = "PLAYING";
1685
- /* Playback is paused. */
1686
- PlaybackStatus["PAUSED"] = "PAUSED";
1687
- /* There is no playback in process. */
1688
- PlaybackStatus["NOT_PLAYING"] = "NOT_PLAYING";
1689
- /* Playback is buffering. */
1690
- PlaybackStatus["BUFFERING"] = "BUFFERING";
1691
- })(PlaybackStatus = exports.PlaybackStatus || (exports.PlaybackStatus = {}));
1692
- /**
1693
- * Represents the actions that you can invoke using the media control client.
1694
- */
1695
- var Action = /*#__PURE__*/_$$_REQUIRE(_dependencyMap[2])(function Action(name) {
1696
- _$$_REQUIRE(_dependencyMap[3])(this, Action);
1697
- this.name = name;
1698
- });
1699
- _Action = Action;
1700
- Action.PLAY = new _Action('PLAY');
1701
- Action.PAUSE = new _Action('PAUSE');
1702
- Action.TOGGLE_PLAY_PAUSE = new _Action('TOGGLE_PLAY_PAUSE');
1703
- Action.STOP = new _Action('STOP');
1704
- Action.START_OVER = new _Action('START_OVER');
1705
- Action.FAST_FORWARD = new _Action('FAST_FORWARD');
1706
- Action.REWIND = new _Action('REWIND');
1707
- Action.SET_PLAYBACK_SPEED = new _Action('SET_PLAYBACK_SPEED');
1708
- Action.SKIP_FORWARD = new _Action('SKIP_FORWARD');
1709
- Action.SKIP_BACKWARD = new _Action('SKIP_BACKWARD');
1710
- Action.SEEK = new _Action('SEEK');
1711
- Action.SET_AUDIO_VOLUME = new _Action('SET_AUDIO_VOLUME');
1712
- Action.SET_AUDIO_TRACK = new _Action('SET_AUDIO_TRACK');
1713
- Action.ENABLE_TEXT_TRACK = new _Action('ENABLE_TEXT_TRACK');
1714
- Action.DISBLE_TEXT_TRACK = new _Action('DISABLE_TEXT_TRACK');
1715
- Action.NEXT = new _Action('NEXT');
1716
- Action.PREVIOUS = new _Action('PREVIOUS');
1717
- Action.ENABLE_SHUFFLE = new _Action('ENABLE_SHUFFLE');
1718
- Action.SET_REPEAT_MODE = new _Action('SET_REPEAT_MODE');
1719
- Action.SET_RATING = new _Action('SET_RATING');
1720
- Action.GET_META_DATA = new _Action('GET_META_DATA');
1721
- exports.Action = Action;
1722
- /**
1723
- * Specifies the repeat mode for the media player.
1724
- */
1725
- var RepeatMode;
1726
- (function (RepeatMode) {
1727
- /* Disable repeat mode. */
1728
- RepeatMode[RepeatMode["OFF"] = 0] = "OFF";
1729
- /* Repeat the current track. */
1730
- RepeatMode[RepeatMode["REPEAT_TRACK"] = 1] = "REPEAT_TRACK";
1731
- /* Repeat the current playlist. */
1732
- RepeatMode[RepeatMode["REPEAT_PLAYLIST"] = 2] = "REPEAT_PLAYLIST";
1733
- })(RepeatMode = exports.RepeatMode || (exports.RepeatMode = {}));
1734
- /**
1735
- * Specifies the radio band for the media player.
1736
- */
1737
- var RadioBand;
1738
- (function (RadioBand) {
1739
- /* No radio band selected. */
1740
- RadioBand["NONE"] = "NONE";
1741
- /* The radio band is unknown. */
1742
- RadioBand["UNKNOWN"] = "UNKNOWN";
1743
- /* Specifies the AM band. */
1744
- RadioBand["AM"] = "AM";
1745
- /* Specifies the FM band. */
1746
- RadioBand["FM"] = "FM";
1747
- /* Specifies the DAB band. */
1748
- RadioBand["DAB"] = "DAB";
1749
- })(RadioBand = exports.RadioBand || (exports.RadioBand = {}));
1750
- /**
1751
- * Specifies the source of the media command.
1752
- */
1753
- var CommandSource;
1754
- (function (CommandSource) {
1755
- /* Command was initiated by the system in response to the display being turned off. */
1756
- CommandSource["SYSTEM_DISPLAY_OFF"] = "SYSTEM_DISPLAY_OFF";
1757
- /* Command was initiated by the user, e.g., from a voice command */
1758
- CommandSource["USER"] = "USER";
1759
- /* Command was initiated by neither the user nor the system when display is turned off. */
1760
- CommandSource["OTHER"] = "OTHER";
1761
- })(CommandSource = exports.CommandSource || (exports.CommandSource = {}));
1762
- /**
1763
- * Error occurs when a request cannot be processed due to being in the
1764
- * wrong state to process it.
1765
- */
1766
- var InvalidStateError = /*#__PURE__*/function (_Error) {
1767
- function InvalidStateError(message) {
1768
- var _this;
1769
- _$$_REQUIRE(_dependencyMap[3])(this, InvalidStateError);
1770
- _this = _callSuper(this, InvalidStateError, [message]);
1771
- _this.name = 'InvalidStateError';
1772
- return _this;
1773
- }
1774
- _$$_REQUIRE(_dependencyMap[4])(InvalidStateError, _Error);
1775
- return _$$_REQUIRE(_dependencyMap[2])(InvalidStateError);
1776
- }(/*#__PURE__*/_$$_REQUIRE(_dependencyMap[5])(Error));
1777
- exports.InvalidStateError = InvalidStateError;
1778
- /**
1779
- * Error occurs when a request cannot be handled.
1780
- */
1781
- var NotAllowedError = /*#__PURE__*/function (_Error2) {
1782
- function NotAllowedError(message) {
1783
- var _this2;
1784
- _$$_REQUIRE(_dependencyMap[3])(this, NotAllowedError);
1785
- _this2 = _callSuper(this, NotAllowedError, [message]);
1786
- _this2.name = 'NotAllowedError';
1787
- return _this2;
1788
- }
1789
- _$$_REQUIRE(_dependencyMap[4])(NotAllowedError, _Error2);
1790
- return _$$_REQUIRE(_dependencyMap[2])(NotAllowedError);
1791
- }(/*#__PURE__*/_$$_REQUIRE(_dependencyMap[5])(Error));
1792
- exports.NotAllowedError = NotAllowedError;
1793
- /**
1794
- * Error occurs when the requested playback speed is not supported.
1795
- */
1796
- var SpeedOutOfRangeError = /*#__PURE__*/function (_Error3) {
1797
- function SpeedOutOfRangeError(message) {
1798
- var _this3;
1799
- _$$_REQUIRE(_dependencyMap[3])(this, SpeedOutOfRangeError);
1800
- _this3 = _callSuper(this, SpeedOutOfRangeError, [message]);
1801
- _this3.name = 'SpeedOutOfRangeError';
1802
- return _this3;
1803
- }
1804
- _$$_REQUIRE(_dependencyMap[4])(SpeedOutOfRangeError, _Error3);
1805
- return _$$_REQUIRE(_dependencyMap[2])(SpeedOutOfRangeError);
1806
- }(/*#__PURE__*/_$$_REQUIRE(_dependencyMap[5])(Error));
1807
- exports.SpeedOutOfRangeError = SpeedOutOfRangeError;
1808
- /**
1809
- * Error occurs when the requested seek position is out of the advertised range.
1810
- */
1811
- var SeekOutOfRangeError = /*#__PURE__*/function (_Error4) {
1812
- function SeekOutOfRangeError(message) {
1813
- var _this4;
1814
- _$$_REQUIRE(_dependencyMap[3])(this, SeekOutOfRangeError);
1815
- _this4 = _callSuper(this, SeekOutOfRangeError, [message]);
1816
- _this4.name = 'SeekOutOfRangeError';
1817
- return _this4;
1818
- }
1819
- _$$_REQUIRE(_dependencyMap[4])(SeekOutOfRangeError, _Error4);
1820
- return _$$_REQUIRE(_dependencyMap[2])(SeekOutOfRangeError);
1821
- }(/*#__PURE__*/_$$_REQUIRE(_dependencyMap[5])(Error));
1822
- exports.SeekOutOfRangeError = SeekOutOfRangeError;
1823
- /**
1824
- * Error occurs when requested data is not available.
1825
- */
1826
- var NotAvailableError = /*#__PURE__*/function (_Error5) {
1827
- function NotAvailableError(message) {
1828
- var _this5;
1829
- _$$_REQUIRE(_dependencyMap[3])(this, NotAvailableError);
1830
- _this5 = _callSuper(this, NotAvailableError, [message]);
1831
- _this5.name = 'NotAvailableError';
1832
- return _this5;
1833
- }
1834
- _$$_REQUIRE(_dependencyMap[4])(NotAvailableError, _Error5);
1835
- return _$$_REQUIRE(_dependencyMap[2])(NotAvailableError);
1836
- }(/*#__PURE__*/_$$_REQUIRE(_dependencyMap[5])(Error));
1837
- exports.NotAvailableError = NotAvailableError;
1838
- },"6fdfb04c7ae618493e91",["f391b9d534c3a6bc8659","4534eb96ece5e83c089a","5533cec96f6a88041c69","3508abd8c6b891008c0d","73afcd34a88a750f6d69","c577b02e1e09b9cd815b"]);
1839
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1840
- function _getPrototypeOf(t) {
1841
- return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
1842
- return t.__proto__ || Object.getPrototypeOf(t);
1843
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t);
1844
- }
1845
- module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
1846
- },"f391b9d534c3a6bc8659",[]);
1847
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1848
- function _possibleConstructorReturn(t, e) {
1849
- if (e && ("object" == _$$_REQUIRE(_dependencyMap[0])["default"](e) || "function" == typeof e)) return e;
1850
- if (undefined !== e) throw new TypeError("Derived constructors may only return object or undefined");
1851
- return _$$_REQUIRE(_dependencyMap[1])(t);
1852
- }
1853
- module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
1854
- },"4534eb96ece5e83c089a",["d8362e1f4a4e80eaa9d4","3711e54376de5c9b9466"]);
1855
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1856
- function _assertThisInitialized(e) {
1857
- if (undefined === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1858
- return e;
1859
- }
1860
- module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
1861
- },"3711e54376de5c9b9466",[]);
1862
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1863
- function _inherits(t, e) {
1864
- if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
1865
- t.prototype = Object.create(e && e.prototype, {
1866
- constructor: {
1867
- value: t,
1868
- writable: true,
1869
- configurable: true
1870
- }
1871
- }), Object.defineProperty(t, "prototype", {
1872
- writable: false
1873
- }), e && _$$_REQUIRE(_dependencyMap[0])(t, e);
1874
- }
1875
- module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
1876
- },"73afcd34a88a750f6d69",["412b42f29118fbec0d03"]);
1877
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1878
- function _setPrototypeOf(t, e) {
1879
- return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
1880
- return t.__proto__ = e, t;
1881
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);
1882
- }
1883
- module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
1884
- },"412b42f29118fbec0d03",[]);
1885
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1886
- function _wrapNativeSuper(t) {
1887
- var r = "function" == typeof Map ? new Map() : undefined;
1888
- return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) {
1889
- if (null === t || !_$$_REQUIRE(_dependencyMap[0])(t)) return t;
1890
- if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
1891
- if (undefined !== r) {
1892
- if (r.has(t)) return r.get(t);
1893
- r.set(t, Wrapper);
1894
- }
1895
- function Wrapper() {
1896
- return _$$_REQUIRE(_dependencyMap[1])(t, arguments, _$$_REQUIRE(_dependencyMap[2])(this).constructor);
1897
- }
1898
- return Wrapper.prototype = Object.create(t.prototype, {
1899
- constructor: {
1900
- value: Wrapper,
1901
- enumerable: false,
1902
- writable: true,
1903
- configurable: true
1904
- }
1905
- }), _$$_REQUIRE(_dependencyMap[3])(Wrapper, t);
1906
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t);
1907
- }
1908
- module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
1909
- },"c577b02e1e09b9cd815b",["027ec73415f080702349","980562e5188f0e886758","f391b9d534c3a6bc8659","412b42f29118fbec0d03"]);
1910
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1911
- function _isNativeFunction(t) {
1912
- try {
1913
- return -1 !== Function.toString.call(t).indexOf("[native code]");
1914
- } catch (n) {
1915
- return "function" == typeof t;
1916
- }
1917
- }
1918
- module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
1919
- },"027ec73415f080702349",[]);
1920
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1921
- function _construct(t, e, r) {
1922
- if (_$$_REQUIRE(_dependencyMap[0])()) return Reflect.construct.apply(null, arguments);
1923
- var o = [null];
1924
- o.push.apply(o, e);
1925
- var p = new (t.bind.apply(t, o))();
1926
- return r && _$$_REQUIRE(_dependencyMap[1])(p, r.prototype), p;
1927
- }
1928
- module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
1929
- },"980562e5188f0e886758",["d5efa6dd0bb9d4bf9bb4","412b42f29118fbec0d03"]);
1930
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1931
- function _isNativeReflectConstruct() {
1932
- try {
1933
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
1934
- } catch (t) {}
1935
- return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
1936
- return !!t;
1937
- }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
1938
- }
1939
- module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
1940
- },"d5efa6dd0bb9d4bf9bb4",[]);
1941
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1942
- "use strict";
1943
-
1944
- /*
1945
- * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
1946
- *
1947
- * AMAZON PROPRIETARY/CONFIDENTIAL
1948
- *
1949
- * You may not use this file except in compliance with the terms and
1950
- * conditions set forth in the accompanying LICENSE.TXT file.
1951
- *
1952
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
1953
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
1954
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
1955
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
1956
- */
1957
- Object.defineProperty(exports, "__esModule", {
1958
- value: true
1959
- });
1960
- exports.MediaControlServerComponentAsync = undefined;
1961
- var server;
1962
- exports.MediaControlServerComponentAsync = {
1963
- /**
1964
- * Makes or returns the MediaControlServer singleton
1965
- */
1966
- getOrMakeServer: function getOrMakeServer() {
1967
- if (server === undefined || server === null) {
1968
- server = new (_$$_REQUIRE(_dependencyMap[0]).MediaControlServer)();
1969
- }
1970
- return server;
1971
- }
1972
- };
1973
- },"1392d11b985f9a3487f1",["313ad127e2a045b81b6e"]);
1974
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1975
- "use strict";
1976
-
1977
- /*
1978
- * Copyright 2024-2025 Amazon.com, Inc. or its affiliates. All rights reserved.
1979
- *
1980
- * AMAZON PROPRIETARY/CONFIDENTIAL
1981
- *
1982
- * You may not use this file except in compliance with the terms and
1983
- * conditions set forth in the accompanying LICENSE.TXT file.
1984
- *
1985
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
1986
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
1987
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
1988
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
1989
- */
1990
- var __importDefault = this && this.__importDefault || function (mod) {
1991
- return mod && mod.__esModule ? mod : {
1992
- "default": mod
1993
- };
1994
- };
1995
- Object.defineProperty(exports, "__esModule", {
1996
- value: true
1997
- });
1998
- exports.MediaControlServer = undefined;
1999
- var KeplerMediaControlsServerTM_1 = __importDefault(_$$_REQUIRE(_dependencyMap[0]));
2000
- if (KeplerMediaControlsServerTM_1.default === undefined || KeplerMediaControlsServerTM_1.default === null) {
2001
- throw new Error('Media Controls TurboModule is null');
2002
- }
2003
- function normalizeError(error) {
2004
- if (error instanceof Error) {
2005
- return {
2006
- type: error.name,
2007
- message: error.message
2008
- };
2009
- }
2010
- return {
2011
- type: 'BaseError',
2012
- message: 'Call rejected'
2013
- };
2014
- }
2015
- /**
2016
- * The entry point for KMC server side APIs. Provides the ability to register handlers
2017
- * and update media session states
2018
- */
2019
- var MediaControlServer = /*#__PURE__*/function () {
2020
- function MediaControlServer() {
2021
- _$$_REQUIRE(_dependencyMap[1])(this, MediaControlServer);
2022
- }
2023
- return _$$_REQUIRE(_dependencyMap[2])(MediaControlServer, [{
2024
- key: "setHandlerForComponent",
2025
- value:
2026
- /**
2027
- * Set the event handlers associated with the provided component
2028
- * @param handler @type {KeplerMediaControlsTypes.IMediaControlHandlerAsync} Object containing
2029
- * the event handlers
2030
- * @param componentInstance @type {IComponentInstance} The component instance for which
2031
- * the handlers are being set
2032
- */
2033
- function setHandlerForComponent(handler, componentInstance) {
2034
- KeplerMediaControlsServerTM_1.default.setHandlerForComponent(componentInstance, function (transactionId, sessionId) {
2035
- handler.handlePlay(sessionId).then(function () {
2036
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2037
- }).catch(function (reason) {
2038
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2039
- });
2040
- }, function (transactionId, context, sessionId) {
2041
- handler.handlePause(sessionId, context).then(function () {
2042
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2043
- }).catch(function (reason) {
2044
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2045
- });
2046
- }, function (transactionId, sessionId) {
2047
- handler.handleTogglePlayPause(sessionId).then(function () {
2048
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2049
- }).catch(function (reason) {
2050
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2051
- });
2052
- }, function (transactionId, sessionId) {
2053
- handler.handleStop(sessionId).then(function () {
2054
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2055
- }).catch(function (reason) {
2056
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2057
- });
2058
- }, function (transactionId, sessionId) {
2059
- handler.handleStartOver(sessionId).then(function () {
2060
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2061
- }).catch(function (reason) {
2062
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2063
- });
2064
- }, function (transactionId, sessionId) {
2065
- handler.handleFastForward(sessionId).then(function () {
2066
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2067
- }).catch(function (reason) {
2068
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2069
- });
2070
- }, function (transactionId, sessionId) {
2071
- handler.handleRewind(sessionId).then(function () {
2072
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2073
- }).catch(function (reason) {
2074
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2075
- });
2076
- }, function (transactionId, speed, sessionId) {
2077
- handler.handleSetPlaybackSpeed(speed, sessionId).then(function () {
2078
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2079
- }).catch(function (reason) {
2080
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2081
- });
2082
- }, function (transactionId, delta, sessionId) {
2083
- handler.handleSkipForward(delta, sessionId).then(function () {
2084
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2085
- }).catch(function (reason) {
2086
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2087
- });
2088
- }, function (transactionId, delta, sessionId) {
2089
- handler.handleSkipBackward(delta, sessionId).then(function () {
2090
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2091
- }).catch(function (reason) {
2092
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2093
- });
2094
- }, function (transactionId, position, sessionId) {
2095
- handler.handleSeek(position, sessionId).then(function () {
2096
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2097
- }).catch(function (reason) {
2098
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2099
- });
2100
- }, function (transactionId, volume, sessionId) {
2101
- handler.handleSetAudioVolume(volume, sessionId).then(function () {
2102
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2103
- }).catch(function (reason) {
2104
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2105
- });
2106
- }, function (transactionId, audioTrack, sessionId) {
2107
- handler.handleSetAudioTrack(audioTrack, sessionId).then(function () {
2108
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2109
- }).catch(function (reason) {
2110
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2111
- });
2112
- }, function (transactionId, textTrack, sessionId) {
2113
- handler.handleEnableTextTrack(textTrack, sessionId).then(function () {
2114
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2115
- }).catch(function (reason) {
2116
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2117
- });
2118
- }, function (transactionId, sessionId) {
2119
- handler.handleDisableTextTrack(sessionId).then(function () {
2120
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2121
- }).catch(function (reason) {
2122
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2123
- });
2124
- }, function (transactionId, sessionId) {
2125
- handler.handleNext(sessionId).then(function () {
2126
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2127
- }).catch(function (reason) {
2128
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2129
- });
2130
- }, function (transactionId, sessionId) {
2131
- handler.handlePrevious(sessionId).then(function () {
2132
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2133
- }).catch(function (reason) {
2134
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2135
- });
2136
- }, function (transactionId, enable, sessionId) {
2137
- handler.handleEnableShuffle(enable, sessionId).then(function () {
2138
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2139
- }).catch(function (reason) {
2140
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2141
- });
2142
- }, function (transactionId, mode, sessionId) {
2143
- handler.handleSetRepeatMode(mode, sessionId).then(function () {
2144
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2145
- }).catch(function (reason) {
2146
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2147
- });
2148
- }, function (transactionId, id, rating, sessionId) {
2149
- handler.handleSetRating(id, rating, sessionId).then(function () {
2150
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2151
- }).catch(function (reason) {
2152
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2153
- });
2154
- }, function (transactionId, id) {
2155
- handler.handleGetMetadataInfo(id).then(function (metadata) {
2156
- KeplerMediaControlsServerTM_1.default.getMetadataResponse(transactionId, metadata);
2157
- }).catch(function (reason) {
2158
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2159
- });
2160
- }, function (transactionId, action, sessionId) {
2161
- handler.handleCustomAction(action, sessionId).then(function () {
2162
- KeplerMediaControlsServerTM_1.default.transactionSuccess(transactionId);
2163
- }).catch(function (reason) {
2164
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2165
- });
2166
- }, function (transactionId, sessionId) {
2167
- handler.handleGetSessionState(sessionId).then(function (states) {
2168
- KeplerMediaControlsServerTM_1.default.getSessionStateResponse(transactionId, states);
2169
- }).catch(function (reason) {
2170
- KeplerMediaControlsServerTM_1.default.transactionError(transactionId, normalizeError(reason));
2171
- });
2172
- }).catch(function (error) {
2173
- return error;
2174
- });
2175
- }
2176
- /**
2177
- * Update the media session states
2178
- * @param states @type {KeplerMediaControlsTypes.MediaSessionState[]} Array of media session states
2179
- */
2180
- }, {
2181
- key: "updateMediaSessionStates",
2182
- value: function updateMediaSessionStates(states) {
2183
- KeplerMediaControlsServerTM_1.default.updateMediaSessionStates(states);
2184
- }
2185
- }], [{
2186
- key: "getMajorVersion",
2187
- value:
2188
- /**
2189
- * Get the major version number of the TM interface
2190
- * @returns @type {number} the major version
2191
- */
2192
- function getMajorVersion() {
2193
- return KeplerMediaControlsServerTM_1.default.getMajorVersion();
2194
- }
2195
- /**
2196
- * Get the minor version number of the TM interface
2197
- * @returns @type {number} the minor version
2198
- */
2199
- }, {
2200
- key: "getMinorVersion",
2201
- value: function getMinorVersion() {
2202
- return KeplerMediaControlsServerTM_1.default.getMinorVersion();
2203
- }
2204
- /**
2205
- * Get the patch version number of the TM interface
2206
- * @returns @type {number} the patch version
2207
- */
2208
- }, {
2209
- key: "getPatchVersion",
2210
- value: function getPatchVersion() {
2211
- return KeplerMediaControlsServerTM_1.default.getPatchVersion();
2212
- }
2213
- }]);
2214
- }();
2215
- exports.MediaControlServer = MediaControlServer;
2216
- },"313ad127e2a045b81b6e",["05c7ea45b866fc7c07c5","3508abd8c6b891008c0d","5533cec96f6a88041c69"]);
2217
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
2218
- "use strict";
2219
-
2220
- /*
2221
- * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
2222
- *
2223
- * AMAZON PROPRIETARY/CONFIDENTIAL
2224
- *
2225
- * You may not use this file except in compliance with the terms and
2226
- * conditions set forth in the accompanying LICENSE.TXT file.
2227
- *
2228
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
2229
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
2230
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
2231
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
2232
- */
2233
- Object.defineProperty(exports, "__esModule", {
2234
- value: true
2235
- });
2236
- // prettier-ignore
2237
- exports.default = _$$_REQUIRE(_dependencyMap[0]).TurboModuleRegistry.getEnforcing('KeplerMediaControlsServerTM');
2238
- },"05c7ea45b866fc7c07c5",["8a35a86b7946c72e0207"]);
2239
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
2240
- "use strict";
2241
-
2242
- /*
2243
- * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
2244
- *
2245
- * AMAZON PROPRIETARY/CONFIDENTIAL
2246
- *
2247
- * You may not use this file except in compliance with the terms and
2248
- * conditions set forth in the accompanying LICENSE.TXT file.
2249
- *
2250
- * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
2251
- * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
2252
- * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
2253
- * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
2254
- */
2255
- Object.defineProperty(exports, "__esModule", {
2256
- value: true
2257
- });
2258
- exports.RepeatMode = exports.Action = exports.PlaybackStatus = undefined;
2259
- Object.defineProperty(exports, "PlaybackStatus", {
2260
- enumerable: true,
2261
- get: function get() {
2262
- return _$$_REQUIRE(_dependencyMap[0]).PlaybackStatus;
2263
- }
2264
- });
2265
- Object.defineProperty(exports, "Action", {
2266
- enumerable: true,
2267
- get: function get() {
2268
- return _$$_REQUIRE(_dependencyMap[0]).Action;
2269
- }
2270
- });
2271
- Object.defineProperty(exports, "RepeatMode", {
2272
- enumerable: true,
2273
- get: function get() {
2274
- return _$$_REQUIRE(_dependencyMap[0]).RepeatMode;
2275
- }
2276
- });
2277
- },"151202f922ff9331c254",["6fdfb04c7ae618493e91"]);