@mustafaj/capacitor-plugin-playlist 0.9.2 → 0.9.4
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.
|
@@ -356,12 +356,7 @@ public class PlaylistPlugin : Plugin(), OnStatusReportListener {
|
|
|
356
356
|
val seekPosition =
|
|
357
357
|
(call.getFloat("position", position / 1000.0f)!! * 1000.0f).toLong()
|
|
358
358
|
|
|
359
|
-
val isPlaying: Boolean? =
|
|
360
|
-
audioPlayerImpl!!.playlistManager.playlistHandler?.currentMediaPlayer?.isPlaying
|
|
361
359
|
audioPlayerImpl!!.playlistManager.playlistHandler?.seek(seekPosition)
|
|
362
|
-
if (isPlaying === null || !isPlaying) {
|
|
363
|
-
audioPlayerImpl!!.playlistManager.playlistHandler?.pause(false)
|
|
364
|
-
}
|
|
365
360
|
|
|
366
361
|
call.resolve()
|
|
367
362
|
|
|
@@ -205,6 +205,9 @@ public class RmxAudioPlayer implements PlaybackStatusListener<AudioTrack>,
|
|
|
205
205
|
@Override
|
|
206
206
|
public void onItemPlaybackEnded(AudioTrack item) {
|
|
207
207
|
if (item != null) {
|
|
208
|
+
if (suppressSelectionPlaybackEvents || isSuppressingSelection(item)) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
208
211
|
String trackId = item.getTrackId();
|
|
209
212
|
JSONObject trackStatus = getPlayerStatus(item);
|
|
210
213
|
onStatus(RmxAudioStatusMessage.RMXSTATUS_STOPPED, trackId, trackStatus);
|
|
@@ -254,8 +257,7 @@ public class RmxAudioPlayer implements PlaybackStatusListener<AudioTrack>,
|
|
|
254
257
|
|
|
255
258
|
switch (playbackState) {
|
|
256
259
|
case STOPPED:
|
|
257
|
-
if (suppressSelection) {
|
|
258
|
-
clearTrackSelectionSuppression();
|
|
260
|
+
if (suppressSelection || suppressSelectionPlaybackEvents) {
|
|
259
261
|
break;
|
|
260
262
|
}
|
|
261
263
|
onStatus(RmxAudioStatusMessage.RMXSTATUS_STOPPED, "INVALID", null);
|
package/package.json
CHANGED