capacitor-plugin-playlist 0.1.18 → 0.1.22

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 (33) hide show
  1. package/android/src/main/java/org/dwbn/plugins/playlist/PlaylistPlugin.kt +4 -8
  2. package/android/src/main/java/org/dwbn/plugins/playlist/RmxAudioPlayer.java +397 -385
  3. package/android/src/main/java/org/dwbn/plugins/playlist/manager/PlaylistManager.kt +17 -12
  4. package/android/src/main/java/org/dwbn/plugins/playlist/notification/PlaylistNotificationProvider.kt +5 -1
  5. package/android/src/main/java/org/dwbn/plugins/playlist/service/MediaService.kt +1 -2
  6. package/dist/docs.json +5 -23
  7. package/dist/esm/Constants.js.map +1 -1
  8. package/dist/esm/RmxAudioPlayer.d.ts +4 -10
  9. package/dist/esm/RmxAudioPlayer.js +19 -22
  10. package/dist/esm/RmxAudioPlayer.js.map +1 -1
  11. package/dist/esm/definitions.d.ts +5 -4
  12. package/dist/esm/index.d.ts +1 -1
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/esm/plugin.js +1 -0
  16. package/dist/esm/plugin.js.map +1 -1
  17. package/dist/esm/utils.d.ts +1 -1
  18. package/dist/esm/utils.js.map +1 -1
  19. package/dist/esm/web.d.ts +3 -3
  20. package/dist/esm/web.js +32 -27
  21. package/dist/esm/web.js.map +1 -1
  22. package/dist/plugin.cjs.js +47 -44
  23. package/dist/plugin.cjs.js.map +1 -1
  24. package/dist/plugin.js +48 -45
  25. package/dist/plugin.js.map +1 -1
  26. package/ios/Plugin/AVBidirectionalQueuePlayer.swift +18 -4
  27. package/ios/Plugin/AudioTrack.swift +0 -1
  28. package/ios/Plugin/DispatchQueue.swift +3 -3
  29. package/ios/Plugin/RmxAudioPlayer.swift +77 -108
  30. package/package.json +1 -1
  31. package/android/.gitignore +0 -1
  32. package/android/.npmignore +0 -1
  33. package/ios/.DS_Store +0 -0
package/dist/plugin.js CHANGED
@@ -1,4 +1,4 @@
1
- var capacitorExample = (function (exports, core) {
1
+ var capacitorPlaylist = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
4
  /**
@@ -174,6 +174,7 @@ var capacitorExample = (function (exports, core) {
174
174
  200: 'DEBUG_View_Disappeared',
175
175
  };
176
176
 
177
+ // todo: find out why we get imported twice
177
178
  let playListWebInstance;
178
179
  const Playlist = core.registerPlugin('Playlist', {
179
180
  web: () => Promise.resolve().then(function () { return web; }).then(m => {
@@ -235,7 +236,6 @@ var capacitorExample = (function (exports, core) {
235
236
  /*!
236
237
  * Module dependencies.
237
238
  */
238
- const log = console;
239
239
  const itemStatusChangeTypes = [
240
240
  exports.RmxAudioStatusMessage.RMXSTATUS_PLAYBACK_POSITION,
241
241
  exports.RmxAudioStatusMessage.RMXSTATUS_DURATION,
@@ -247,12 +247,6 @@ var capacitorExample = (function (exports, core) {
247
247
  exports.RmxAudioStatusMessage.RMXSTATUS_COMPLETED,
248
248
  exports.RmxAudioStatusMessage.RMXSTATUS_ERROR,
249
249
  ];
250
- /**
251
- * AudioPlayer class implementation. A singleton of this class is exported for use by Cordova,
252
- * but nothing stops you from creating another instance. Keep in mind that the native players
253
- * are in fact singletons, so the only thing the separate instance gives you would be
254
- * separate onStatus callback streams.
255
- */
256
250
  class RmxAudioPlayer {
257
251
  /**
258
252
  * Creates a new RmxAudioPlayer instance.
@@ -261,6 +255,10 @@ var capacitorExample = (function (exports, core) {
261
255
  this.handlers = {};
262
256
  this.options = { verbose: false, resetStreamOnPause: true };
263
257
  this._inititialized = false;
258
+ this._readyResolve = () => {
259
+ };
260
+ this._readyReject = () => {
261
+ };
264
262
  this._currentState = 'unknown';
265
263
  this._hasError = false;
266
264
  this._hasLoaded = false;
@@ -274,7 +272,7 @@ var capacitorExample = (function (exports, core) {
274
272
  this.ready = () => {
275
273
  return this._initPromise;
276
274
  };
277
- this.initialize = () => {
275
+ this.initialize = async () => {
278
276
  Playlist.addListener('status', (data) => {
279
277
  if (data.action === 'status') {
280
278
  this.onStatus(data.status.trackId, data.status.msgType, data.status.value);
@@ -283,16 +281,16 @@ var capacitorExample = (function (exports, core) {
283
281
  console.warn('Unknown audio player onStatus message:', data);
284
282
  }
285
283
  });
286
- Playlist.initialize()
287
- .then(() => {
284
+ try {
285
+ await Playlist.initialize();
288
286
  this._inititialized = true;
289
- this._readyResolve(true);
290
- })
291
- .catch((args) => {
292
- const message = 'CORDOVA RMXAUDIOPLAYER: Error storing message channel:';
287
+ this._readyResolve();
288
+ }
289
+ catch (args) {
290
+ const message = 'Capacitor RMXAUDIOPLAYER: Error initializing:';
293
291
  console.warn(message, args);
294
- this._readyReject(true);
295
- });
292
+ this._readyReject();
293
+ }
296
294
  return this._initPromise;
297
295
  };
298
296
  /**
@@ -339,14 +337,14 @@ var capacitorExample = (function (exports, core) {
339
337
  throw new Error('Track removal spec is empty');
340
338
  }
341
339
  if (!removeItem.trackId && !removeItem.trackIndex) ;
342
- return Playlist.removeItem({ item: removeItem });
340
+ return Playlist.removeItem({ trackId: removeItem.trackId, trackIndex: removeItem.trackIndex });
343
341
  };
344
342
  /**
345
343
  * Removes all given tracks from the playlist; these can be specified either by trackId or trackIndex. If the removed items
346
344
  * include the currently playing item, the next available item will automatically begin playing.
347
345
  */
348
346
  this.removeItems = (items) => {
349
- return Playlist.removeItems({ items });
347
+ return Playlist.removeItems({ items: items });
350
348
  };
351
349
  /**
352
350
  * Clear the entire playlist. This will result in the STOPPED event being raised.
@@ -509,7 +507,7 @@ var capacitorExample = (function (exports, core) {
509
507
  var _a;
510
508
  const status = { type: type, trackId: trackId, value: value };
511
509
  if (this.options.verbose) {
512
- log.log(`RmxAudioPlayer.onStatus: ${RmxAudioStatusMessageDescriptions[type]}(${type}) [${trackId}]: `, value);
510
+ console.debug(`RmxAudioPlayer.onStatus: ${RmxAudioStatusMessageDescriptions[type]}(${type}) [${trackId}]: `, value);
513
511
  }
514
512
  if (status.type === exports.RmxAudioStatusMessage.RMXSTATUS_TRACK_CHANGED) {
515
513
  this._hasError = false;
@@ -582,7 +580,7 @@ var capacitorExample = (function (exports, core) {
582
580
  this.loop = false;
583
581
  this.options = {};
584
582
  this.currentTrack = null;
585
- this.lastState = "stopped";
583
+ this.lastState = 'stopped';
586
584
  this.hlsLoaded = false;
587
585
  }
588
586
  addAllItems(options) {
@@ -613,7 +611,6 @@ var capacitorExample = (function (exports, core) {
613
611
  return (_a = this.audio) === null || _a === void 0 ? void 0 : _a.play();
614
612
  }
615
613
  playTrackById(options) {
616
- console.log("da");
617
614
  this.playlistItems.forEach(async (item) => {
618
615
  if (item.trackId === options.id) {
619
616
  await this.setCurrent(item);
@@ -638,10 +635,10 @@ var capacitorExample = (function (exports, core) {
638
635
  }
639
636
  removeItem(options) {
640
637
  this.playlistItems.forEach((item, index) => {
641
- if (options.item.trackIndex && options.item.trackIndex === index) {
638
+ if (options.trackIndex && options.trackIndex === index) {
642
639
  this.playlistItems.splice(index, 1);
643
640
  }
644
- else if (options.item.trackId && options.item.trackId === item.trackId) {
641
+ else if (options.trackId && options.trackId === item.trackId) {
645
642
  this.playlistItems.splice(index, 1);
646
643
  }
647
644
  });
@@ -649,7 +646,7 @@ var capacitorExample = (function (exports, core) {
649
646
  }
650
647
  removeItems(options) {
651
648
  options.items.forEach((item) => {
652
- this.removeItem({ item });
649
+ this.removeItem(item);
653
650
  });
654
651
  return Promise.resolve();
655
652
  }
@@ -760,7 +757,7 @@ var capacitorExample = (function (exports, core) {
760
757
  const canPlayListener = async () => {
761
758
  var _a;
762
759
  this.notifyListeners('status', {
763
- action: "status",
760
+ action: 'status',
764
761
  status: {
765
762
  msgType: exports.RmxAudioStatusMessage.RMXSTATUS_CANPLAY,
766
763
  trackId: this.getCurrentTrackId(),
@@ -776,7 +773,7 @@ var capacitorExample = (function (exports, core) {
776
773
  this.audio.addEventListener('canplay', canPlayListener);
777
774
  this.audio.addEventListener('playing', () => {
778
775
  this.notifyListeners('status', {
779
- action: "status",
776
+ action: 'status',
780
777
  status: {
781
778
  msgType: exports.RmxAudioStatusMessage.RMXSTATUS_PLAYING,
782
779
  trackId: this.getCurrentTrackId(),
@@ -786,7 +783,7 @@ var capacitorExample = (function (exports, core) {
786
783
  });
787
784
  this.audio.addEventListener('pause', () => {
788
785
  this.notifyListeners('status', {
789
- action: "status",
786
+ action: 'status',
790
787
  status: {
791
788
  msgType: exports.RmxAudioStatusMessage.RMXSTATUS_PAUSE,
792
789
  trackId: this.getCurrentTrackId(),
@@ -796,7 +793,7 @@ var capacitorExample = (function (exports, core) {
796
793
  });
797
794
  this.audio.addEventListener('error', () => {
798
795
  this.notifyListeners('status', {
799
- action: "status",
796
+ action: 'status',
800
797
  status: {
801
798
  msgType: exports.RmxAudioStatusMessage.RMXSTATUS_ERROR,
802
799
  trackId: this.getCurrentTrackId(),
@@ -806,7 +803,7 @@ var capacitorExample = (function (exports, core) {
806
803
  });
807
804
  this.audio.addEventListener('ended', () => {
808
805
  this.notifyListeners('status', {
809
- action: "status",
806
+ action: 'status',
810
807
  status: {
811
808
  msgType: exports.RmxAudioStatusMessage.RMXSTATUS_STOPPED,
812
809
  trackId: this.getCurrentTrackId(),
@@ -814,15 +811,21 @@ var capacitorExample = (function (exports, core) {
814
811
  }
815
812
  });
816
813
  });
814
+ let lastTrackId, lastPosition;
817
815
  this.audio.addEventListener('timeupdate', () => {
818
- this.notifyListeners('status', {
819
- action: "status",
820
- status: {
821
- msgType: exports.RmxAudioStatusMessage.RMXSTATUS_PLAYBACK_POSITION,
822
- trackId: this.getCurrentTrackId(),
823
- value: this.getCurrentTrackStatus(this.lastState),
824
- }
825
- });
816
+ const status = this.getCurrentTrackStatus(this.lastState);
817
+ if (lastTrackId !== this.getCurrentTrackId() || lastPosition !== status.currentPosition) {
818
+ this.notifyListeners('status', {
819
+ action: 'status',
820
+ status: {
821
+ msgType: exports.RmxAudioStatusMessage.RMXSTATUS_PLAYBACK_POSITION,
822
+ trackId: this.getCurrentTrackId(),
823
+ value: status,
824
+ }
825
+ });
826
+ lastTrackId = this.getCurrentTrackId();
827
+ lastPosition = status.currentPosition;
828
+ }
826
829
  });
827
830
  }
828
831
  }
@@ -830,7 +833,7 @@ var capacitorExample = (function (exports, core) {
830
833
  if (this.currentTrack) {
831
834
  return this.currentTrack.trackId;
832
835
  }
833
- return "INVALID";
836
+ return 'INVALID';
834
837
  }
835
838
  getCurrentIndex() {
836
839
  if (this.currentTrack) {
@@ -850,7 +853,7 @@ var capacitorExample = (function (exports, core) {
850
853
  isStream: !!((_a = this.currentTrack) === null || _a === void 0 ? void 0 : _a.isStream),
851
854
  currentIndex: this.getCurrentIndex(),
852
855
  status: currentState,
853
- currentPosition: (_b = this.audio) === null || _b === void 0 ? void 0 : _b.currentTime,
856
+ currentPosition: ((_b = this.audio) === null || _b === void 0 ? void 0 : _b.currentTime) || 0,
854
857
  };
855
858
  }
856
859
  async setCurrent(item, position) {
@@ -858,7 +861,7 @@ var capacitorExample = (function (exports, core) {
858
861
  if (this.audio) {
859
862
  wasPlaying = !this.audio.paused;
860
863
  this.audio.pause();
861
- this.audio.src = "";
864
+ this.audio.src = '';
862
865
  this.audio.removeAttribute('src');
863
866
  this.audio.load();
864
867
  }
@@ -886,8 +889,8 @@ var capacitorExample = (function (exports, core) {
886
889
  this.play();
887
890
  });
888
891
  }
889
- this.notifyListeners("status", {
890
- action: "status",
892
+ this.notifyListeners('status', {
893
+ action: 'status',
891
894
  status: {
892
895
  msgType: exports.RmxAudioStatusMessage.RMXSTATUS_TRACK_CHANGED,
893
896
  trackId: this.getCurrentTrackId(),
@@ -909,11 +912,11 @@ var capacitorExample = (function (exports, core) {
909
912
  return new Promise((resolve, reject) => {
910
913
  var script = document.createElement('script');
911
914
  script.type = 'text/javascript';
912
- script.src = 'https://cdn.jsdelivr.net/npm/hls.js@0.9.1';
915
+ script.src = 'https://cdn.jsdelivr.net/npm/hls.js@1.1.1';
913
916
  document.getElementsByTagName('head')[0].appendChild(script);
914
917
  script.onload = () => {
915
918
  this.hlsLoaded = true;
916
- resolve();
919
+ resolve(void 0);
917
920
  };
918
921
  script.onerror = () => {
919
922
  reject();
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/Constants.js","esm/plugin.js","esm/utils.js","esm/RmxAudioPlayer.js","esm/web.js"],"sourcesContent":["/**\n * Enum describing the possible errors that may come from the plugins\n */\nexport var RmxAudioErrorType;\n(function (RmxAudioErrorType) {\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_NONE_ACTIVE\"] = 0] = \"RMXERR_NONE_ACTIVE\";\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_ABORTED\"] = 1] = \"RMXERR_ABORTED\";\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_NETWORK\"] = 2] = \"RMXERR_NETWORK\";\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_DECODE\"] = 3] = \"RMXERR_DECODE\";\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_NONE_SUPPORTED\"] = 4] = \"RMXERR_NONE_SUPPORTED\";\n})(RmxAudioErrorType || (RmxAudioErrorType = {}));\n;\n/**\n * String descriptions corresponding to the RmxAudioErrorType values\n */\nexport const RmxAudioErrorTypeDescriptions = [\n 'No Active Sources',\n 'Aborted',\n 'Network',\n 'Failed to Decode',\n 'No Supported Sources',\n];\n/**\n * Enumeration of all status messages raised by the plugin.\n * NONE, REGISTER and INIT are structural and probably not useful to you.\n */\nexport var RmxAudioStatusMessage;\n(function (RmxAudioStatusMessage) {\n /**\n * The starting state of the plugin. You will never see this value;\n * it changes before the callbacks are even registered to report changes to this value.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_NONE\"] = 0] = \"RMXSTATUS_NONE\";\n /**\n * Raised when the plugin registers the callback handler for onStatus callbacks.\n * You will probably not be able to see this (nor do you need to).\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_REGISTER\"] = 1] = \"RMXSTATUS_REGISTER\";\n /**\n * Reserved for future use\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_INIT\"] = 2] = \"RMXSTATUS_INIT\";\n /**\n * Indicates an error is reported in the 'value' field.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_ERROR\"] = 5] = \"RMXSTATUS_ERROR\";\n /**\n * The reported track is being loaded by the player\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_LOADING\"] = 10] = \"RMXSTATUS_LOADING\";\n /**\n * The reported track is able to begin playback\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_CANPLAY\"] = 11] = \"RMXSTATUS_CANPLAY\";\n /**\n * The reported track has loaded 100% of the file (either from disc or network)\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_LOADED\"] = 15] = \"RMXSTATUS_LOADED\";\n /**\n * (iOS only): Playback has stalled due to insufficient network\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_STALLED\"] = 20] = \"RMXSTATUS_STALLED\";\n /**\n * Reports an update in the reported track's buffering status\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_BUFFERING\"] = 25] = \"RMXSTATUS_BUFFERING\";\n /**\n * The reported track has started (or resumed) playing\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PLAYING\"] = 30] = \"RMXSTATUS_PLAYING\";\n /**\n * The reported track has been paused, either by the user or by the system.\n * (iOS only): This value is raised when MP3's are malformed (but still playable).\n * These require the user to explicitly press play again. This can be worked\n * around and is on the TODO list.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PAUSE\"] = 35] = \"RMXSTATUS_PAUSE\";\n /**\n * Reports a change in the reported track's playback position.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PLAYBACK_POSITION\"] = 40] = \"RMXSTATUS_PLAYBACK_POSITION\";\n /**\n * The reported track has seeked.\n * On Android, only the plugin consumer can generate this (Notification controls on Android do not include a seek bar).\n * On iOS, the Command Center includes a seek bar so this will be reported when the user has seeked via Command Center.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_SEEK\"] = 45] = \"RMXSTATUS_SEEK\";\n /**\n * The reported track has completed playback.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_COMPLETED\"] = 50] = \"RMXSTATUS_COMPLETED\";\n /**\n * The reported track's duration has changed. This is raised once, when duration is updated for the first time.\n * For streams, this value is never reported.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_DURATION\"] = 55] = \"RMXSTATUS_DURATION\";\n /**\n * All playback has stopped, probably because the plugin is shutting down.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_STOPPED\"] = 60] = \"RMXSTATUS_STOPPED\";\n /**\n * The playlist has skipped forward to the next track.\n * On both Android and iOS, this will be raised if the notification controls/Command Center were used to skip.\n * It is unlikely you need to consume this event: RMXSTATUS_TRACK_CHANGED is also reported when this occurs,\n * so you can generalize your track change handling in one place.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMX_STATUS_SKIP_FORWARD\"] = 90] = \"RMX_STATUS_SKIP_FORWARD\";\n /**\n * The playlist has skipped back to the previous track.\n * On both Android and iOS, this will be raised if the notification controls/Command Center were used to skip.\n * It is unlikely you need to consume this event: RMXSTATUS_TRACK_CHANGED is also reported when this occurs,\n * so you can generalize your track change handling in one place.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMX_STATUS_SKIP_BACK\"] = 95] = \"RMX_STATUS_SKIP_BACK\";\n /**\n * Reported when the current track has changed in the native player. This event contains full data about\n * the new track, including the index and the actual track itself. The type of the 'value' field in this case\n * is OnStatusTrackChangedData.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_TRACK_CHANGED\"] = 100] = \"RMXSTATUS_TRACK_CHANGED\";\n /**\n * The entire playlist has completed playback.\n * After this event has been raised, the current item is set to null and the current index to -1.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PLAYLIST_COMPLETED\"] = 105] = \"RMXSTATUS_PLAYLIST_COMPLETED\";\n /**\n * An item has been added to the playlist. For the setPlaylistItems and addAllItems methods, this status is\n * raised once for every track in the collection.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_ITEM_ADDED\"] = 110] = \"RMXSTATUS_ITEM_ADDED\";\n /**\n * An item has been removed from the playlist. For the removeItems and clearAllItems methods, this status is\n * raised once for every track that was removed.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_ITEM_REMOVED\"] = 115] = \"RMXSTATUS_ITEM_REMOVED\";\n /**\n * All items have been removed from the playlist\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PLAYLIST_CLEARED\"] = 120] = \"RMXSTATUS_PLAYLIST_CLEARED\";\n /**\n * Just for testing.. you don't need this and in fact can never receive it, the plugin is destroyed before it can be raised.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_VIEWDISAPPEAR\"] = 200] = \"RMXSTATUS_VIEWDISAPPEAR\";\n})(RmxAudioStatusMessage || (RmxAudioStatusMessage = {}));\n;\n/**\n * String descriptions corresponding to the RmxAudioStatusMessage values\n */\nexport const RmxAudioStatusMessageDescriptions = {\n 0: 'No Status',\n 1: 'Plugin Registered',\n 2: 'Plugin Initialized',\n 5: 'Error',\n 10: 'Loading',\n 11: 'CanPlay',\n 15: 'Loaded',\n 20: 'Stalled',\n 25: 'Buffering',\n 30: 'Playing',\n 35: 'Paused',\n 40: 'Playback Position Changed',\n 45: 'Seeked',\n 50: 'Playback Completed',\n 55: 'Duration Changed',\n 60: 'Stopped',\n 90: 'Skip Forward',\n 95: 'Skip Backward',\n 100: 'Track Changed',\n 105: 'Playlist Completed',\n 110: 'Track Added',\n 115: 'Track Removed',\n 120: 'Playlist Cleared',\n 200: 'DEBUG_View_Disappeared',\n};\n//# sourceMappingURL=Constants.js.map","import { registerPlugin } from '@capacitor/core';\nlet playListWebInstance;\nconst Playlist = registerPlugin('Playlist', {\n web: () => import('./web').then(m => {\n if (!playListWebInstance) {\n playListWebInstance = new m.PlaylistWeb();\n }\n return playListWebInstance;\n }),\n});\nexport { Playlist };\n//# sourceMappingURL=plugin.js.map","/**\n * Validates the list of AudioTrack items to ensure they are valid.\n * Used internally but you can call this if you need to :)\n *\n * @param items The AudioTrack items to validate\n */\nexport const validateTracks = (items) => {\n if (!items || !Array.isArray(items)) {\n return [];\n }\n return items.map(validateTrack).filter(x => !!x); // may produce an empty array!\n};\n/**\n * Validate a single track and ensure it is valid for playback.\n * Used internally but you can call this if you need to :)\n *\n * @param track The AudioTrack to validate\n */\nexport const validateTrack = (track) => {\n if (!track) {\n return null;\n }\n // For now we will rely on TS to do the heavy lifting, but we can add a validation here\n // that all the required fields are valid. For now we just take care of the unique ID.\n track.trackId = track.trackId || generateUUID();\n return track;\n};\n/**\n * Generate a v4 UUID for use as a unique trackId. Used internally, but you can use this to generate track ID's if you want.\n */\nconst generateUUID = () => {\n var d = new Date().getTime();\n if (typeof performance !== 'undefined' && typeof performance.now === 'function') {\n d += performance.now(); //use high-precision timer if available\n }\n // There are better ways to do this in ES6, we are intentionally avoiding the import\n // of an ES6 polyfill here.\n const template = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n return [].slice.call(template).map(function (c) {\n if (c === '-' || c === '4') {\n return c;\n }\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);\n }).join('');\n};\n//# sourceMappingURL=utils.js.map","import { RmxAudioStatusMessage, RmxAudioStatusMessageDescriptions, } from './Constants';\nimport { validateTrack, validateTracks } from \"./utils\";\nimport { Playlist } from \"./plugin\";\n/*!\n * Module dependencies.\n */\nconst log = console;\nconst itemStatusChangeTypes = [\n RmxAudioStatusMessage.RMXSTATUS_PLAYBACK_POSITION,\n RmxAudioStatusMessage.RMXSTATUS_DURATION,\n RmxAudioStatusMessage.RMXSTATUS_BUFFERING,\n RmxAudioStatusMessage.RMXSTATUS_CANPLAY,\n RmxAudioStatusMessage.RMXSTATUS_LOADING,\n RmxAudioStatusMessage.RMXSTATUS_LOADED,\n RmxAudioStatusMessage.RMXSTATUS_PAUSE,\n RmxAudioStatusMessage.RMXSTATUS_COMPLETED,\n RmxAudioStatusMessage.RMXSTATUS_ERROR,\n];\n/**\n * AudioPlayer class implementation. A singleton of this class is exported for use by Cordova,\n * but nothing stops you from creating another instance. Keep in mind that the native players\n * are in fact singletons, so the only thing the separate instance gives you would be\n * separate onStatus callback streams.\n */\nexport class RmxAudioPlayer {\n /**\n * Creates a new RmxAudioPlayer instance.\n */\n constructor() {\n this.handlers = {};\n this.options = { verbose: false, resetStreamOnPause: true };\n this._inititialized = false;\n this._currentState = 'unknown';\n this._hasError = false;\n this._hasLoaded = false;\n this._currentItem = null;\n /**\n * Player interface\n */\n /**\n * Returns a promise that resolves when the plugin is ready.\n */\n this.ready = () => {\n return this._initPromise;\n };\n this.initialize = () => {\n Playlist.addListener('status', (data) => {\n if (data.action === 'status') {\n this.onStatus(data.status.trackId, data.status.msgType, data.status.value);\n }\n else {\n console.warn('Unknown audio player onStatus message:', data);\n }\n });\n Playlist.initialize()\n .then(() => {\n this._inititialized = true;\n this._readyResolve(true);\n })\n .catch((args) => {\n const message = 'CORDOVA RMXAUDIOPLAYER: Error storing message channel:';\n console.warn(message, args);\n this._readyReject(true);\n });\n return this._initPromise;\n };\n /**\n * Sets the player options. This can be called at any time and is not required before playback can be initiated.\n */\n this.setOptions = (options) => {\n this.options = Object.assign(Object.assign({}, this.options), options);\n return Playlist.setOptions(this.options);\n };\n /**\n * Playlist item management\n */\n /**\n * Sets the entire list of tracks to be played by the playlist.\n * This will clear all previous items from the playlist.\n * If you pass options.retainPosition = true, the current playback position will be\n * recorded and used when playback restarts. This can be used, for example, to set the\n * playlist to a new set of tracks, but retain the currently-playing item to avoid skipping.\n */\n this.setPlaylistItems = (items, options) => {\n return Playlist.setPlaylistItems({ items: validateTracks(items), options: options || {} });\n };\n /**\n * Add a single track to the end of the playlist\n */\n this.addItem = (trackItem) => {\n const validTrackItem = validateTrack(trackItem);\n if (!validTrackItem) {\n throw new Error('Provided track is null or not an audio track');\n }\n return Playlist.addItem({ item: validTrackItem });\n };\n /**\n * Adds the list of tracks to the end of the playlist.\n */\n this.addAllItems = (items) => {\n return Playlist.addAllItems({ items: validateTracks(items) });\n };\n /**\n * Removes a track from the playlist. If this is the currently playing item, the next item will automatically begin playback.\n */\n this.removeItem = (removeItem) => {\n if (!removeItem) {\n throw new Error('Track removal spec is empty');\n }\n if (!removeItem.trackId && !removeItem.trackIndex) {\n new Error('Track removal spec is invalid');\n }\n return Playlist.removeItem({ item: removeItem });\n };\n /**\n * Removes all given tracks from the playlist; these can be specified either by trackId or trackIndex. If the removed items\n * include the currently playing item, the next available item will automatically begin playing.\n */\n this.removeItems = (items) => {\n return Playlist.removeItems({ items });\n };\n /**\n * Clear the entire playlist. This will result in the STOPPED event being raised.\n */\n this.clearAllItems = () => {\n return Playlist.clearAllItems();\n };\n /**\n * Playback management\n */\n /**\n * Begin playback. If no tracks have been added, this has no effect.\n */\n this.play = () => {\n return Playlist.play();\n };\n /**\n * Play the track at the given index. If the track does not exist, this has no effect.\n */\n this.playTrackByIndex = (index, position) => {\n return Playlist.playTrackByIndex({ index, position: position || 0 });\n };\n /**\n * Play the track matching the given trackId. If the track does not exist, this has no effect.\n */\n this.playTrackById = (id, position) => {\n return Playlist.playTrackById({ id, position: position || 0 });\n };\n /**\n * Play the track matching the given trackId. If the track does not exist, this has no effect.\n */\n this.selectTrackByIndex = (index, position) => {\n return Playlist.selectTrackByIndex({ index, position: position || 0 });\n };\n /**\n * Play the track matching the given trackId. If the track does not exist, this has no effect.\n */\n this.selectTrackById = (id, position) => {\n return Playlist.selectTrackById({ id, position: position || 0 });\n };\n /**\n * Pause playback\n */\n this.pause = () => {\n return Playlist.pause();\n };\n /**\n * Skip to the next track. If you are already at the end, and loop is false, this has no effect.\n * If you are at the end, and loop is true, playback will begin at the beginning of the playlist.\n */\n this.skipForward = () => {\n return Playlist.skipForward();\n };\n /**\n * Skip to the previous track. If you are already at the beginning, this has no effect.\n */\n this.skipBack = () => {\n return Playlist.skipBack();\n };\n /**\n * Seek to the given position in the currently playing track. If the value exceeds the track length,\n * the track will complete and playback of the next track will begin.\n */\n this.seekTo = (position) => {\n return Playlist.seekTo({ position });\n };\n /**\n * Set the playback speed; a float value between [-1, 1] inclusive. If set to 0, this pauses playback.\n */\n this.setPlaybackRate = (rate) => {\n return Playlist.setPlaybackRate({ rate });\n };\n /**\n * Set the playback volume. Float value between [0, 1] inclusive.\n * On both Android and iOS, this sets the volume of the media stream, which can be externally\n * controlled by setting the overall hardware volume.\n */\n this.setVolume = (volume) => {\n return Playlist.setPlaybackVolume({ volume });\n };\n /**\n * Sets a flag indicating whether the playlist should loop back to the beginning once it reaches the end.\n */\n this.setLoop = (loop) => {\n return Playlist.setLoop({ loop: loop });\n };\n this.handlers = {};\n this._initPromise = new Promise((resolve, reject) => {\n this._readyResolve = resolve;\n this._readyReject = reject;\n });\n new Promise((resolve) => {\n window.addEventListener('beforeunload', () => resolve(), { once: true });\n }).then(() => Playlist.release());\n }\n /**\n * The current summarized state of the player, as a string. It is preferred that you use the 'isX' accessors,\n * because they properly interpret the range of these values, but this field is exposed if you wish to observe\n * or interrogate it.\n */\n get currentState() {\n return this._currentState;\n }\n /**\n * True if the plugin has been initialized. You'll likely never see this state; it is handled internally.\n */\n get isInitialized() {\n return this._inititialized;\n }\n get currentTrack() {\n return this._currentItem;\n }\n /**\n * If the playlist is currently playling a track.\n */\n get isPlaying() {\n return this._currentState === 'playing';\n }\n /**\n * True if the playlist is currently paused\n */\n get isPaused() {\n return this._currentState === 'paused' || this._currentState === 'stopped';\n }\n /**\n * True if the plugin is currently loading its *current* track.\n * On iOS, many tracks are loaded in parallel, so this only reports for the *current item*, e.g.\n * the item that will begin playback if you press pause.\n * If you need track-specific data, it is better to watch the onStatus stream and watch for RMXSTATUS_LOADING,\n * which will be raised independently & simultaneously for every track in the playlist.\n * On Android, tracks are only loaded as they begin playback, so this value and RMXSTATUS_LOADING should always\n * apply to the same track.\n */\n get isLoading() {\n return this._currentState === 'loading';\n }\n /**\n * True if the *currently playing track* has been loaded and can be played (this includes if it is *currently playing*).\n */\n get hasLoaded() {\n return this._hasLoaded;\n }\n /**\n * True if the *current track* has reported an error. In almost all cases,\n * the playlist will automatically skip forward to the next track, in which case you will also receive\n * an RMXSTATUS_TRACK_CHANGED event.\n */\n get hasError() {\n return this._hasError;\n }\n /**\n * Status event handling\n */\n /**\n * @internal\n * Call this function to emit an onStatus event via the on('status') handler.\n * Internal use only, to raise events received from the native interface.\n */\n onStatus(trackId, type, value) {\n var _a;\n const status = { type: type, trackId: trackId, value: value };\n if (this.options.verbose) {\n log.log(`RmxAudioPlayer.onStatus: ${RmxAudioStatusMessageDescriptions[type]}(${type}) [${trackId}]: `, value);\n }\n if (status.type === RmxAudioStatusMessage.RMXSTATUS_TRACK_CHANGED) {\n this._hasError = false;\n this._hasLoaded = false;\n this._currentState = 'loading';\n this._currentItem = (_a = status.value) === null || _a === void 0 ? void 0 : _a.currentItem;\n }\n // The plugin's status changes only in response to specific events.\n if (itemStatusChangeTypes.indexOf(status.type) >= 0) {\n // Only change the plugin's *current status* if the event being raised is for the current active track.\n if (this._currentItem && this._currentItem.trackId === trackId) {\n if (status.value && status.value.status) {\n this._currentState = status.value.status;\n }\n if (status.type === RmxAudioStatusMessage.RMXSTATUS_CANPLAY) {\n this._hasLoaded = true;\n }\n if (status.type === RmxAudioStatusMessage.RMXSTATUS_ERROR) {\n this._hasError = true;\n }\n }\n }\n this.emit('status', status);\n }\n on(eventName, callback) {\n if (!Object.prototype.hasOwnProperty.call(this.handlers, eventName)) {\n this.handlers[eventName] = [];\n }\n this.handlers[eventName].push(callback);\n }\n /**\n * Remove an event handler from the plugin\n * @param eventName The name of the event whose subscription is to be removed\n * @param handle The event handler to destroy. Ensure that this is the SAME INSTANCE as the handler\n * that was passed in to create the subscription!\n */\n off(eventName, handle) {\n if (Object.prototype.hasOwnProperty.call(this.handlers, eventName)) {\n const handleIndex = this.handlers[eventName].indexOf(handle);\n if (handleIndex >= 0) {\n this.handlers[eventName].splice(handleIndex, 1);\n }\n }\n }\n /**\n * @internal\n * Raises an event via the corresponding event handler. Internal use only.\n * @param args Event args to pass through to the handler.\n */\n emit(...args) {\n const eventName = args.shift();\n if (!Object.prototype.hasOwnProperty.call(this.handlers, eventName)) {\n return false;\n }\n const handler = this.handlers[eventName];\n for (let i = 0; i < handler.length; i++) {\n const callback = this.handlers[eventName][i];\n if (typeof callback === 'function') {\n callback(...args);\n }\n }\n return true;\n }\n}\n//# sourceMappingURL=RmxAudioPlayer.js.map","import { WebPlugin } from '@capacitor/core';\nimport { validateTrack, validateTracks } from \"./utils\";\nimport { RmxAudioStatusMessage } from \"./Constants\";\nexport class PlaylistWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.playlistItems = [];\n this.loop = false;\n this.options = {};\n this.currentTrack = null;\n this.lastState = \"stopped\";\n this.hlsLoaded = false;\n }\n addAllItems(options) {\n this.playlistItems = this.playlistItems.concat(validateTracks(options.items));\n return Promise.resolve();\n }\n addItem(options) {\n const track = validateTrack(options.item);\n if (track) {\n this.playlistItems.push(track);\n }\n return Promise.resolve();\n }\n async clearAllItems() {\n await this.release();\n this.playlistItems = [];\n return Promise.resolve();\n }\n async initialize() {\n return Promise.resolve();\n }\n async pause() {\n var _a;\n (_a = this.audio) === null || _a === void 0 ? void 0 : _a.pause();\n }\n async play() {\n var _a;\n return (_a = this.audio) === null || _a === void 0 ? void 0 : _a.play();\n }\n playTrackById(options) {\n console.log(\"da\");\n this.playlistItems.forEach(async (item) => {\n if (item.trackId === options.id) {\n await this.setCurrent(item);\n return this.play();\n }\n });\n return Promise.reject();\n }\n playTrackByIndex(options) {\n this.playlistItems.forEach(async (item, index) => {\n if (index === options.index) {\n await this.setCurrent(item);\n return this.play();\n }\n });\n return Promise.reject();\n }\n async release() {\n await this.pause();\n this.audio = undefined;\n return Promise.resolve();\n }\n removeItem(options) {\n this.playlistItems.forEach((item, index) => {\n if (options.item.trackIndex && options.item.trackIndex === index) {\n this.playlistItems.splice(index, 1);\n }\n else if (options.item.trackId && options.item.trackId === item.trackId) {\n this.playlistItems.splice(index, 1);\n }\n });\n return Promise.resolve();\n }\n removeItems(options) {\n options.items.forEach((item) => {\n this.removeItem({ item });\n });\n return Promise.resolve();\n }\n seekTo(options) {\n if (this.audio) {\n this.audio.currentTime = options.position;\n return Promise.resolve();\n }\n return Promise.reject();\n }\n selectTrackById(options) {\n for (const item of this.playlistItems) {\n if (item.trackId === options.id) {\n return this.setCurrent(item);\n }\n }\n return Promise.reject();\n }\n selectTrackByIndex(options) {\n let index = 0;\n for (const item of this.playlistItems) {\n if (index === options.index) {\n return this.setCurrent(item);\n }\n index++;\n }\n return Promise.reject();\n }\n setLoop(options) {\n this.loop = options.loop;\n return Promise.resolve();\n }\n setOptions(options) {\n this.options = options || {};\n return Promise.resolve();\n }\n setPlaybackVolume(options) {\n if (this.audio) {\n this.audio.volume = options.volume;\n return Promise.resolve();\n }\n return Promise.reject();\n }\n setPlaylistItems(options) {\n var _a;\n this.playlistItems = options.items;\n if (this.playlistItems.length > 0) {\n return this.setCurrent(this.playlistItems[0], ((_a = options.options) === null || _a === void 0 ? void 0 : _a.playFromPosition) || 0);\n }\n return Promise.resolve();\n }\n skipForward() {\n let found = null;\n this.playlistItems.forEach((item, index) => {\n if (!found && this.getCurrentTrackId() === item.trackId) {\n found = index;\n }\n });\n if (found === this.playlistItems.length - 1) {\n found = -1;\n }\n if (found !== null) {\n return this.setCurrent(this.playlistItems[found + 1]);\n }\n return Promise.reject();\n }\n skipBack() {\n let found = null;\n this.playlistItems.forEach((item, index) => {\n if (!found && this.getCurrentTrackId() === item.trackId) {\n found = index;\n }\n });\n if (found === 0) {\n found = this.playlistItems.length - 1;\n }\n if (found !== null) {\n this.setCurrent(this.playlistItems[found - 1]);\n return Promise.resolve();\n }\n return Promise.reject();\n }\n setPlaybackRate(options) {\n if (this.audio) {\n this.audio.playbackRate = options.rate;\n return Promise.resolve();\n }\n return Promise.reject();\n }\n // register events\n /*\n private registerHlsListeners(hls: Hls, position?: number) {\n hls.on(Hls.Events.MANIFEST_PARSED, async () => {\n this.notifyListeners('status', {\n action: \"status\",\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_CANPLAY,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('loading'),\n }\n })\n if(position) {\n await this.seekTo({position});\n }\n });\n }*/\n registerHtmlListeners(position) {\n const canPlayListener = async () => {\n var _a;\n this.notifyListeners('status', {\n action: \"status\",\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_CANPLAY,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('loading'),\n }\n });\n if (position) {\n await this.seekTo({ position });\n }\n (_a = this.audio) === null || _a === void 0 ? void 0 : _a.removeEventListener('canplay', canPlayListener);\n };\n if (this.audio) {\n this.audio.addEventListener('canplay', canPlayListener);\n this.audio.addEventListener('playing', () => {\n this.notifyListeners('status', {\n action: \"status\",\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_PLAYING,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('playing'),\n }\n });\n });\n this.audio.addEventListener('pause', () => {\n this.notifyListeners('status', {\n action: \"status\",\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_PAUSE,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('paused'),\n }\n });\n });\n this.audio.addEventListener('error', () => {\n this.notifyListeners('status', {\n action: \"status\",\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_ERROR,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('error'),\n }\n });\n });\n this.audio.addEventListener('ended', () => {\n this.notifyListeners('status', {\n action: \"status\",\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_STOPPED,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('stopped'),\n }\n });\n });\n this.audio.addEventListener('timeupdate', () => {\n this.notifyListeners('status', {\n action: \"status\",\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_PLAYBACK_POSITION,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus(this.lastState),\n }\n });\n });\n }\n }\n getCurrentTrackId() {\n if (this.currentTrack) {\n return this.currentTrack.trackId;\n }\n return \"INVALID\";\n }\n getCurrentIndex() {\n if (this.currentTrack) {\n for (let i = 0; i < this.playlistItems.length; i++) {\n if (this.playlistItems[i].trackId === this.currentTrack.trackId) {\n return i;\n }\n }\n }\n return -1;\n }\n getCurrentTrackStatus(currentState) {\n var _a, _b;\n this.lastState = currentState;\n return {\n trackId: this.getCurrentTrackId(),\n isStream: !!((_a = this.currentTrack) === null || _a === void 0 ? void 0 : _a.isStream),\n currentIndex: this.getCurrentIndex(),\n status: currentState,\n currentPosition: (_b = this.audio) === null || _b === void 0 ? void 0 : _b.currentTime,\n };\n }\n async setCurrent(item, position) {\n let wasPlaying = false;\n if (this.audio) {\n wasPlaying = !this.audio.paused;\n this.audio.pause();\n this.audio.src = \"\";\n this.audio.removeAttribute('src');\n this.audio.load();\n }\n this.audio = document.createElement('video');\n this.currentTrack = item;\n if (item.assetUrl.includes('.m3u8')) {\n await this.loadHlsJs();\n const hls = new Hls({\n autoStartLoad: true,\n debug: false,\n enableWorker: true,\n });\n hls.attachMedia(this.audio);\n hls.on(Hls.Events.MEDIA_ATTACHED, () => {\n hls.loadSource(item.assetUrl);\n });\n //this.registerHlsListeners(hls, position);\n }\n else {\n this.audio.src = item.assetUrl;\n }\n await this.registerHtmlListeners(position);\n if (wasPlaying) {\n this.audio.addEventListener('canplay', () => {\n this.play();\n });\n }\n this.notifyListeners(\"status\", {\n action: \"status\",\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_TRACK_CHANGED,\n trackId: this.getCurrentTrackId(),\n value: {\n currentItem: item\n }\n }\n });\n }\n log(message, ...optionalParams) {\n if (this.options.verbose) {\n console.log(message, ...optionalParams);\n }\n }\n loadHlsJs() {\n if (this.hlsLoaded) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = 'https://cdn.jsdelivr.net/npm/hls.js@0.9.1';\n document.getElementsByTagName('head')[0].appendChild(script);\n script.onload = () => {\n this.hlsLoaded = true;\n resolve();\n };\n script.onerror = () => {\n reject();\n };\n });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["RmxAudioErrorType","RmxAudioStatusMessage","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA,uCAAkB;IAC7B,CAAC,UAAU,iBAAiB,EAAE;IAC9B,IAAI,iBAAiB,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,oBAAoB,CAAC;IAC1F,IAAI,iBAAiB,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,gBAAgB,CAAC;IAClF,IAAI,iBAAiB,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,gBAAgB,CAAC;IAClF,IAAI,iBAAiB,CAAC,iBAAiB,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;IAChF,IAAI,iBAAiB,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,uBAAuB,CAAC;IAChG,CAAC,EAAEA,yBAAiB,KAAKA,yBAAiB,GAAG,EAAE,CAAC,CAAC,CAAC;IAElD;IACA;IACA;AACY,UAAC,6BAA6B,GAAG;IAC7C,IAAI,mBAAmB;IACvB,IAAI,SAAS;IACb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EAAE,CAAC;IACrC,SAAS;IACT,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;IAChD,YAAY,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC1D,YAAY,MAAM,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAC5C,YAAY,MAAM,CAAC,GAAG,GAAG,2CAA2C,CAAC;IACrE,YAAY,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACzE,YAAY,MAAM,CAAC,MAAM,GAAG,MAAM;IAClC,gBAAgB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACtC,gBAAgB,OAAO,EAAE,CAAC;IAC1B,aAAa,CAAC;IACd,YAAY,MAAM,CAAC,OAAO,GAAG,MAAM;IACnC,gBAAgB,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC;IACd,SAAS,CAAC,CAAC;IACX,KAAK;IACL;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/Constants.js","esm/plugin.js","esm/utils.js","esm/RmxAudioPlayer.js","esm/web.js"],"sourcesContent":["/**\n * Enum describing the possible errors that may come from the plugins\n */\nexport var RmxAudioErrorType;\n(function (RmxAudioErrorType) {\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_NONE_ACTIVE\"] = 0] = \"RMXERR_NONE_ACTIVE\";\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_ABORTED\"] = 1] = \"RMXERR_ABORTED\";\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_NETWORK\"] = 2] = \"RMXERR_NETWORK\";\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_DECODE\"] = 3] = \"RMXERR_DECODE\";\n RmxAudioErrorType[RmxAudioErrorType[\"RMXERR_NONE_SUPPORTED\"] = 4] = \"RMXERR_NONE_SUPPORTED\";\n})(RmxAudioErrorType || (RmxAudioErrorType = {}));\n;\n/**\n * String descriptions corresponding to the RmxAudioErrorType values\n */\nexport const RmxAudioErrorTypeDescriptions = [\n 'No Active Sources',\n 'Aborted',\n 'Network',\n 'Failed to Decode',\n 'No Supported Sources',\n];\n/**\n * Enumeration of all status messages raised by the plugin.\n * NONE, REGISTER and INIT are structural and probably not useful to you.\n */\nexport var RmxAudioStatusMessage;\n(function (RmxAudioStatusMessage) {\n /**\n * The starting state of the plugin. You will never see this value;\n * it changes before the callbacks are even registered to report changes to this value.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_NONE\"] = 0] = \"RMXSTATUS_NONE\";\n /**\n * Raised when the plugin registers the callback handler for onStatus callbacks.\n * You will probably not be able to see this (nor do you need to).\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_REGISTER\"] = 1] = \"RMXSTATUS_REGISTER\";\n /**\n * Reserved for future use\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_INIT\"] = 2] = \"RMXSTATUS_INIT\";\n /**\n * Indicates an error is reported in the 'value' field.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_ERROR\"] = 5] = \"RMXSTATUS_ERROR\";\n /**\n * The reported track is being loaded by the player\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_LOADING\"] = 10] = \"RMXSTATUS_LOADING\";\n /**\n * The reported track is able to begin playback\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_CANPLAY\"] = 11] = \"RMXSTATUS_CANPLAY\";\n /**\n * The reported track has loaded 100% of the file (either from disc or network)\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_LOADED\"] = 15] = \"RMXSTATUS_LOADED\";\n /**\n * (iOS only): Playback has stalled due to insufficient network\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_STALLED\"] = 20] = \"RMXSTATUS_STALLED\";\n /**\n * Reports an update in the reported track's buffering status\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_BUFFERING\"] = 25] = \"RMXSTATUS_BUFFERING\";\n /**\n * The reported track has started (or resumed) playing\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PLAYING\"] = 30] = \"RMXSTATUS_PLAYING\";\n /**\n * The reported track has been paused, either by the user or by the system.\n * (iOS only): This value is raised when MP3's are malformed (but still playable).\n * These require the user to explicitly press play again. This can be worked\n * around and is on the TODO list.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PAUSE\"] = 35] = \"RMXSTATUS_PAUSE\";\n /**\n * Reports a change in the reported track's playback position.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PLAYBACK_POSITION\"] = 40] = \"RMXSTATUS_PLAYBACK_POSITION\";\n /**\n * The reported track has seeked.\n * On Android, only the plugin consumer can generate this (Notification controls on Android do not include a seek bar).\n * On iOS, the Command Center includes a seek bar so this will be reported when the user has seeked via Command Center.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_SEEK\"] = 45] = \"RMXSTATUS_SEEK\";\n /**\n * The reported track has completed playback.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_COMPLETED\"] = 50] = \"RMXSTATUS_COMPLETED\";\n /**\n * The reported track's duration has changed. This is raised once, when duration is updated for the first time.\n * For streams, this value is never reported.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_DURATION\"] = 55] = \"RMXSTATUS_DURATION\";\n /**\n * All playback has stopped, probably because the plugin is shutting down.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_STOPPED\"] = 60] = \"RMXSTATUS_STOPPED\";\n /**\n * The playlist has skipped forward to the next track.\n * On both Android and iOS, this will be raised if the notification controls/Command Center were used to skip.\n * It is unlikely you need to consume this event: RMXSTATUS_TRACK_CHANGED is also reported when this occurs,\n * so you can generalize your track change handling in one place.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMX_STATUS_SKIP_FORWARD\"] = 90] = \"RMX_STATUS_SKIP_FORWARD\";\n /**\n * The playlist has skipped back to the previous track.\n * On both Android and iOS, this will be raised if the notification controls/Command Center were used to skip.\n * It is unlikely you need to consume this event: RMXSTATUS_TRACK_CHANGED is also reported when this occurs,\n * so you can generalize your track change handling in one place.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMX_STATUS_SKIP_BACK\"] = 95] = \"RMX_STATUS_SKIP_BACK\";\n /**\n * Reported when the current track has changed in the native player. This event contains full data about\n * the new track, including the index and the actual track itself. The type of the 'value' field in this case\n * is OnStatusTrackChangedData.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_TRACK_CHANGED\"] = 100] = \"RMXSTATUS_TRACK_CHANGED\";\n /**\n * The entire playlist has completed playback.\n * After this event has been raised, the current item is set to null and the current index to -1.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PLAYLIST_COMPLETED\"] = 105] = \"RMXSTATUS_PLAYLIST_COMPLETED\";\n /**\n * An item has been added to the playlist. For the setPlaylistItems and addAllItems methods, this status is\n * raised once for every track in the collection.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_ITEM_ADDED\"] = 110] = \"RMXSTATUS_ITEM_ADDED\";\n /**\n * An item has been removed from the playlist. For the removeItems and clearAllItems methods, this status is\n * raised once for every track that was removed.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_ITEM_REMOVED\"] = 115] = \"RMXSTATUS_ITEM_REMOVED\";\n /**\n * All items have been removed from the playlist\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_PLAYLIST_CLEARED\"] = 120] = \"RMXSTATUS_PLAYLIST_CLEARED\";\n /**\n * Just for testing.. you don't need this and in fact can never receive it, the plugin is destroyed before it can be raised.\n */\n RmxAudioStatusMessage[RmxAudioStatusMessage[\"RMXSTATUS_VIEWDISAPPEAR\"] = 200] = \"RMXSTATUS_VIEWDISAPPEAR\";\n})(RmxAudioStatusMessage || (RmxAudioStatusMessage = {}));\n;\n/**\n * String descriptions corresponding to the RmxAudioStatusMessage values\n */\nexport const RmxAudioStatusMessageDescriptions = {\n 0: 'No Status',\n 1: 'Plugin Registered',\n 2: 'Plugin Initialized',\n 5: 'Error',\n 10: 'Loading',\n 11: 'CanPlay',\n 15: 'Loaded',\n 20: 'Stalled',\n 25: 'Buffering',\n 30: 'Playing',\n 35: 'Paused',\n 40: 'Playback Position Changed',\n 45: 'Seeked',\n 50: 'Playback Completed',\n 55: 'Duration Changed',\n 60: 'Stopped',\n 90: 'Skip Forward',\n 95: 'Skip Backward',\n 100: 'Track Changed',\n 105: 'Playlist Completed',\n 110: 'Track Added',\n 115: 'Track Removed',\n 120: 'Playlist Cleared',\n 200: 'DEBUG_View_Disappeared',\n};\n//# sourceMappingURL=Constants.js.map","import { registerPlugin } from '@capacitor/core';\n// todo: find out why we get imported twice\nlet playListWebInstance;\nconst Playlist = registerPlugin('Playlist', {\n web: () => import('./web').then(m => {\n if (!playListWebInstance) {\n playListWebInstance = new m.PlaylistWeb();\n }\n return playListWebInstance;\n }),\n});\nexport { Playlist };\n//# sourceMappingURL=plugin.js.map","/**\n * Validates the list of AudioTrack items to ensure they are valid.\n * Used internally but you can call this if you need to :)\n *\n * @param items The AudioTrack items to validate\n */\nexport const validateTracks = (items) => {\n if (!items || !Array.isArray(items)) {\n return [];\n }\n return items.map(validateTrack).filter(x => !!x); // may produce an empty array!\n};\n/**\n * Validate a single track and ensure it is valid for playback.\n * Used internally but you can call this if you need to :)\n *\n * @param track The AudioTrack to validate\n */\nexport const validateTrack = (track) => {\n if (!track) {\n return null;\n }\n // For now we will rely on TS to do the heavy lifting, but we can add a validation here\n // that all the required fields are valid. For now we just take care of the unique ID.\n track.trackId = track.trackId || generateUUID();\n return track;\n};\n/**\n * Generate a v4 UUID for use as a unique trackId. Used internally, but you can use this to generate track ID's if you want.\n */\nconst generateUUID = () => {\n var d = new Date().getTime();\n if (typeof performance !== 'undefined' && typeof performance.now === 'function') {\n d += performance.now(); //use high-precision timer if available\n }\n // There are better ways to do this in ES6, we are intentionally avoiding the import\n // of an ES6 polyfill here.\n const template = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n return [].slice.call(template).map(function (c) {\n if (c === '-' || c === '4') {\n return c;\n }\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);\n }).join('');\n};\n//# sourceMappingURL=utils.js.map","import { RmxAudioStatusMessage, RmxAudioStatusMessageDescriptions } from './Constants';\nimport { Playlist } from './plugin';\nimport { validateTrack, validateTracks } from './utils';\n/*!\n * Module dependencies.\n */\nconst itemStatusChangeTypes = [\n RmxAudioStatusMessage.RMXSTATUS_PLAYBACK_POSITION,\n RmxAudioStatusMessage.RMXSTATUS_DURATION,\n RmxAudioStatusMessage.RMXSTATUS_BUFFERING,\n RmxAudioStatusMessage.RMXSTATUS_CANPLAY,\n RmxAudioStatusMessage.RMXSTATUS_LOADING,\n RmxAudioStatusMessage.RMXSTATUS_LOADED,\n RmxAudioStatusMessage.RMXSTATUS_PAUSE,\n RmxAudioStatusMessage.RMXSTATUS_COMPLETED,\n RmxAudioStatusMessage.RMXSTATUS_ERROR,\n];\nexport class RmxAudioPlayer {\n /**\n * Creates a new RmxAudioPlayer instance.\n */\n constructor() {\n this.handlers = {};\n this.options = { verbose: false, resetStreamOnPause: true };\n this._inititialized = false;\n this._readyResolve = () => {\n };\n this._readyReject = () => {\n };\n this._currentState = 'unknown';\n this._hasError = false;\n this._hasLoaded = false;\n this._currentItem = null;\n /**\n * Player interface\n */\n /**\n * Returns a promise that resolves when the plugin is ready.\n */\n this.ready = () => {\n return this._initPromise;\n };\n this.initialize = async () => {\n Playlist.addListener('status', (data) => {\n if (data.action === 'status') {\n this.onStatus(data.status.trackId, data.status.msgType, data.status.value);\n }\n else {\n console.warn('Unknown audio player onStatus message:', data);\n }\n });\n try {\n await Playlist.initialize();\n this._inititialized = true;\n this._readyResolve();\n }\n catch (args) {\n const message = 'Capacitor RMXAUDIOPLAYER: Error initializing:';\n console.warn(message, args);\n this._readyReject();\n }\n return this._initPromise;\n };\n /**\n * Sets the player options. This can be called at any time and is not required before playback can be initiated.\n */\n this.setOptions = (options) => {\n this.options = Object.assign(Object.assign({}, this.options), options);\n return Playlist.setOptions(this.options);\n };\n /**\n * Playlist item management\n */\n /**\n * Sets the entire list of tracks to be played by the playlist.\n * This will clear all previous items from the playlist.\n * If you pass options.retainPosition = true, the current playback position will be\n * recorded and used when playback restarts. This can be used, for example, to set the\n * playlist to a new set of tracks, but retain the currently-playing item to avoid skipping.\n */\n this.setPlaylistItems = (items, options) => {\n return Playlist.setPlaylistItems({ items: validateTracks(items), options: options || {} });\n };\n /**\n * Add a single track to the end of the playlist\n */\n this.addItem = (trackItem) => {\n const validTrackItem = validateTrack(trackItem);\n if (!validTrackItem) {\n throw new Error('Provided track is null or not an audio track');\n }\n return Playlist.addItem({ item: validTrackItem });\n };\n /**\n * Adds the list of tracks to the end of the playlist.\n */\n this.addAllItems = (items) => {\n return Playlist.addAllItems({ items: validateTracks(items) });\n };\n /**\n * Removes a track from the playlist. If this is the currently playing item, the next item will automatically begin playback.\n */\n this.removeItem = (removeItem) => {\n if (!removeItem) {\n throw new Error('Track removal spec is empty');\n }\n if (!removeItem.trackId && !removeItem.trackIndex) {\n new Error('Track removal spec is invalid');\n }\n return Playlist.removeItem({ trackId: removeItem.trackId, trackIndex: removeItem.trackIndex });\n };\n /**\n * Removes all given tracks from the playlist; these can be specified either by trackId or trackIndex. If the removed items\n * include the currently playing item, the next available item will automatically begin playing.\n */\n this.removeItems = (items) => {\n return Playlist.removeItems({ items: items });\n };\n /**\n * Clear the entire playlist. This will result in the STOPPED event being raised.\n */\n this.clearAllItems = () => {\n return Playlist.clearAllItems();\n };\n /**\n * Playback management\n */\n /**\n * Begin playback. If no tracks have been added, this has no effect.\n */\n this.play = () => {\n return Playlist.play();\n };\n /**\n * Play the track at the given index. If the track does not exist, this has no effect.\n */\n this.playTrackByIndex = (index, position) => {\n return Playlist.playTrackByIndex({ index, position: position || 0 });\n };\n /**\n * Play the track matching the given trackId. If the track does not exist, this has no effect.\n */\n this.playTrackById = (id, position) => {\n return Playlist.playTrackById({ id, position: position || 0 });\n };\n /**\n * Play the track matching the given trackId. If the track does not exist, this has no effect.\n */\n this.selectTrackByIndex = (index, position) => {\n return Playlist.selectTrackByIndex({ index, position: position || 0 });\n };\n /**\n * Play the track matching the given trackId. If the track does not exist, this has no effect.\n */\n this.selectTrackById = (id, position) => {\n return Playlist.selectTrackById({ id, position: position || 0 });\n };\n /**\n * Pause playback\n */\n this.pause = () => {\n return Playlist.pause();\n };\n /**\n * Skip to the next track. If you are already at the end, and loop is false, this has no effect.\n * If you are at the end, and loop is true, playback will begin at the beginning of the playlist.\n */\n this.skipForward = () => {\n return Playlist.skipForward();\n };\n /**\n * Skip to the previous track. If you are already at the beginning, this has no effect.\n */\n this.skipBack = () => {\n return Playlist.skipBack();\n };\n /**\n * Seek to the given position in the currently playing track. If the value exceeds the track length,\n * the track will complete and playback of the next track will begin.\n */\n this.seekTo = (position) => {\n return Playlist.seekTo({ position });\n };\n /**\n * Set the playback speed; a float value between [-1, 1] inclusive. If set to 0, this pauses playback.\n */\n this.setPlaybackRate = (rate) => {\n return Playlist.setPlaybackRate({ rate });\n };\n /**\n * Set the playback volume. Float value between [0, 1] inclusive.\n * On both Android and iOS, this sets the volume of the media stream, which can be externally\n * controlled by setting the overall hardware volume.\n */\n this.setVolume = (volume) => {\n return Playlist.setPlaybackVolume({ volume });\n };\n /**\n * Sets a flag indicating whether the playlist should loop back to the beginning once it reaches the end.\n */\n this.setLoop = (loop) => {\n return Playlist.setLoop({ loop: loop });\n };\n this.handlers = {};\n this._initPromise = new Promise((resolve, reject) => {\n this._readyResolve = resolve;\n this._readyReject = reject;\n });\n new Promise((resolve) => {\n window.addEventListener('beforeunload', () => resolve(), { once: true });\n }).then(() => Playlist.release());\n }\n /**\n * The current summarized state of the player, as a string. It is preferred that you use the 'isX' accessors,\n * because they properly interpret the range of these values, but this field is exposed if you wish to observe\n * or interrogate it.\n */\n get currentState() {\n return this._currentState;\n }\n /**\n * True if the plugin has been initialized. You'll likely never see this state; it is handled internally.\n */\n get isInitialized() {\n return this._inititialized;\n }\n get currentTrack() {\n return this._currentItem;\n }\n /**\n * If the playlist is currently playling a track.\n */\n get isPlaying() {\n return this._currentState === 'playing';\n }\n /**\n * True if the playlist is currently paused\n */\n get isPaused() {\n return this._currentState === 'paused' || this._currentState === 'stopped';\n }\n /**\n * True if the plugin is currently loading its *current* track.\n * On iOS, many tracks are loaded in parallel, so this only reports for the *current item*, e.g.\n * the item that will begin playback if you press pause.\n * If you need track-specific data, it is better to watch the onStatus stream and watch for RMXSTATUS_LOADING,\n * which will be raised independently & simultaneously for every track in the playlist.\n * On Android, tracks are only loaded as they begin playback, so this value and RMXSTATUS_LOADING should always\n * apply to the same track.\n */\n get isLoading() {\n return this._currentState === 'loading';\n }\n /**\n * True if the *currently playing track* has been loaded and can be played (this includes if it is *currently playing*).\n */\n get hasLoaded() {\n return this._hasLoaded;\n }\n /**\n * True if the *current track* has reported an error. In almost all cases,\n * the playlist will automatically skip forward to the next track, in which case you will also receive\n * an RMXSTATUS_TRACK_CHANGED event.\n */\n get hasError() {\n return this._hasError;\n }\n /**\n * Status event handling\n */\n /**\n * @internal\n * Call this function to emit an onStatus event via the on('status') handler.\n * Internal use only, to raise events received from the native interface.\n */\n onStatus(trackId, type, value) {\n var _a;\n const status = { type: type, trackId: trackId, value: value };\n if (this.options.verbose) {\n console.debug(`RmxAudioPlayer.onStatus: ${RmxAudioStatusMessageDescriptions[type]}(${type}) [${trackId}]: `, value);\n }\n if (status.type === RmxAudioStatusMessage.RMXSTATUS_TRACK_CHANGED) {\n this._hasError = false;\n this._hasLoaded = false;\n this._currentState = 'loading';\n this._currentItem = (_a = status.value) === null || _a === void 0 ? void 0 : _a.currentItem;\n }\n // The plugin's status changes only in response to specific events.\n if (itemStatusChangeTypes.indexOf(status.type) >= 0) {\n // Only change the plugin's *current status* if the event being raised is for the current active track.\n if (this._currentItem && this._currentItem.trackId === trackId) {\n if (status.value && status.value.status) {\n this._currentState = status.value.status;\n }\n if (status.type === RmxAudioStatusMessage.RMXSTATUS_CANPLAY) {\n this._hasLoaded = true;\n }\n if (status.type === RmxAudioStatusMessage.RMXSTATUS_ERROR) {\n this._hasError = true;\n }\n }\n }\n this.emit('status', status);\n }\n on(eventName, callback) {\n if (!Object.prototype.hasOwnProperty.call(this.handlers, eventName)) {\n this.handlers[eventName] = [];\n }\n this.handlers[eventName].push(callback);\n }\n /**\n * Remove an event handler from the plugin\n * @param eventName The name of the event whose subscription is to be removed\n * @param handle The event handler to destroy. Ensure that this is the SAME INSTANCE as the handler\n * that was passed in to create the subscription!\n */\n off(eventName, handle) {\n if (Object.prototype.hasOwnProperty.call(this.handlers, eventName)) {\n const handleIndex = this.handlers[eventName].indexOf(handle);\n if (handleIndex >= 0) {\n this.handlers[eventName].splice(handleIndex, 1);\n }\n }\n }\n /**\n * @internal\n * Raises an event via the corresponding event handler. Internal use only.\n * @param args Event args to pass through to the handler.\n */\n emit(...args) {\n const eventName = args.shift();\n if (!Object.prototype.hasOwnProperty.call(this.handlers, eventName)) {\n return false;\n }\n const handler = this.handlers[eventName];\n for (let i = 0; i < handler.length; i++) {\n const callback = this.handlers[eventName][i];\n if (typeof callback === 'function') {\n callback(...args);\n }\n }\n return true;\n }\n}\n//# sourceMappingURL=RmxAudioPlayer.js.map","import { WebPlugin } from '@capacitor/core';\nimport { RmxAudioStatusMessage } from './Constants';\nimport { validateTrack, validateTracks } from './utils';\nexport class PlaylistWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.playlistItems = [];\n this.loop = false;\n this.options = {};\n this.currentTrack = null;\n this.lastState = 'stopped';\n this.hlsLoaded = false;\n }\n addAllItems(options) {\n this.playlistItems = this.playlistItems.concat(validateTracks(options.items));\n return Promise.resolve();\n }\n addItem(options) {\n const track = validateTrack(options.item);\n if (track) {\n this.playlistItems.push(track);\n }\n return Promise.resolve();\n }\n async clearAllItems() {\n await this.release();\n this.playlistItems = [];\n return Promise.resolve();\n }\n async initialize() {\n return Promise.resolve();\n }\n async pause() {\n var _a;\n (_a = this.audio) === null || _a === void 0 ? void 0 : _a.pause();\n }\n async play() {\n var _a;\n return (_a = this.audio) === null || _a === void 0 ? void 0 : _a.play();\n }\n playTrackById(options) {\n this.playlistItems.forEach(async (item) => {\n if (item.trackId === options.id) {\n await this.setCurrent(item);\n return this.play();\n }\n });\n return Promise.reject();\n }\n playTrackByIndex(options) {\n this.playlistItems.forEach(async (item, index) => {\n if (index === options.index) {\n await this.setCurrent(item);\n return this.play();\n }\n });\n return Promise.reject();\n }\n async release() {\n await this.pause();\n this.audio = undefined;\n return Promise.resolve();\n }\n removeItem(options) {\n this.playlistItems.forEach((item, index) => {\n if (options.trackIndex && options.trackIndex === index) {\n this.playlistItems.splice(index, 1);\n }\n else if (options.trackId && options.trackId === item.trackId) {\n this.playlistItems.splice(index, 1);\n }\n });\n return Promise.resolve();\n }\n removeItems(options) {\n options.items.forEach((item) => {\n this.removeItem(item);\n });\n return Promise.resolve();\n }\n seekTo(options) {\n if (this.audio) {\n this.audio.currentTime = options.position;\n return Promise.resolve();\n }\n return Promise.reject();\n }\n selectTrackById(options) {\n for (const item of this.playlistItems) {\n if (item.trackId === options.id) {\n return this.setCurrent(item);\n }\n }\n return Promise.reject();\n }\n selectTrackByIndex(options) {\n let index = 0;\n for (const item of this.playlistItems) {\n if (index === options.index) {\n return this.setCurrent(item);\n }\n index++;\n }\n return Promise.reject();\n }\n setLoop(options) {\n this.loop = options.loop;\n return Promise.resolve();\n }\n setOptions(options) {\n this.options = options || {};\n return Promise.resolve();\n }\n setPlaybackVolume(options) {\n if (this.audio) {\n this.audio.volume = options.volume;\n return Promise.resolve();\n }\n return Promise.reject();\n }\n setPlaylistItems(options) {\n var _a;\n this.playlistItems = options.items;\n if (this.playlistItems.length > 0) {\n return this.setCurrent(this.playlistItems[0], ((_a = options.options) === null || _a === void 0 ? void 0 : _a.playFromPosition) || 0);\n }\n return Promise.resolve();\n }\n skipForward() {\n let found = null;\n this.playlistItems.forEach((item, index) => {\n if (!found && this.getCurrentTrackId() === item.trackId) {\n found = index;\n }\n });\n if (found === this.playlistItems.length - 1) {\n found = -1;\n }\n if (found !== null) {\n return this.setCurrent(this.playlistItems[found + 1]);\n }\n return Promise.reject();\n }\n skipBack() {\n let found = null;\n this.playlistItems.forEach((item, index) => {\n if (!found && this.getCurrentTrackId() === item.trackId) {\n found = index;\n }\n });\n if (found === 0) {\n found = this.playlistItems.length - 1;\n }\n if (found !== null) {\n this.setCurrent(this.playlistItems[found - 1]);\n return Promise.resolve();\n }\n return Promise.reject();\n }\n setPlaybackRate(options) {\n if (this.audio) {\n this.audio.playbackRate = options.rate;\n return Promise.resolve();\n }\n return Promise.reject();\n }\n // register events\n /*\n private registerHlsListeners(hls: Hls, position?: number) {\n hls.on(Hls.Events.MANIFEST_PARSED, async () => {\n this.notifyListeners('status', {\n action: \"status\",\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_CANPLAY,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('loading'),\n }\n })\n if(position) {\n await this.seekTo({position});\n }\n });\n }*/\n registerHtmlListeners(position) {\n const canPlayListener = async () => {\n var _a;\n this.notifyListeners('status', {\n action: 'status',\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_CANPLAY,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('loading'),\n }\n });\n if (position) {\n await this.seekTo({ position });\n }\n (_a = this.audio) === null || _a === void 0 ? void 0 : _a.removeEventListener('canplay', canPlayListener);\n };\n if (this.audio) {\n this.audio.addEventListener('canplay', canPlayListener);\n this.audio.addEventListener('playing', () => {\n this.notifyListeners('status', {\n action: 'status',\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_PLAYING,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('playing'),\n }\n });\n });\n this.audio.addEventListener('pause', () => {\n this.notifyListeners('status', {\n action: 'status',\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_PAUSE,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('paused'),\n }\n });\n });\n this.audio.addEventListener('error', () => {\n this.notifyListeners('status', {\n action: 'status',\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_ERROR,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('error'),\n }\n });\n });\n this.audio.addEventListener('ended', () => {\n this.notifyListeners('status', {\n action: 'status',\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_STOPPED,\n trackId: this.getCurrentTrackId(),\n value: this.getCurrentTrackStatus('stopped'),\n }\n });\n });\n let lastTrackId, lastPosition;\n this.audio.addEventListener('timeupdate', () => {\n const status = this.getCurrentTrackStatus(this.lastState);\n if (lastTrackId !== this.getCurrentTrackId() || lastPosition !== status.currentPosition) {\n this.notifyListeners('status', {\n action: 'status',\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_PLAYBACK_POSITION,\n trackId: this.getCurrentTrackId(),\n value: status,\n }\n });\n lastTrackId = this.getCurrentTrackId();\n lastPosition = status.currentPosition;\n }\n });\n }\n }\n getCurrentTrackId() {\n if (this.currentTrack) {\n return this.currentTrack.trackId;\n }\n return 'INVALID';\n }\n getCurrentIndex() {\n if (this.currentTrack) {\n for (let i = 0; i < this.playlistItems.length; i++) {\n if (this.playlistItems[i].trackId === this.currentTrack.trackId) {\n return i;\n }\n }\n }\n return -1;\n }\n getCurrentTrackStatus(currentState) {\n var _a, _b;\n this.lastState = currentState;\n return {\n trackId: this.getCurrentTrackId(),\n isStream: !!((_a = this.currentTrack) === null || _a === void 0 ? void 0 : _a.isStream),\n currentIndex: this.getCurrentIndex(),\n status: currentState,\n currentPosition: ((_b = this.audio) === null || _b === void 0 ? void 0 : _b.currentTime) || 0,\n };\n }\n async setCurrent(item, position) {\n let wasPlaying = false;\n if (this.audio) {\n wasPlaying = !this.audio.paused;\n this.audio.pause();\n this.audio.src = '';\n this.audio.removeAttribute('src');\n this.audio.load();\n }\n this.audio = document.createElement('video');\n this.currentTrack = item;\n if (item.assetUrl.includes('.m3u8')) {\n await this.loadHlsJs();\n const hls = new Hls({\n autoStartLoad: true,\n debug: false,\n enableWorker: true,\n });\n hls.attachMedia(this.audio);\n hls.on(Hls.Events.MEDIA_ATTACHED, () => {\n hls.loadSource(item.assetUrl);\n });\n //this.registerHlsListeners(hls, position);\n }\n else {\n this.audio.src = item.assetUrl;\n }\n await this.registerHtmlListeners(position);\n if (wasPlaying) {\n this.audio.addEventListener('canplay', () => {\n this.play();\n });\n }\n this.notifyListeners('status', {\n action: 'status',\n status: {\n msgType: RmxAudioStatusMessage.RMXSTATUS_TRACK_CHANGED,\n trackId: this.getCurrentTrackId(),\n value: {\n currentItem: item\n }\n }\n });\n }\n log(message, ...optionalParams) {\n if (this.options.verbose) {\n console.log(message, ...optionalParams);\n }\n }\n loadHlsJs() {\n if (this.hlsLoaded) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = 'https://cdn.jsdelivr.net/npm/hls.js@1.1.1';\n document.getElementsByTagName('head')[0].appendChild(script);\n script.onload = () => {\n this.hlsLoaded = true;\n resolve(void 0);\n };\n script.onerror = () => {\n reject();\n };\n });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["RmxAudioErrorType","RmxAudioStatusMessage","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA,uCAAkB;IAC7B,CAAC,UAAU,iBAAiB,EAAE;IA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C,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACzE,YAAY,MAAM,CAAC,MAAM,GAAG,MAAM;IAClC,gBAAgB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACtC,gBAAgB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAChC,aAAa,CAAC;IACd,YAAY,MAAM,CAAC,OAAO,GAAG,MAAM;IACnC,gBAAgB,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC;IACd,SAAS,CAAC,CAAC;IACX,KAAK;IACL;;;;;;;;;;;;;;;;;;;;"}
@@ -122,6 +122,13 @@ class AVBidirectionalQueuePlayer: AVQueuePlayer {
122
122
  rate = currentrate
123
123
  }
124
124
  }
125
+ open override func advanceToNextItem() {
126
+ if currentIndex() == nil || currentIndex()! < items().count - 1{
127
+ super.advanceToNextItem();
128
+ } else {
129
+ setCurrentIndex(0)
130
+ }
131
+ }
125
132
 
126
133
  func setCurrentIndex(_ currentIndex: Int) {
127
134
  setCurrentIndex(currentIndex, completionHandler: { _ in })
@@ -152,7 +159,8 @@ class AVBidirectionalQueuePlayer: AVQueuePlayer {
152
159
  }
153
160
 
154
161
  func replaceAllItems(with items: [AudioTrack]) {
155
- removeAllItems()
162
+ print("AVBI, replaceAllItems")
163
+ removeAllItemsSilently()
156
164
  appendItems(items)
157
165
  }
158
166
 
@@ -189,14 +197,20 @@ class AVBidirectionalQueuePlayer: AVQueuePlayer {
189
197
 
190
198
  super.play()
191
199
  }
192
-
200
+ // This does the same thing as the normal AVQueuePlayer removeAllItems, but clears our collection copy
193
201
  override func removeAllItems() {
194
- // This does the same thing as the normal AVQueuePlayer removeAllItems, but clears our collection copy
202
+ print("removeAllItems")
195
203
  super.removeAllItems()
196
204
  queuedAudioTracks.removeAll()
197
-
205
+
198
206
  NotificationCenter.default.post(name: NSNotification.Name(AVBidirectionalQueueCleared), object: self, userInfo: nil)
199
207
  }
208
+
209
+ func removeAllItemsSilently() {
210
+ print("removeAllItemsSilently")
211
+ super.removeAllItems()
212
+ queuedAudioTracks.removeAll()
213
+ }
200
214
 
201
215
  func remove(_ item: AudioTrack) {
202
216
  // This method calls the superclass to remove the items from the AVQueuePlayer itself, then removes
@@ -25,7 +25,6 @@ final class AudioTrack: AVPlayerItem {
25
25
  else {
26
26
  return nil
27
27
  }
28
-
29
28
  let track = AudioTrack(url: assetUrl)
30
29
  track.canUseNetworkResourcesForLiveStreamingWhilePaused = true
31
30