[MediaControl-Linux] Only enable `GoNext` or `GoPrevious` when their action handlers exist
Categories
(Core :: Audio/Video: Playback, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: chunmin, Assigned: chunmin)
References
Details
Attachments
(7 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
CanGoNext
or CanGoPrevious
should be set on demand:
CanGoNext
should only be true when media session has an action handler fornexttrack
CanGoPrevious
should only be true when media session has an action handler forprevioustrack
This is what Chromium does.
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
- Remove the dead code which is never executed
- Return error instead of a fake value from unsupported functions
- Remove trivial functions that only return a bool value
Depends on D85943
Assignee | ||
Comment 3•4 years ago
|
||
Leave only supported methods and properties in class Method
and class Property
respectively. As a result, if the query method or property
cannot be mapped to an item in Method
or Property
, then that query
is not supported. In that case, a G_DBUS_ERROR_NOT_SUPPORTED
would be
returned, instead of G_IO_ERROR_FAILED
.
Depends on D85944
Assignee | ||
Comment 4•4 years ago
|
||
We only implement MPRIS methods paired with MediaControlKey
, so those
methods can be merged into one function with a MediaControlKey
parameter.
Depends on D85945
Assignee | ||
Comment 5•4 years ago
|
||
The supported-media-keys info needs to be passed to the
media-control-key-source. Otherwise the key-source has no idea what keys
are currently supported.
Depends on D85946
Assignee | ||
Comment 6•4 years ago
|
||
Implement the SetSupportedMediaKeys
in MPRISServiceHandler
.
Depends on D85947
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
The g_dbus_connection_emit_signal
is called several times at different
places. It's better to do that in one place to lower the maintaining
effort.
Depends on D85948
Pushed by cchang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8291a1d8fcd9 P1: Delete ghost functions r=alwu https://hg.mozilla.org/integration/autoland/rev/0119f0c8bc51 P2: Prune code paths to improve the readability r=alwu https://hg.mozilla.org/integration/autoland/rev/143dc81dd17b P3: Simplify HandleMethodCall and HandleGetProperty r=alwu https://hg.mozilla.org/integration/autoland/rev/b2190f037d78 P4: Merge different MPRIS methods to one function r=alwu https://hg.mozilla.org/integration/autoland/rev/3d6075e9f0f9 P5: Update supported media keys once keys is being monitored r=alwu https://hg.mozilla.org/integration/autoland/rev/85f9d8d484c7 P6: Implement SetSupportedMediaKeys on MPRIS backend r=alwu https://hg.mozilla.org/integration/autoland/rev/e87dffaba2dd P7: Add a function to emit properties changed signal r=alwu
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8291a1d8fcd9
https://hg.mozilla.org/mozilla-central/rev/0119f0c8bc51
https://hg.mozilla.org/mozilla-central/rev/143dc81dd17b
https://hg.mozilla.org/mozilla-central/rev/b2190f037d78
https://hg.mozilla.org/mozilla-central/rev/3d6075e9f0f9
https://hg.mozilla.org/mozilla-central/rev/85f9d8d484c7
https://hg.mozilla.org/mozilla-central/rev/e87dffaba2dd
Description
•