@@ -105,26 +105,37 @@ class Controller {
105
105
return ;
106
106
}
107
107
const time = this . player . video . duration * ( tx / this . player . template . playedBarWrap . offsetWidth ) ;
108
+ if ( utils . isMobile ) {
109
+ this . thumbnails && this . thumbnails . show ( ) ;
110
+ }
108
111
this . thumbnails && this . thumbnails . move ( tx ) ;
109
112
this . player . template . playedBarTime . style . left = `${ ( tx - 20 ) } px` ;
110
113
this . player . template . playedBarTime . innerText = utils . secondToTime ( time ) ;
111
114
this . player . template . playedBarTime . classList . remove ( 'hidden' ) ;
112
115
}
113
116
} ) ;
114
117
115
- this . player . template . playedBarWrap . addEventListener ( 'mouseenter' , ( ) => {
116
- if ( this . player . video . duration ) {
117
- this . thumbnails && this . thumbnails . show ( ) ;
118
- this . player . template . playedBarTime . classList . remove ( 'hidden' ) ;
119
- }
120
- } ) ;
121
-
122
- this . player . template . playedBarWrap . addEventListener ( 'mouseleave' , ( ) => {
123
- if ( this . player . video . duration ) {
118
+ this . player . template . playedBarWrap . addEventListener ( utils . nameMap . dragEnd , ( ) => {
119
+ if ( utils . isMobile ) {
124
120
this . thumbnails && this . thumbnails . hide ( ) ;
125
- this . player . template . playedBarTime . classList . add ( 'hidden' ) ;
126
121
}
127
122
} ) ;
123
+
124
+ if ( ! utils . isMobile ) {
125
+ this . player . template . playedBarWrap . addEventListener ( 'mouseenter' , ( ) => {
126
+ if ( this . player . video . duration ) {
127
+ this . thumbnails && this . thumbnails . show ( ) ;
128
+ this . player . template . playedBarTime . classList . remove ( 'hidden' ) ;
129
+ }
130
+ } ) ;
131
+
132
+ this . player . template . playedBarWrap . addEventListener ( 'mouseleave' , ( ) => {
133
+ if ( this . player . video . duration ) {
134
+ this . thumbnails && this . thumbnails . hide ( ) ;
135
+ this . player . template . playedBarTime . classList . add ( 'hidden' ) ;
136
+ }
137
+ } ) ;
138
+ }
128
139
}
129
140
130
141
initFullButton ( ) {
0 commit comments