Skip to content

Commit 01702c6

Browse files
author
Terrill
committed
Don't show bigPlayButton when pausing via metadata
1 parent 1400110 commit 01702c6

7 files changed

Lines changed: 21 additions & 9 deletions

File tree

‎build/ableplayer.dist.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6478,7 +6478,9 @@
64786478
if (typeof this.$bigPlayButton !== 'undefined') {
64796479
// Choose show/hide for big play button and adjust position.
64806480
if (this.isPaused() && !this.seekBar.tracking) {
6481-
this.$bigPlayButton.show();
6481+
if (!this.hideBigPlayButton) {
6482+
this.$bigPlayButton.show();
6483+
}
64826484
if (this.isFullscreen()) {
64836485
this.$bigPlayButton.width($(window).width());
64846486
this.$bigPlayButton.height($(window).height());
@@ -7597,6 +7599,8 @@
75977599
for (i=0; i<cueLines.length; i++) {
75987600
line = $.trim(cueLines[i]);
75997601
if (line.toLowerCase() === 'pause') {
7602+
// don't show big play button when pausing via metadata
7603+
this.hideBigPlayButton = true;
76007604
this.pauseMedia();
76017605
}
76027606
else {

‎build/ableplayer.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6478,7 +6478,9 @@
64786478
if (typeof this.$bigPlayButton !== 'undefined') {
64796479
// Choose show/hide for big play button and adjust position.
64806480
if (this.isPaused() && !this.seekBar.tracking) {
6481-
this.$bigPlayButton.show();
6481+
if (!this.hideBigPlayButton) {
6482+
this.$bigPlayButton.show();
6483+
}
64826484
if (this.isFullscreen()) {
64836485
this.$bigPlayButton.width($(window).width());
64846486
this.$bigPlayButton.height($(window).height());
@@ -7597,6 +7599,8 @@
75977599
for (i=0; i<cueLines.length; i++) {
75987600
line = $.trim(cueLines[i]);
75997601
if (line.toLowerCase() === 'pause') {
7602+
// don't show big play button when pausing via metadata
7603+
this.hideBigPlayButton = true;
76007604
this.pauseMedia();
76017605
}
76027606
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: 4 additions & 4 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": "2.3.27",
3+
"version": "2.3.28",
44
"description": "fully accessible HTML5 media player",
55
"homepage": "http://ableplayer.github.io/ableplayer",
66
"bugs": "https://github.com/ableplayer/ableplayer/issues",

‎scripts/control.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,9 @@
507507
if (typeof this.$bigPlayButton !== 'undefined') {
508508
// Choose show/hide for big play button and adjust position.
509509
if (this.isPaused() && !this.seekBar.tracking) {
510-
this.$bigPlayButton.show();
510+
if (!this.hideBigPlayButton) {
511+
this.$bigPlayButton.show();
512+
}
511513
if (this.isFullscreen()) {
512514
this.$bigPlayButton.width($(window).width());
513515
this.$bigPlayButton.height($(window).height());

‎scripts/metadata.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
for (i=0; i<cueLines.length; i++) {
3939
line = $.trim(cueLines[i]);
4040
if (line.toLowerCase() === 'pause') {
41+
// don't show big play button when pausing via metadata
42+
this.hideBigPlayButton = true;
4143
this.pauseMedia();
4244
}
4345
else {

0 commit comments

Comments
 (0)