Closed chrisgurney closed 3 months ago
@andrewmcgivery I've confirmed that the Soundscapes toolbar does not appear in Obsidian, AND the music player does not allow playback if:
Going offline and blocking sites are both strategies I use when I want to focus and minimize distractions, which seem analogous with the goals of this plugin. I'd like to use the My Music feature to play music/sounds locally, and don't (currently) use the YouTube playback.
Is it possible to update the plugin to support offline use?
Thanks!
I don't know for sure but it looks like the player is created here... but it's within the callback from YouTube's API, so it never gets triggered when YouTube's not available.
I'm not sure where the fix is to be made; perhaps in main.ts
: createPlayer()
?
I think then if the Soundscape is set to My Music the player can just go ahead and be initiated:
if (this.soundscapeType === SOUNDSCAPE_TYPE.MY_MUSIC) {
this.onPlayerReady.bind(this)
I can successfully swap from a YouTube soundscape to My Music while I'm offline, so I think the fix only needs to be made in the player startup code. Though, maybe the YouTube player will need another kick, if it's not initiated in the first place?
Apologies, I was out on a work trip. :)
I've added this to my TODO list to take a look at. :)
This should now be fixed in 1.3.0 (just released). :)
@andrewmcgivery Much appreciated, thank you! Works great! (Tested with both SelfControl and while offline.)
Problem
On launch of Obsidian, my Soundscapes toolbar controls are no longer loading this afternoon, while they were working fine this morning.
My hunch right now is that I am using an app on MacOS called SelfControl that completely blacklists a bunch of websites. One I have set is YouTube (
www.youtube.com
).At the moment I can't disable my block (that's by design) to see if that's the issue. I'll re-confirm this evening and update my post then. Could not having access to YouTube (say using Obsidian completely offline) prevent Soundscapes from starting up correctly?(Confirmed, see next comment.)Other things I've tried...