mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
Add initial WebSocket client app
This commit is contained in:
24
clapper_src/playerRemote.js
Normal file
24
clapper_src/playerRemote.js
Normal 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
|
||||
});
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user