Global listeners to prevent repeat binding

This commit is contained in:
Sam Potts
2017-11-06 21:19:00 +11:00
parent 9c4b7e7094
commit 2497e25b3c
4 changed files with 214 additions and 201 deletions

View File

@@ -13,6 +13,7 @@ import utils from './utils';
import captions from './captions';
import controls from './controls';
import fullscreen from './fullscreen';
import listeners from './listeners';
import media from './media';
import storage from './storage';
import source from './source';
@@ -214,6 +215,9 @@ class Plyr {
// Allow focus to be captured
this.elements.container.setAttribute('tabindex', 0);
// Global listeners
listeners.global.call(this);
// Add style hook
ui.addStyleHook.call(this);