@@ -19,10 +19,10 @@ class MP4VideoPlayer extends PolymerElement {
19
19
< div class ="title ">
20
20
< h3 id ="video_title "> [[title]]</ h3 >
21
21
</ div >
22
- < div class ="pulse-icon icon-left ">
22
+ < div id =" replay_pulse " class ="pulse-icon icon-left ">
23
23
< iron-icon icon ="player-icons:replay-5 "> </ iron-icon >
24
24
</ div >
25
- < div class ="pulse-icon icon-right ">
25
+ < div id =" forward_pulse " class ="pulse-icon icon-right ">
26
26
< iron-icon icon ="player-icons:forward-5 "> </ iron-icon >
27
27
</ div >
28
28
< div class ="large-btn " on-click ="play ">
@@ -650,6 +650,8 @@ class MP4VideoPlayer extends PolymerElement {
650
650
const maxVol = 1 ;
651
651
const minVol = 0 ;
652
652
const { currentTime, volume } = this . _getShadowElementById ( 'video_player' ) ;
653
+ const forwardPulse = this . _getShadowElementById ( 'forward_pulse' ) ;
654
+ const replayPulse = this . _getShadowElementById ( 'replay_pulse' ) ;
653
655
switch ( event . keyCode ) {
654
656
case this . _SPACE_BAR_KEY :
655
657
case this . _P_KEY :
@@ -663,10 +665,18 @@ class MP4VideoPlayer extends PolymerElement {
663
665
break ;
664
666
case this . _LEFT_ARROW : {
665
667
this . _updateCurrentTime ( currentTime - this . skipBy ) ;
668
+ replayPulse . classList . remove ( 'on' ) ;
669
+ // eslint-disable-next-line no-unused-expressions
670
+ replayPulse . offsetWidth ; // trigger reflow..
671
+ replayPulse . classList . add ( 'on' ) ;
666
672
break ;
667
673
}
668
674
case this . _RIGHT_ARROW : {
669
675
this . _updateCurrentTime ( currentTime + this . skipBy ) ;
676
+ forwardPulse . classList . remove ( 'on' ) ;
677
+ // eslint-disable-next-line no-unused-expressions
678
+ forwardPulse . offsetWidth ; // trigger reflow..
679
+ forwardPulse . classList . add ( 'on' ) ;
670
680
break ;
671
681
}
672
682
case this . _UP_ARROW : {
0 commit comments