Closed tomaszrondio closed 8 years ago
Thnx Tomasz!
It happens because js Audio element stops playing and it "overwrites" RemoteControls song info. Workaround is to updateMetas again using timeout.
@tomaszrondio I had the same issue. Just did the updateMetas on pause events. It's too bad though cause the URL still flashes for a moment when using the >> button to skip a song. Is there any way around this?
It also flashes in my app. I haven't found good solution for that.
I set the metadata to update on the play/pause listeners but here again I have the temporary flash of the file URL, it doesn't, however, flash when I hit the next/previous buttons.
@pvandrunen I'm seeing the same thing. The only way around it so far is to implement audio natively. The only library out there that has this is PlayerHater but in my experience it's very buggy and not currently compiling properly on iOS or Android.
Thanks @greatwitenorth, I will live with the temporary flash when pausing/playing over compile issues and bugs.
I noticed on YouTube that the slide-up controls in iOS display the title attribute in the
Just to confirm - you guys are using a plain html audio element?
We are using a custom built js audio player, like this:
this.myaudio = new Audio(myaudioURL);
I have a similar setup to @pvandrunen
Right, you have a custom api, but what is your underlying playback method? html audio tag? WebAudio? a native player?
I'm using an HTML audio tag.
When I click play or pause button on locked screen it stops/starts playing but also resets song information. Also home button removes both controls and song info.
BTW: I had to import remoteControls.h in MainViewController to make it work.