Skip to content

Commit bd5f4cf

Browse files
committed
Address code review points
1 parent 08a3003 commit bd5f4cf

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sudo: false
22
language: node_js
33
node_js:
44
- 'node'
5-
- '4.2'
5+
- '4.3'
66
- '0.12'
77
- '0.10'
88

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2016 Brightcove, Inc.
1+
Copyright Brightcove, Inc.
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

src/plugin.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ class Overlay extends Component {
4141
constructor(player, options) {
4242
super(player, options);
4343

44-
player.addChild(this);
45-
4644
['start', 'end'].forEach(key => {
4745
let value = this.options_[key];
4846

@@ -119,8 +117,7 @@ class Overlay extends Component {
119117
fn = log[args.shift()];
120118
}
121119

122-
args.unshift(`overlay#${this.id()}: `);
123-
fn(...args);
120+
fn(...[`overlay#${this.id()}: `, ...args]);
124121
}
125122

126123
/**
@@ -307,9 +304,9 @@ const plugin = function(options) {
307304
// because it doesn't make sense to pass it to each Overlay component.
308305
delete settings.overlays;
309306

310-
this.overlays_ = overlays.map(
311-
o => new Overlay(this, videojs.mergeOptions(settings, o))
312-
);
307+
this.overlays_ = overlays.map(o => {
308+
this.addChild('Overlay', videojs.mergeOptions(settings, o));
309+
});
313310
};
314311

315312
videojs.plugin('overlay', plugin);

0 commit comments

Comments
 (0)