fix: Make sure we remove vjs-ended from the play toggle in all appropriate cases. (#4661)

Esse commit está contido em:
Pat O'Neill
2017-10-13 13:46:51 -04:00
commit de Gary Katsevman
commit 0287f6e076
+1 -1
Ver Arquivo
@@ -67,7 +67,6 @@ class PlayToggle extends Button {
* @listens Player#seeked * @listens Player#seeked
*/ */
handleSeeked(event) { handleSeeked(event) {
// remove the ended class
this.removeClass('vjs-ended'); this.removeClass('vjs-ended');
if (this.player_.paused()) { if (this.player_.paused()) {
@@ -86,6 +85,7 @@ class PlayToggle extends Button {
* @listens Player#play * @listens Player#play
*/ */
handlePlay(event) { handlePlay(event) {
this.removeClass('vjs-ended');
this.removeClass('vjs-paused'); this.removeClass('vjs-paused');
this.addClass('vjs-playing'); this.addClass('vjs-playing');
// change the button text to "Pause" // change the button text to "Pause"