File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,15 @@ function switchPlayAndPause() {
11
11
}
12
12
}
13
13
14
+ function updateIcon ( ) {
15
+ if ( video_application . paused ) {
16
+ this . textContent = '>' ;
17
+ }
18
+ else {
19
+ this . textContent = '||' ;
20
+ }
21
+ }
22
+
14
23
15
24
//click view play and pause
16
25
const video_application = document . querySelector ( '.player__video' ) ;
@@ -20,6 +29,10 @@ video_application.addEventListener('click', switchPlayAndPause);
20
29
const play_or_pause_ctrl = document . querySelector ( '.player__button[title="Toggle Play"]' ) ;
21
30
play_or_pause_ctrl . addEventListener ( 'click' , switchPlayAndPause ) ;
22
31
32
+ //video event update icon
33
+ video_application . addEventListener ( 'play' , updateIcon ) ;
34
+ video_application . addEventListener ( 'pause' , updateIcon ) ;
35
+
23
36
//process
24
37
video_application . getProcess = function ( ) {
25
38
//value to view to
You can’t perform that action at this time.
0 commit comments