MusicKit JS webplayer

I am trying to create a webplayer for apple music and have run into some issues with actually playing the music.

authorized.then((res) => {
    console.log(res);
    musicInstance.setQueue({ song: '1025212395' }).then((queue) => {
      console.log(queue)
      musicInstance.play();
    });
  },(rej) => {
    console.log("Failed to Recieve User Authorization")
  })

where authorized is the promise that is returned when the user logs in. I keep getting the following console errors when attempting to play any sort of media and have no clue how to debug it. Sometimes, it says DOM error and mediasource readyState is not 'open' Any ideas?

Thank you for your question, @JRN803, and I apologize for the delayed response

Encrypted media playback via MusicKit JS requires the server your site is served from to be accessed via https://, even when using localhost. Looking at your console logs, this could be the cause of the issue you're seeing.

If you are still running into issues, please file a ticket on the Feedback Assistant, with any relevant logs, steps to reproduce, and a .har export of the network inspector.

MusicKit JS webplayer
 
 
Q