mirror of
https://github.com/videojs/video.js.git
synced 2024-12-12 11:15:04 +02:00
parent
a7cbb2a948
commit
2c6e4397bb
@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import Button from '../button.js';
|
import Button from '../button.js';
|
||||||
import Component from '../component.js';
|
import Component from '../component.js';
|
||||||
|
import {silencePromise} from '../utils/promise';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Button to toggle between play and pause.
|
* Button to toggle between play and pause.
|
||||||
@ -57,7 +58,7 @@ class PlayToggle extends Button {
|
|||||||
*/
|
*/
|
||||||
handleClick(event) {
|
handleClick(event) {
|
||||||
if (this.player_.paused()) {
|
if (this.player_.paused()) {
|
||||||
this.player_.play();
|
silencePromise(this.player_.play());
|
||||||
} else {
|
} else {
|
||||||
this.player_.pause();
|
this.player_.pause();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user