/**
 * this module contains configuration for the player which are common 
 * and usually not required from the user
 * anything which is default for all players should be here
 * 
 * @note: all the config should be seprated in their own scope
 * @author Aamir khan
 * @module PlayerConfig
 */

import eventsHandler from "../plugins/eventsHandler"
import perfLogger from "../plugins/performanceLogger";
import { readOnlyObject } from "../utils/common"


/**
 * default config which is common for all players
 * @readonly
 * @enum {Object}
 */


// Note: perfLogger should always be the last plugin
export const corePlugins = [eventsHandler, perfLogger];
export const common = readOnlyObject({
    selector: "#dplayer",
    device: 'web',
    profile: false,
    debug: true,
    retry: {
        max: 3,
        interval: 1000
    },
    theme: {
        primary: '#00bcd4',
        secondary: '#ff9800',
        font: '#ffffff'
    },
})


/**
 * device specific configs
*  the device will be passed outside the player with config
* @readonly
* @enum {Object}
*/
export const devices = readOnlyObject({
    lg: {},
    tizen: {},
    web: {},
    xbox: {},
})