Skip to content

Commit

Permalink
fix: middleware log message (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
incompl authored Aug 30, 2018
1 parent b8e8dcc commit 852e6c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/cancelContentPlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import videojs from 'video.js';

export default function initCancelContentPlay(player, debug) {
if (debug) {
videojs.log('ADS:', 'Using cancelContentPlay to block content playback');
videojs.log('Using cancelContentPlay to block content playback');
}

// Listen to play events to "cancel" them afterward
Expand Down
6 changes: 1 addition & 5 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ const contribAdsPlugin = function(options) {
// will disallow calling play once play blocking is lifted)
// The middleware must also be registered outside of the plugin,
// to avoid a middleware factory being created for each player
if (isMiddlewareMediatorSupported() && settings.debug) {
// We log the debug message here as the plugin settings are available here
videojs.log('ADS:', 'Play middleware has been registered with videojs');
} else {
// Register the cancelContentPlay feature on the player
if (!isMiddlewareMediatorSupported()) {
initCancelContentPlay(player, settings.debug);
}

Expand Down
1 change: 1 addition & 0 deletions src/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function register(contribAdsPlugin) {
// Register the play middleware
videojs.use('*', playMiddleware);
videojs.usingContribAdsMiddleware_ = true;
videojs.log('Play middleware has been registered with videojs');
}

return true;
Expand Down

0 comments on commit 852e6c5

Please sign in to comment.