Skip to main content
Version: 4.2.x

xdk-core

@accedo/xdk-core​

The core part of the XDK module. It defines the interface of all device packages and the media instance.

It is recommended to load the XDK configuration before accessing any XDK properties.

Usage​

You will need an application where you can reference this package as a module.

$ npm i @accedo/xdk-core @accedo/xdk-config
xdk.config.js
import workstation, { ID as WORKSTATION } from '@accedo/xdk-device-workstation';

export default {
devices: {
packages: [workstation],
detail: {
[WORKSTATION]: {
// overrides
}
}
}
};
app.js
import xdk, { device, environment } from '@accedo/xdk-core';
import xdkConfig from '@accedo/xdk-config';
import config from './xdk.config';

xdkConfig.load(config);

environment.addEventListener(environment.DEVICE.ONLOAD, () => {
console.debug(`Device loaded: ${device.platform}.`);
});

For more info please refer to the next pages