aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/listeners.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-06-25 22:31:43 +1000
committerSam Potts <sam@potts.es>2018-06-25 22:31:43 +1000
commitdf458c5e7ae824fc0bf86462130ea9571229c273 (patch)
treef124e40eb4f39c55e0714837c82dedfec194f349 /src/js/listeners.js
parente206554146cca2dbb49fa597d015cba87f8d5ec4 (diff)
parente422806c44d6dd42db99aa8598964192351dbef6 (diff)
downloadplyr-df458c5e7ae824fc0bf86462130ea9571229c273.tar.lz
plyr-df458c5e7ae824fc0bf86462130ea9571229c273.tar.xz
plyr-df458c5e7ae824fc0bf86462130ea9571229c273.zip
Merge branch 'develop' of github.com:sampotts/plyr into develop
Diffstat (limited to 'src/js/listeners.js')
-rw-r--r--src/js/listeners.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/js/listeners.js b/src/js/listeners.js
index d9811dd1..7615e365 100644
--- a/src/js/listeners.js
+++ b/src/js/listeners.js
@@ -431,9 +431,11 @@ class Listeners {
};
// Play/pause toggle
- Array.from(this.player.elements.buttons.play).forEach(button => {
- bind(button, 'click', this.player.togglePlay, 'play');
- });
+ if (this.player.elements.buttons.play) {
+ Array.from(this.player.elements.buttons.play).forEach(button => {
+ bind(button, 'click', this.player.togglePlay, 'play');
+ });
+ }
// Pause
bind(this.player.elements.buttons.restart, 'click', this.player.restart, 'restart');