Skip to content

Commit 65f06d4

Browse files
committed
Fix handling of HTML boolean attributes
1 parent 6dd1709 commit 65f06d4

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

build/ableplayer.dist.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@
7979

8080
// The following variables CAN be overridden with HTML attributes
8181

82-
// autoplay
82+
// autoplay (Boolean; if present always resolves to true, regardless of value)
8383
if ($(media).attr('autoplay') !== undefined) {
8484
this.autoplay = true;
8585
}
8686
else {
8787
this.autoplay = false;
8888
}
8989

90-
// loop (NOT FULLY SUPPORTED)
91-
if ($(media).attr('loop') !== undefined && $(media).attr('loop') !== false) {
90+
// loop (Boolean; if present always resolves to true, regardless of value)
91+
if ($(media).attr('loop') !== undefined) {
9292
this.loop = true;
9393
}
9494
else {

build/ableplayer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@
7979

8080
// The following variables CAN be overridden with HTML attributes
8181

82-
// autoplay
82+
// autoplay (Boolean; if present always resolves to true, regardless of value)
8383
if ($(media).attr('autoplay') !== undefined) {
8484
this.autoplay = true;
8585
}
8686
else {
8787
this.autoplay = false;
8888
}
8989

90-
// loop (NOT FULLY SUPPORTED)
91-
if ($(media).attr('loop') !== undefined && $(media).attr('loop') !== false) {
90+
// loop (Boolean; if present always resolves to true, regardless of value)
91+
if ($(media).attr('loop') !== undefined) {
9292
this.loop = true;
9393
}
9494
else {

build/ableplayer.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/ableplayer.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ableplayer",
3-
"version": "3.0.40",
3+
"version": "3.0.41",
44
"description": "fully accessible HTML5 media player",
55
"homepage": "http://ableplayer.github.io/ableplayer",
66
"bugs": "https://github.com/ableplayer/ableplayer/issues",

scripts/ableplayer-base.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@
7979

8080
// The following variables CAN be overridden with HTML attributes
8181

82-
// autoplay
82+
// autoplay (Boolean; if present always resolves to true, regardless of value)
8383
if ($(media).attr('autoplay') !== undefined) {
8484
this.autoplay = true;
8585
}
8686
else {
8787
this.autoplay = false;
8888
}
8989

90-
// loop (NOT FULLY SUPPORTED)
91-
if ($(media).attr('loop') !== undefined && $(media).attr('loop') !== false) {
90+
// loop (Boolean; if present always resolves to true, regardless of value)
91+
if ($(media).attr('loop') !== undefined) {
9292
this.loop = true;
9393
}
9494
else {

0 commit comments

Comments
 (0)