File tree 1 file changed +5
-11
lines changed
1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -77,17 +77,11 @@ range_ctrls.forEach(ctrl => {
77
77
} ) ;
78
78
79
79
//player__button add 10s
80
- const jump_sec_ctrls = document . querySelectorAll ( '.player__button' ) ;
81
- jump_sec_ctrls . forEach ( ctrl => {
82
- ctrl . addEventListener ( 'click' , ( ) => {
83
- if ( ! ctrl . title ) {
84
- const newTime = video_application . currentTime + Number ( ctrl . dataset . skip ) ;
85
- // const str = `currentTime: ${video_application.currentTime} + ctrl.dataset.skip: ${Number(ctrl.dataset.skip)} = ${newTime}`;
86
- // console.log(str);
87
- video_application . currentTime = newTime ;
88
- }
89
- } ) ;
90
- } ) ;
80
+ const jump_sec_ctrls = document . querySelectorAll ( '[data-skip]' ) ;
81
+ jump_sec_ctrls . forEach ( ctrl =>
82
+ ctrl . addEventListener ( 'click' , ( ) =>
83
+ video_application . currentTime = video_application . currentTime + Number ( ctrl . dataset . skip )
84
+ ) ) ;
91
85
92
86
// setInterval(() => {
93
87
// console.log(video_application.currentTime);
You can’t perform that action at this time.
0 commit comments