mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
Initial MPRIS support
Implement a working MPRIS DBus connection with a separate API to control it. Right now only player playback state is reflected and Play/Pause/PlayPause calls work.
This commit is contained in:
@@ -20,14 +20,18 @@ class ClapperPlayer extends GstClapper.Clapper
|
||||
const glsinkbin = Gst.ElementFactory.make('glsinkbin', null);
|
||||
glsinkbin.sink = gtk4plugin.video_sink;
|
||||
|
||||
const dispatcher = new GstClapper.ClapperGMainContextSignalDispatcher();
|
||||
const renderer = new GstClapper.ClapperVideoOverlayVideoRenderer({
|
||||
video_sink: glsinkbin
|
||||
});
|
||||
|
||||
super._init({
|
||||
signal_dispatcher: dispatcher,
|
||||
video_renderer: renderer
|
||||
signal_dispatcher: new GstClapper.ClapperGMainContextSignalDispatcher(),
|
||||
video_renderer: new GstClapper.ClapperVideoOverlayVideoRenderer({
|
||||
video_sink: glsinkbin,
|
||||
}),
|
||||
mpris: new GstClapper.ClapperMpris({
|
||||
own_name: `org.mpris.MediaPlayer2.${Misc.appName}`,
|
||||
id_path: '/' + Misc.appId.replace(/\./g, '/'),
|
||||
identity: Misc.appName,
|
||||
desktop_entry: Misc.appId,
|
||||
default_art_url: Misc.getClapperThemeIconUri(),
|
||||
}),
|
||||
});
|
||||
|
||||
this.widget = gtk4plugin.video_sink.widget;
|
||||
|
Reference in New Issue
Block a user