@amazon-devices/kepler-media-controls 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/LICENSE +7 -0
  2. package/SystemBundles/ccb7cf3a42fbe7b00b72ad1b7cc41cb45c8c491032e9dfe359f1830234d5d040.bundle +2277 -0
  3. package/SystemBundles/ccb7cf3a42fbe7b00b72ad1b7cc41cb45c8c491032e9dfe359f1830234d5d040.bundle.map +1 -0
  4. package/SystemModules/amzn__kepler-media-controls.modules.txt +10 -0
  5. package/SystemModules/amzn__kepler-media-controls.private.modules.txt +21 -0
  6. package/SystemModules/keplerscript-system-bundle-config.json +7 -0
  7. package/THIRD_PARTY_NOTICES.txt +12224 -0
  8. package/dist/MediaControlClientAsync.d.ts +226 -0
  9. package/dist/MediaControlClientAsync.js +355 -0
  10. package/dist/MediaControlComponentAsync.d.ts +8 -0
  11. package/dist/MediaControlComponentAsync.js +26 -0
  12. package/dist/MediaControlEndpointLocatorAsync.d.ts +19 -0
  13. package/dist/MediaControlEndpointLocatorAsync.js +70 -0
  14. package/dist/MediaControlServer.d.ts +37 -0
  15. package/dist/MediaControlServer.js +218 -0
  16. package/dist/MediaControlServerComponentAsync.d.ts +7 -0
  17. package/dist/MediaControlServerComponentAsync.js +29 -0
  18. package/dist/index.d.ts +3 -0
  19. package/dist/index.js +25 -0
  20. package/dist/kepler/tm-manifest.json +1 -0
  21. package/dist/turbo-modules/KeplerMediaControlsClientTM.d.ts +50 -0
  22. package/dist/turbo-modules/KeplerMediaControlsClientTM.js +18 -0
  23. package/dist/turbo-modules/KeplerMediaControlsServerTM.d.ts +17 -0
  24. package/dist/turbo-modules/KeplerMediaControlsServerTM.js +18 -0
  25. package/dist/turbo-modules/__mocks__/KeplerMediaControlsClientTM.d.ts +6 -0
  26. package/dist/turbo-modules/__mocks__/KeplerMediaControlsClientTM.js +7 -0
  27. package/dist/turbo-modules/__mocks__/KeplerMediaControlsServerTM.d.ts +7 -0
  28. package/dist/turbo-modules/__mocks__/KeplerMediaControlsServerTM.js +8 -0
  29. package/dist/turbo-modules/types/KeplerMediaControlsTypes.d.ts +859 -0
  30. package/dist/turbo-modules/types/KeplerMediaControlsTypes.js +152 -0
  31. package/dist/turbo-modules/types/index.d.ts +2 -0
  32. package/dist/turbo-modules/types/index.js +20 -0
  33. package/kepler-compatibility.json +13 -0
  34. package/kepler-transformed-package-info.json +3 -0
  35. package/package.json +1 -0
  36. package/react-native.config.js +22 -0
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
4
+ *
5
+ * AMAZON PROPRIETARY/CONFIDENTIAL
6
+ *
7
+ * You may not use this file except in compliance with the terms and
8
+ * conditions set forth in the accompanying LICENSE.TXT file.
9
+ *
10
+ * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
11
+ * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
12
+ * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
13
+ * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.NotAvailableError = exports.SeekOutOfRangeError = exports.SpeedOutOfRangeError = exports.NotAllowedError = exports.InvalidStateError = exports.CommandSource = exports.RadioBand = exports.RepeatMode = exports.Action = exports.PlaybackStatus = void 0;
17
+ /**
18
+ * Specifies the playback status.
19
+ */
20
+ var PlaybackStatus;
21
+ (function (PlaybackStatus) {
22
+ /* The media player is currently playing. */
23
+ PlaybackStatus["PLAYING"] = "PLAYING";
24
+ /* Playback is paused. */
25
+ PlaybackStatus["PAUSED"] = "PAUSED";
26
+ /* There is no playback in process. */
27
+ PlaybackStatus["NOT_PLAYING"] = "NOT_PLAYING";
28
+ /* Playback is buffering. */
29
+ PlaybackStatus["BUFFERING"] = "BUFFERING";
30
+ })(PlaybackStatus = exports.PlaybackStatus || (exports.PlaybackStatus = {}));
31
+ /**
32
+ * Represents the actions that you can invoke using the media control client.
33
+ */
34
+ class Action {
35
+ name;
36
+ constructor(name) {
37
+ this.name = name;
38
+ }
39
+ static PLAY = new Action('PLAY');
40
+ static PAUSE = new Action('PAUSE');
41
+ static TOGGLE_PLAY_PAUSE = new Action('TOGGLE_PLAY_PAUSE');
42
+ static STOP = new Action('STOP');
43
+ static START_OVER = new Action('START_OVER');
44
+ static FAST_FORWARD = new Action('FAST_FORWARD');
45
+ static REWIND = new Action('REWIND');
46
+ static SET_PLAYBACK_SPEED = new Action('SET_PLAYBACK_SPEED');
47
+ static SKIP_FORWARD = new Action('SKIP_FORWARD');
48
+ static SKIP_BACKWARD = new Action('SKIP_BACKWARD');
49
+ static SEEK = new Action('SEEK');
50
+ static SET_AUDIO_VOLUME = new Action('SET_AUDIO_VOLUME');
51
+ static SET_AUDIO_TRACK = new Action('SET_AUDIO_TRACK');
52
+ static ENABLE_TEXT_TRACK = new Action('ENABLE_TEXT_TRACK');
53
+ static DISBLE_TEXT_TRACK = new Action('DISABLE_TEXT_TRACK');
54
+ static NEXT = new Action('NEXT');
55
+ static PREVIOUS = new Action('PREVIOUS');
56
+ static ENABLE_SHUFFLE = new Action('ENABLE_SHUFFLE');
57
+ static SET_REPEAT_MODE = new Action('SET_REPEAT_MODE');
58
+ static SET_RATING = new Action('SET_RATING');
59
+ static GET_META_DATA = new Action('GET_META_DATA');
60
+ }
61
+ exports.Action = Action;
62
+ /**
63
+ * Specifies the repeat mode for the media player.
64
+ */
65
+ var RepeatMode;
66
+ (function (RepeatMode) {
67
+ /* Disable repeat mode. */
68
+ RepeatMode[RepeatMode["OFF"] = 0] = "OFF";
69
+ /* Repeat the current track. */
70
+ RepeatMode[RepeatMode["REPEAT_TRACK"] = 1] = "REPEAT_TRACK";
71
+ /* Repeat the current playlist. */
72
+ RepeatMode[RepeatMode["REPEAT_PLAYLIST"] = 2] = "REPEAT_PLAYLIST";
73
+ })(RepeatMode = exports.RepeatMode || (exports.RepeatMode = {}));
74
+ /**
75
+ * Specifies the radio band for the media player.
76
+ */
77
+ var RadioBand;
78
+ (function (RadioBand) {
79
+ /* No radio band selected. */
80
+ RadioBand["NONE"] = "NONE";
81
+ /* The radio band is unknown. */
82
+ RadioBand["UNKNOWN"] = "UNKNOWN";
83
+ /* Specifies the AM band. */
84
+ RadioBand["AM"] = "AM";
85
+ /* Specifies the FM band. */
86
+ RadioBand["FM"] = "FM";
87
+ /* Specifies the DAB band. */
88
+ RadioBand["DAB"] = "DAB";
89
+ })(RadioBand = exports.RadioBand || (exports.RadioBand = {}));
90
+ /**
91
+ * Specifies the source of the media command.
92
+ */
93
+ var CommandSource;
94
+ (function (CommandSource) {
95
+ /* Command was initiated by the system in response to the display being turned off. */
96
+ CommandSource["SYSTEM_DISPLAY_OFF"] = "SYSTEM_DISPLAY_OFF";
97
+ /* Command was initiated by the user, e.g., from a voice command */
98
+ CommandSource["USER"] = "USER";
99
+ /* Command was initiated by neither the user nor the system when display is turned off. */
100
+ CommandSource["OTHER"] = "OTHER";
101
+ })(CommandSource = exports.CommandSource || (exports.CommandSource = {}));
102
+ /**
103
+ * Error occurs when a request cannot be processed due to being in the
104
+ * wrong state to process it.
105
+ */
106
+ class InvalidStateError extends Error {
107
+ constructor(message) {
108
+ super(message);
109
+ this.name = 'InvalidStateError';
110
+ }
111
+ }
112
+ exports.InvalidStateError = InvalidStateError;
113
+ /**
114
+ * Error occurs when a request cannot be handled.
115
+ */
116
+ class NotAllowedError extends Error {
117
+ constructor(message) {
118
+ super(message);
119
+ this.name = 'NotAllowedError';
120
+ }
121
+ }
122
+ exports.NotAllowedError = NotAllowedError;
123
+ /**
124
+ * Error occurs when the requested playback speed is not supported.
125
+ */
126
+ class SpeedOutOfRangeError extends Error {
127
+ constructor(message) {
128
+ super(message);
129
+ this.name = 'SpeedOutOfRangeError';
130
+ }
131
+ }
132
+ exports.SpeedOutOfRangeError = SpeedOutOfRangeError;
133
+ /**
134
+ * Error occurs when the requested seek position is out of the advertised range.
135
+ */
136
+ class SeekOutOfRangeError extends Error {
137
+ constructor(message) {
138
+ super(message);
139
+ this.name = 'SeekOutOfRangeError';
140
+ }
141
+ }
142
+ exports.SeekOutOfRangeError = SeekOutOfRangeError;
143
+ /**
144
+ * Error occurs when requested data is not available.
145
+ */
146
+ class NotAvailableError extends Error {
147
+ constructor(message) {
148
+ super(message);
149
+ this.name = 'NotAvailableError';
150
+ }
151
+ }
152
+ exports.NotAvailableError = NotAvailableError;
@@ -0,0 +1,2 @@
1
+ export type { ITimeValue, IPlaybackPosition, IPlaybackState, ITrack, IControl, ICommandContext, IMediaInfo, ICapabilities, IPlaylistState, ISubscription, IMediaControlHandlerAsync, IMediaControlClientAsync, KeplerMediaControlsError, IMediaMetadata, IMediaSessionId, IPackageId, IMediaControlEndpointLocatorAsync, IMediaControlEndpointLocatorListener, IMediaControlListener, IMediaControlServerAsync, ILocale, MediaSessionState } from './KeplerMediaControlsTypes';
2
+ export { PlaybackStatus, Action, RepeatMode } from './KeplerMediaControlsTypes';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2024 Amazon.com, Inc. or its affiliates. All rights reserved.
4
+ *
5
+ * AMAZON PROPRIETARY/CONFIDENTIAL
6
+ *
7
+ * You may not use this file except in compliance with the terms and
8
+ * conditions set forth in the accompanying LICENSE.TXT file.
9
+ *
10
+ * THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
11
+ * DISCLAIMS, WITH RESPECT TO THESE MATERIALS, ALL WARRANTIES, EXPRESS,
12
+ * IMPLIED, OR STATUTORY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
13
+ * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RepeatMode = exports.Action = exports.PlaybackStatus = void 0;
17
+ var KeplerMediaControlsTypes_1 = require("./KeplerMediaControlsTypes");
18
+ Object.defineProperty(exports, "PlaybackStatus", { enumerable: true, get: function () { return KeplerMediaControlsTypes_1.PlaybackStatus; } });
19
+ Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return KeplerMediaControlsTypes_1.Action; } });
20
+ Object.defineProperty(exports, "RepeatMode", { enumerable: true, get: function () { return KeplerMediaControlsTypes_1.RepeatMode; } });
@@ -0,0 +1,13 @@
1
+ {
2
+ "versions": {
3
+ "1.0.9": "/com.amazon.kepler.kepler_media_controls_1@IKeplerMediaControls_0",
4
+ "1.0.10": "/com.amazon.kepler.kepler_media_controls_1@IKeplerMediaControls_0",
5
+ "1.0.11": "/com.amazon.kepler.kepler_media_controls_1@IKeplerMediaControls_0",
6
+ "1.0.12": "/com.amazon.kepler.kepler_media_controls_1@IKeplerMediaControls_0",
7
+ "1.0.13": "/com.amazon.kepler.kepler_media_controls_1@IKeplerMediaControls_0",
8
+ "1.0.14": "/com.amazon.kepler.kepler_media_controls_1@IKeplerMediaControls_0",
9
+ "1.0.15": "/com.amazon.kepler.kepler_media_controls_1@IKeplerMediaControls_0",
10
+ "1.0.16": "/com.amazon.kepler.kepler_media_controls_1@IKeplerMediaControls_0",
11
+ "1.0.17": "/com.amazon.kepler.kepler_media_controls_1@IKeplerMediaControls_0"
12
+ }
13
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "sourcePackageRef": "@amzn/kepler-media-controls"
3
+ }
package/package.json ADDED
@@ -0,0 +1 @@
1
+ {"name": "@amazon-devices/kepler-media-controls", "version": "1.0.17", "main": "dist/index.js", "types": "dist/index.d.ts", "files": ["dist", "react-native.config.js", "kepler-compatibility.json", "SystemModules", "SystemBundles", "THIRD_PARTY_NOTICES.txt", "kepler-transformed-package-info.json"], "scripts": {"clean": "rm -rf build/* build bundle kepler-build assets dist", "test:snapshot": "", "start": "node node_modules/react-native/local-cli/cli.js start", "test": "", "lint": "ts-standard", "docgen": "npx typedoc --basePath src/ -entryPointStrategy expand --excludePrivate --excludeProtected --excludeInternal --excludeNotDocumented --disableSources --hideGenerator src/ --out build/brazil-documentation", "compile": "tsc -p tsconfig-build.json", "release": "npm run docgen", "build": "npm-run-all lint test compile docgen", "prepublishOnly": "KEPLER_NPM_COMMAND=npm-pretty-much react-native build-system-bundle-kepler"}, "peerDependencies": {"@amazon-devices/react-native-kepler": "^2.0.0", "react": "18.2.0", "react-native": "0.72.0", "@amazon-devices/keplerscript-turbomodule-api": "^1.0.0", "@amazon-devices/kepler-media-types": "^1.0.0"}, "devDependencies": {"@react-native/eslint-config": "0.72.2", "@react-native/metro-config": "^0.72.6", "@react-native-community/cli": "^11.2.0", "@types/jest": "^28.0.0", "@types/react": "^18.0.24", "@typescript-eslint/eslint-plugin": "^5.30.0", "babel-jest": "^28.0.0", "eslint": "^8.12.0", "jest": "^28.0.0", "metro-react-native-babel-preset": "^0.76.5", "npm-run-all": "^4.1.5", "react-test-renderer": "18.2.0", "ts-jest": "^28.0.0", "ts-standard": "12.0.2", "typescript": "4.8.4", "typedoc": "^0.26.0", "@amazon-devices/kepler-cli-platform": "^0"}, "npm-pretty-much": {"runRelease": "always"}, "resolutions": {"@types/react": "^17"}, "kepler": {"projectType": "turbomodule", "targets": ["tv", "ref_8295"], "features": ["vega"]}, "license": "See license in LICENSE"}
@@ -0,0 +1,22 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ kepler: {
5
+ autolink: {
6
+ KeplerMediaControlsServerTM: {
7
+ libraryName: 'libkeplerscript-media-controls-1.so',
8
+ linkDynamic: true,
9
+ components: [],
10
+ turbomodules: ['KeplerMediaControlsServerTM']
11
+ },
12
+ KeplerMediaControlsClientTM: {
13
+ libraryName: 'libkeplerscript-media-controls-1.so',
14
+ linkDynamic: true,
15
+ components: [],
16
+ turbomodules: ['KeplerMediaControlsClientTM']
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }