Make content-script media player code follow user settings
ClosedPublic

Authored by davidedmundson on Jun 20 2018, 11:10 AM.

Details

Summary

If a user disables the mpris plugin there's no point loading anything in
the client page.

Also split the mediaSessions shim into a separate option as it's much
more invasive than the regular mpris controls.

For now the latter is disabled by default. It breaks some sites, we
can't afford to do that and we need to put a fix for that immediately.

We can revisit it later.

Test Plan

Ran media-sessions API page
With extended mpris on I got thumbnails
With it off I still had the classic video control

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Plasma. · View Herald TranscriptJun 20 2018, 11:10 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Jun 20 2018, 11:10 AM

Does it make sense to enable mprisMediaSessions without mpris? As I don't think that is the case, can you make that visible in the UI and change if (items.mprisMediaSessions.enabled) { to if (items.mpris.enabled && items.mprisMediaSessions.enabled) {

extension/_locales/en/messages.json
36

Maybe add (Experimental)

FVogts comments

fvogt accepted this revision.Jun 20 2018, 12:28 PM
This revision is now accepted and ready to land.Jun 20 2018, 12:28 PM
This revision was automatically updated to reflect the committed changes.