diff options
author | Sam Potts <me@sampotts.me> | 2017-11-23 17:35:35 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2017-11-23 17:35:35 +1100 |
commit | 921cefd212f65290349aa1d9d533c95cb1f6fcce (patch) | |
tree | 69c58f43d154440d9f327fb5028372a488522fe2 /src/js/listeners.js | |
parent | de6f0f1b778180f7b26f85f45053ffb97eb526af (diff) | |
download | plyr-921cefd212f65290349aa1d9d533c95cb1f6fcce.tar.lz plyr-921cefd212f65290349aa1d9d533c95cb1f6fcce.tar.xz plyr-921cefd212f65290349aa1d9d533c95cb1f6fcce.zip |
Moved to provider + type to make it cleaner in future, fix for multiple players
Diffstat (limited to 'src/js/listeners.js')
-rw-r--r-- | src/js/listeners.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/listeners.js b/src/js/listeners.js index 8f95b1a7..7f64375c 100644 --- a/src/js/listeners.js +++ b/src/js/listeners.js @@ -221,7 +221,7 @@ const listeners = { // Handle the media finishing utils.on(this.media, 'ended', () => { // Show poster on end - if (this.type === 'video' && this.config.showPosterOnEnd) { + if (this.isHTML5 && this.isVideo && this.config.showPosterOnEnd) { // Restart this.restart(); @@ -243,7 +243,7 @@ const listeners = { utils.on(this.media, 'stalled waiting canplay seeked playing', event => ui.checkLoading.call(this, event)); // Click video - if (this.supported.ui && this.config.clickToPlay && this.type !== 'audio') { + if (this.supported.ui && this.config.clickToPlay && !this.isAudio) { // Re-fetch the wrapper const wrapper = utils.getElement.call(this, `.${this.config.classNames.video}`); |