XDK Config Module. Handles the XDK configuration used by the detection stage and within the framework.
Example configuration
// imports here
import { xdkDeviceWorkstation } from './devices/xdk.device.workstation' ;
import transport from '@accedo/xdk-log-logger-onscreen'
export default {
devices: {
packages: [
// as many devices as you want
xdkDeviceWorkstation
],
details: {
workstation: {
// overrides for workstation
extensions: []
}
}
},
storages: {
cookie: {
name: 'Global Cookie Name'
}
},
media: {
// media overrides
guessProtocolByUrl: () => {
},
logging: {
// logging configuration
transport,
maxLine: 50,
visibleOnStart: true,
trigger: 'KEY_1',
style: {
area: {
top: 0,
right: 0,
width: '66.7vw',
height: '100vh'
}
},
level: LOG_LEVELS.INFO,
verbose: {
TVKey: true,
ConnectionPoller: false,
Player: true
}
}
}
Methods
# static guessProtocolByUrl(url, options) → {String}
Global override of the guess protocol by URL XDK mechanism.
Parameters:
Name | Type | Description |
---|---|---|
url |
String
|
Description |
options |
PlayerOptions
|
load options |
[String=progressive|hls|dash|smooth-streaming] PROTOCOL See constant/Media.
String
# static load(xdkConfig) → {Boolean}
Loads the XDK config
Parameters:
Name | Type | Description |
---|---|---|
xdkConfig |
XdkConfig
|
XDK configuration from a xdk.config.js file |
true if success, false if error
Boolean
Type Definitions
Object
# DeviceOverrides
XDK Devices configuration
Properties:
Name | Type | Description |
---|---|---|
ID |
Object
|
Any package ID |
package |
Package
|
Overrides |
Object
# Devices
XDK Devices configuration
Properties:
Name | Type | Description |
---|---|---|
packages |
Array.<Package>
|
XDK Packages to be evaluated during the detection stage |
details |
DeviceOverrides
|
XDK overrides for specific XDK packages |
Object
# Media
XDK Media configuration
Properties:
Name | Type | Description |
---|---|---|
guessProtocolByUrl |
function
|
Object
# Package
XDK Device package object
Properties:
Name | Type | Description |
---|---|---|
packages |
String
|
|
detection |
Detection
|
|
defaultConfig |
DefaultConfig
|
|
DevicePackage |
DevicePackage
|
Object
# Storages
XDK Media configuration
Properties:
Name | Type | Description |
---|---|---|
cookie |
Object
|
Cookie object |
name |
String
|
global cookie name |