Skip to content

Commit

Permalink
feat: add player name and version strings
Browse files Browse the repository at this point in the history
printed out on init and can be accessed via API
  • Loading branch information
OrenMe committed Aug 8, 2017
1 parent fff7f4d commit e0fc3b5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
import 'babel-polyfill' // Important! must be first import to support older browsers compatibility
import PolyfillManager from './polyfills/polyfill-manager'
import './polyfills/all'
import * as packageData from '../package.json'
import LoggerFactory from './utils/logger'

// Player version
const VERSION = packageData.version;

// Player name
const PLAYER_NAME = packageData.name;

LoggerFactory.getLogger().log(`%c ${PLAYER_NAME} ${VERSION}`, "color: #98ff98; font-size: large");
LoggerFactory.getLogger().log(`%c For more details see ${packageData.repository.url}`, "color: #98ff98;");

PolyfillManager.installAll();

Expand All @@ -24,5 +35,5 @@ import 'playkit-js-kanalytics'
// Import setup method
import {setup} from './setup'

export {Playkit, OvpProvider, PlaykitUI, setup};
export {Playkit, OvpProvider, PlaykitUI, setup, VERSION, PLAYER_NAME};

0 comments on commit e0fc3b5

Please sign in to comment.