zachomedia / apple-music-webplayer

Web player for Apple Music (using MusicKit JS)
https://music.zacharyseguin.ca
MIT License
597 stars 76 forks source link

Keep playlist / song when i change settings #56

Closed AurelienLoyer closed 5 years ago

AurelienLoyer commented 5 years ago

When i change my settings, player reset current playing song. I'll be cool if current song whould be keeping 😊

PS: thx for your work. Just a awesome idea 👍 ! I'll make PR soon for features and bugs fixed !

zachomedia commented 5 years ago

Thanks for the report. What browser and OS are you experiencing this in? I was unable to reproduce in Safari and Chrome on macOS.

AurelienLoyer commented 5 years ago

It's a know bug when you change Bitrate (Changing the bitrate will cause the page to reload.) Keep sound in localstorage or somethink like this will be cool :)

zachomedia commented 5 years ago

Yeah, changing the bitrate currently triggers a full reload because the bitrate setting is only writable when calling MusicKit.configure.

zachomedia commented 5 years ago

I will look at saving current playlist + song in localstorage.

AurelienLoyer commented 5 years ago

It was my first idea 👍

jaehess commented 5 years ago

@zachomedia FWIW documentation is lacking for bitrate. You can set the bitrate without reloading, but it will not take effect until the next track is started.

MusicKit.getInstance().bitrate = MusicKit.PlaybackBitrate.HIGH
zachomedia commented 5 years ago

Thanks @jaehess. I'll update it then to change that value.

Just note, the docs do say that's a readonly value (https://developer.apple.com/documentation/musickitjs/musickit/musickitinstance/2992702-bitrate).