@@ -105,26 +105,37 @@ class Controller {
105105 return ;
106106 }
107107 const time = this . player . video . duration * ( tx / this . player . template . playedBarWrap . offsetWidth ) ;
108+ if ( utils . isMobile ) {
109+ this . thumbnails && this . thumbnails . show ( ) ;
110+ }
108111 this . thumbnails && this . thumbnails . move ( tx ) ;
109112 this . player . template . playedBarTime . style . left = `${ ( tx - 20 ) } px` ;
110113 this . player . template . playedBarTime . innerText = utils . secondToTime ( time ) ;
111114 this . player . template . playedBarTime . classList . remove ( 'hidden' ) ;
112115 }
113116 } ) ;
114117
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 ) {
124120 this . thumbnails && this . thumbnails . hide ( ) ;
125- this . player . template . playedBarTime . classList . add ( 'hidden' ) ;
126121 }
127122 } ) ;
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+ }
128139 }
129140
130141 initFullButton ( ) {
0 commit comments