Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async register() {
try {
dbus.setBigIntCompat(true);
const session = dbus.sessionBus();
try {
await this.registerBindings('gnome', session);
} catch (err) {
// ignore
}
try {
await this.registerBindings('mate', session);
} catch (err) {
// ignore
}
} catch (e) {
this.logger.error(e);
require('source-map-support').install();
const events = require('events');
const util = require('util');
const dbus = require('dbus-next');
dbus.setBigIntCompat(true);
const PlayerInterface = require('./interfaces/player');
const RootInterface = require('./interfaces/root');
const PlaylistsInterface = require('./interfaces/playlists');
const TracklistInterface = require('./interfaces/tracklist');
const types = require('./interfaces/types');
const constants = require('./constants');
const MPRIS_PATH = '/org/mpris/MediaPlayer2';
function lcfirst(str) {
return str[0].toLowerCase()+str.substr(1);
}
/**
* Construct a new Player and export it on the DBus session bus.
*