Perform registering of dynamically-added players in all cases when media controls are enabled, thereby making basic SoundCloud support work.
Details
- Reviewers
- None
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
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.
@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