You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I am trying to skip the song If there is another context in the queue but nextPlayable() function is always returns null even tho there is no context to play in the queue.
After when I skip to the next context with Player.next() this exception pops up.
Exception in thread "ForkJoinPool.commonPool-worker-3" java.lang.IllegalStateException: Cannot set output for PlayerQueueEntry{0170d692ce39ac738bc6f517e38f755d}
at xyz.gianlu.librespot.player.playback.PlayerQueueEntry.setOutput(PlayerQueueEntry.java:189)
at xyz.gianlu.librespot.player.playback.PlayerSession.playInternal(PlayerSession.java:266)
at xyz.gianlu.librespot.player.playback.PlayerSession.play(PlayerSession.java:281)
at xyz.gianlu.librespot.player.Player.loadTrack(Player.java:254)
at xyz.gianlu.librespot.player.Player.handleSkipNext(Player.java:469)
at xyz.gianlu.librespot.player.Player.next(Player.java:134)
at com.xxx.xxx.MachineEvents.lambda$onContextChanged$0(MachineEvents.java:57)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1429)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
This is how the player configuration is made.
PlayerConfiguration playerConfig = new PlayerConfiguration.Builder()
.setInitialVolume(0)
.setAutoplayEnabled(false)
// .setInitialVolume(65536)
.setPreferredQuality(AudioQuality.NORMAL)
.setPreloadEnabled(false)
.setOutput(AudioOutput.MIXER)
.setVolumeSteps(5)
.build();
Player player = new Player(playerConfig, session);
At the librespot-org/spotify-connection-resources the author of this library @devgianlu said that I may have enabled the context looping but there is no configuration that I did for that. At below you can see how I load the contexts to the player.
First I'm checking for the current playable. If there is one I'll just add the context to the queue. If there is no context playing then I'm just loading the context and set auto play to true.
// Add uri to queue
try {
machine.player.currentPlayable();
machine.player.addToQueue(message.spotifyUri);
} catch (Exception s) {
machine.player.load(message.spotifyUri, true);
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey, I am trying to skip the song If there is another context in the queue but
nextPlayable()
function is always returnsnull
even tho there is no context to play in the queue.After when I skip to the next context with
Player.next()
this exception pops up.This is how the player configuration is made.
At the
librespot-org/spotify-connection-resources
the author of this library @devgianlu said that I may have enabled the context looping but there is no configuration that I did for that. At below you can see how I load the contexts to the player.First I'm checking for the current playable. If there is one I'll just add the context to the queue. If there is no context playing then I'm just loading the context and set auto play to true.
Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions