File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 3
3
*/
4
4
import Button from './button.js' ;
5
5
import Component from './component.js' ;
6
- import { isPromise } from './utils/promise' ;
6
+ import { isPromise , silencePromise } from './utils/promise' ;
7
7
8
8
/**
9
9
* The initial play button that shows before the video has played. The hiding of the
@@ -46,6 +46,7 @@ class BigPlayButton extends Button {
46
46
47
47
// exit early if clicked via the mouse
48
48
if ( this . mouseused_ && event . clientX && event . clientY ) {
49
+ silencePromise ( playPromise ) ;
49
50
return ;
50
51
}
51
52
Original file line number Diff line number Diff line change @@ -1637,7 +1637,7 @@ class Player extends Component {
1637
1637
}
1638
1638
1639
1639
if ( this . paused ( ) ) {
1640
- this . play ( ) ;
1640
+ silencePromise ( this . play ( ) ) ;
1641
1641
} else {
1642
1642
this . pause ( ) ;
1643
1643
}
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import ClickableComponent from './clickable-component.js';
5
5
import Component from './component.js' ;
6
6
import * as Fn from './utils/fn.js' ;
7
7
import * as Dom from './utils/dom.js' ;
8
+ import { silencePromise } from './utils/promise' ;
8
9
9
10
/**
10
11
* A `ClickableComponent` that handles showing the poster image for the player.
@@ -112,7 +113,7 @@ class PosterImage extends ClickableComponent {
112
113
}
113
114
114
115
if ( this . player_ . paused ( ) ) {
115
- this . player_ . play ( ) ;
116
+ silencePromise ( this . player_ . play ( ) ) ;
116
117
} else {
117
118
this . player_ . pause ( ) ;
118
119
}
You can’t perform that action at this time.
0 commit comments