Skip to content

Commit

Permalink
do not require Protection and MetricsReporting as dependencies as the…
Browse files Browse the repository at this point in the history
…se are optional and intended to be loaded separately
  • Loading branch information
bwidtmann committed Feb 8, 2016
1 parent 1cf3b08 commit cb90350
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/streaming/MediaPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ import EventBus from './../core/EventBus.js';
import Events from './../core/events/Events.js';
import MediaPlayerEvents from './MediaPlayerEvents.js';
import FactoryMaker from '../core/FactoryMaker.js';
import Protection from './protection/Protection.js';
import MetricsReporting from './metrics/MetricsReporting.js';
//Dash
import DashAdapter from '../dash/DashAdapter.js';
import DashParser from '../dash/DashParser.js';
Expand Down Expand Up @@ -1606,7 +1604,8 @@ function MediaPlayer() {
if (protectionController) {
return protectionController;
}

// do not require Protection as dependencies as this is optional and intended to be loaded separately
let Protection = dashjs.Protection; /* jshint ignore:line */
if (typeof Protection == 'function') {//TODO need a better way to register/detect plugin components
let protection = Protection(context).create();
Events.extend(Protection.events);
Expand All @@ -1628,7 +1627,8 @@ function MediaPlayer() {
if (metricsReportingController) {
return metricsReportingController;
}

// do not require MetricsReporting as dependencies as this is optional and intended to be loaded separately
let MetricsReporting = dashjs.MetricsReporting; /* jshint ignore:line */
if (typeof MetricsReporting === 'function') {//TODO need a better way to register/detect plugin components
let metricsReporting = MetricsReporting(context).create();

Expand Down

0 comments on commit cb90350

Please sign in to comment.