AppleMusicUltra icon indicating copy to clipboard operation
AppleMusicUltra copied to clipboard

MEDIA_KEY: [object Event]

Open programmhenry opened this issue 4 years ago • 15 comments

After each song this message appears twice.

programmhenry avatar Apr 10 '20 17:04 programmhenry

Hey @programmhenry, how is the message presenting itself? Is it an alert or is it appearing in the console, etc.? I'll check it out, send a screenshot if possible – would be super helpful!

revblaze avatar Apr 11 '20 04:04 revblaze

Screenshot 2020-04-14 at 12 46 24 Screenshot 2020-04-14 at 12 46 29

programmhenry avatar Apr 14 '20 10:04 programmhenry

When I click on a song it starts and these two alters appear and every time a new song starts

programmhenry avatar Apr 14 '20 10:04 programmhenry

Super strange, I haven't come across this one yet. Is it specific to certain albums or does it appear with every song? Try out the build I just pushed and let me know if this continues to happen. I cleaned up a lot of the JavaScript code in the latest release.

Do any errors or bugs come with that alert? Or is the alert simply presenting itself – twice – upon every new song?

Regardless, sounds like a super annoying bug. If this continues to occur, I'll push out a hot fix that silences those alerts (forces them not to appear) until I figure out what's going on.

revblaze avatar Apr 15 '20 02:04 revblaze

EDIT: Oops, didn't mean to close this issue.

revblaze avatar Apr 15 '20 02:04 revblaze

These two messages appear with each song. Since you are using WebKit I have tried something: I went to beta.music.apple.com and started a song there and see: Also there this error message appears every time.

programmhenry avatar Apr 15 '20 09:04 programmhenry

So the source – Apple Music Web Player Beta – is presenting the same alerts? In the meantime, I'll setup a listener for alerts that contain the title MEDIA_KEY: [object Event] and disable them from presenting themselves.

It's hard to debug this issue without being able to replicate it myself. Again, in the meantime, I'll create a workaround by mimicking the alerts that you are receiving and have them silenced upon prompt. You shouldn't notice it after that. Will update this issue when I get time in-between studying.

Let me know if you have any new developments on your end!

revblaze avatar Apr 15 '20 20:04 revblaze

UPDATE: Apple just took their Web Player out of beta and have seemed to fix a number of bugs. Clear your browser cache – maybe also restart your machine – and let me know if this issue isn't fixed.

I'm currently in the process of migrating Ultra for Music over to the new out-of-beta module. Will have to do some major restructuring.

revblaze avatar Apr 17 '20 14:04 revblaze

I cleared my cache and restarted my machine. The Problem stays.

programmhenry avatar Apr 21 '20 17:04 programmhenry

I tested the music.apple.com Website in Chrome and there isn´t the Problem

programmhenry avatar Apr 21 '20 18:04 programmhenry

Screenshot 2020-04-21 at 21 08 50 This is what I get from the console in Safari

programmhenry avatar Apr 21 '20 19:04 programmhenry

Funny, Apple is building their web player with dedicated support for Safari. 3rd-party browsers are all using the industry web standards (disabled -webkit-blur effects, etc). Some of their experimental features must still be problematic with WebKit. Will look into the differences between the two (Safari and 3rd-party) and see if I can create a soft medium between the two.

revblaze avatar May 07 '20 21:05 revblaze

Could you fix the problem?

programmhenry avatar Jun 03 '20 14:06 programmhenry

You are on a Mac or Hackintosh?

grumero avatar Jun 23 '20 10:06 grumero

I've managed to silence the issue as a temporary workaround with the current build I'm developing of the new release, as it appears the error doesn't actually affect functionality. Although I haven't run into the issue since, I do remember that it forced the playback to either stop or restart entirely. I'll attempt to debug the issue. In the meantime, I've added additional checks to ensure playback will not be interrupted when this alert is silenced. I will be releasing the code should shortly. 🍻

The addition of TypeSwift in the coming release will allow me to debug and fix these issues in a more timely manner (the next time it occurs). See issue #11 for additional information (to be updated).

revblaze avatar Jun 09 '21 17:06 revblaze