Perform registering of dynamically-added players in all cases when media controls are enabled, thereby making basic SoundCloud support work
AbandonedPublic

Authored by rgeorgiev on Jul 21 2019, 9:28 PM.

Details

Reviewers
None
Summary

Perform registering of dynamically-added players in all cases when media controls are enabled, thereby making basic SoundCloud support work.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
rgeorgiev created this revision.Jul 21 2019, 9:28 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 21 2019, 9:28 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
rgeorgiev requested review of this revision.Jul 21 2019, 9:28 PM
rgeorgiev updated this revision to Diff 62249.Jul 21 2019, 10:08 PM

I'm confused - what does this change? There's no context, so I can't tell where it's being moved to. Soundcloud works fine here. You might want to enable "Enhanced Media Controls" in settings.

rgeorgiev planned changes to this revision.Jul 23 2019, 7:21 PM

I'm confused - what does this change? There's no context, so I can't tell where it's being moved to. Soundcloud works fine here. You might want to enable "Enhanced Media Controls" in settings.

Well, the reason why I made these changes is that in my understanding, the enabling of the Media Controls option should ensure the basic functioning of media controls for all sites (even if the Enhanced Media Controls option is disabled, which currently breaks SoundCloud support). That's why I decided to move the logic which detects media player (i.e. audio or video) elements being added to the page after its loading from the loadMediaSessionsShim function (which is executed only if the Enhanced Media Controls option is enabled) to the loadMpris function (which is executed if the Media Controls option is enabled).

To clear any misunderstanding on my side, what's the exact purpose of the Enhanced Media Controls option? I thought that the idea behind it is to toggle the displaying of the metadata and the thumbnail for the currently playing media.

rgeorgiev abandoned this revision.Jul 23 2019, 7:36 PM

@broulik Hmm, now I think that I understood the rationale why SoundCloud support is activated using the Enhanced Media Controls option. As you commented on my other revision (D22632), SoundCloud uses the Media Session API, support for which is enabled using the aforementioned option. My fault for making uniformed changes :D