Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-opening paused/stopped jukebox on mobile plays all songs simultaneously. #2

Open
TheGoldenSeal opened this issue May 1, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@TheGoldenSeal
Copy link

TheGoldenSeal commented May 1, 2023

I noticed this bug on mobile iphone.

ISSUE: The jukebox loads fine and plays song fine. But if you leave obsidian to use other apps and the jukebox stops playing the last song (or it's paused, not sure), sometimes when you return to obsidian it will suddenly play all the songs simultaneously.

Reproducing this bug. (Not 100% reproduceable)

  1. Load the jukebox and play some songs.
  2. Leave the obsidian app while a song is playing.
  3. Swipe down from the top of the iphone to open the audio controls
  4. Pause the audio
  5. Use other apps on your phone
  6. Allow a certain amount of time to elapse. Maybe 20 minutes?
  7. Return to obsidian. The jukebox will be the active page and all the songs will start playing simultaneously.

I'll see if I can make this more reproduceable. Here's the code I'm using.

await dv.view("_js/jukebox", {
	filter: (qs) => {
		const from = '#🎼 AND "jukebox/songs"'

		const tagA = qs.from(from)
		  .withTags("#music/rockA")
		  ._pages

		const tagB = qs.from(from)
		  .withTags("#music/rockB")
		  ._pages

		const tagC = qs.from(from)
		  .withTags("#music/rockC")
		  ._pages

		qs.setPages(qs.joinPages(tagA, tagB, tagC))
	},
	sort: { shuffle: true },
	disable: "addscore"
})
@Krakor92
Copy link
Owner

Krakor92 commented May 2, 2023

Thank you for reporting that 😃

I don't have an iPhone but I've managed to reproduce it on my iPad.

This is not a blocking bug, as you can simply close the file and open it again to bypass it. You'll loose the sorting order if you were on shuffle but It's not that big of a deal

Unfortunatly It's very time consuming to reproduce the state in which this bug occurs + As far as I know, I have zero tool to properly debug the mobile app (expect maybe logging information with the default notice system) so I don't think there is much I can do to fix this problem...

I'll try anyway but don't expect a fix anytime soon 😞

@Krakor92 Krakor92 added the bug Something isn't working label May 2, 2023
@TheGoldenSeal
Copy link
Author

Thanks @Krakor92, this is a minor bug anyway. I'm mostly reporting it since I know you will eventually release this to a wider audience. Also, the jukebox already does what I need and is great, even with this strange behavior.

I am curious, however, to see what happens when I have a page with 100+ songs!! Lol. I’ll report back my results.

As always, thank you for providing this useful code. Very appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants