Add initial WebSocket client app

This commit is contained in:
Rafostar
2020-12-15 18:20:48 +01:00
parent 8564cc9617
commit 5231a1f225
4 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
const { GObject } = imports.gi;
const Misc = imports.clapper_src.misc;
const { WebClient } = imports.clapper_src.webClient;
let { settings } = Misc;
var PlayerRemote = GObject.registerClass(
class ClapperPlayerRemote extends GObject.Object
{
_init()
{
super._init();
this.webclient = new WebClient(settings.get_int('webserver-port'));
}
set_playlist(playlist)
{
this.webclient.sendMessage({
action: 'set_playlist',
value: playlist
});
}
});