aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2017-11-07 09:58:37 +1100
committerSam Potts <me@sampotts.me>2017-11-07 09:58:37 +1100
commite2c7491ccdbc09055d578d2631d92e892359bad4 (patch)
tree6328a1413649848bc9f9b0910fafb402067b096a /src/js/plyr.js
parent84505da84ba97ae1b189f9c695228d324e9dc3b8 (diff)
downloadplyr-e2c7491ccdbc09055d578d2631d92e892359bad4.tar.lz
plyr-e2c7491ccdbc09055d578d2631d92e892359bad4.tar.xz
plyr-e2c7491ccdbc09055d578d2631d92e892359bad4.zip
Using the “href” attribute on SVG if supported, using hasAttribute
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 355fe5cb..08e722c1 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -170,21 +170,22 @@ class Plyr {
case 'audio':
this.type = type;
- if (this.media.getAttribute('crossorigin') !== null) {
+ if (this.media.hasAttribute('crossorigin')) {
this.config.crossorigin = true;
}
- if (this.media.getAttribute('autoplay') !== null) {
+ if (this.media.hasAttribute('autoplay')) {
this.config.autoplay = true;
}
- if (this.media.getAttribute('playsinline') !== null) {
+ if (this.media.hasAttribute('playsinline')) {
this.config.inline = true;
}
- if (this.media.getAttribute('muted') !== null) {
+ if (this.media.hasAttribute('muted')) {
this.config.muted = true;
}
- if (this.media.getAttribute('loop') !== null) {
+ if (this.media.hasAttribute('loop')) {
this.config.loop.active = true;
}
+
break;
default: