File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed
Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 4040 {
4141 "command" : " spectrogram.revealInFileExplorer" ,
4242 "title" : " Reveal in File Explorer"
43+ },
44+ {
45+ "command" : " spectrogram.refresh" ,
46+ "title" : " Refresh" ,
47+ "icon" : " $(refresh)"
4348 }
4449 ],
4550 "menus" : {
4651 "commandPalette" : [
4752 {
4853 "command" : " spectrogram.revealInFileExplorer" ,
4954 "when" : " false"
55+ },
56+ {
57+ "command" : " spectrogram.refresh" ,
58+ "when" : " false"
5059 }
5160 ],
5261 "view/item/context" : [
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ const REFRESH_ICON = '<i class="codicon codicon-refresh"></i>'
8181 susresBtn . innerHTML = PLAY_ICON
8282 cancelAnimationFrame ( id )
8383 played += Date . now ( ) - startAt
84+ togglePlaybackButtons ( 'PAUSED' )
8485 } )
8586 } else if ( isEnded ) {
8687 isEnded = false
@@ -108,6 +109,7 @@ const REFRESH_ICON = '<i class="codicon codicon-refresh"></i>'
108109 startAt = Date . now ( )
109110 draw ( )
110111 durationWatch ( )
112+ togglePlaybackButtons ( 'PLAYING' )
111113 } )
112114 }
113115 }
@@ -215,8 +217,16 @@ const REFRESH_ICON = '<i class="codicon codicon-refresh"></i>'
215217 seekbar . style . display = 'none'
216218 break
217219 case 'READY' :
220+ susresBtn . innerHTML = PLAY_ICON
221+ susresBtn . classList . remove ( 'disabled' )
222+ susresBtn . disabled = false
223+ backBtn . style . display = 'none'
224+ forwardBtn . style . display = 'none'
225+ seekbar . style . display = 'none'
226+ break
227+ case 'PAUSED' :
218228 case 'PLAYING' :
219- susresBtn . innerHTML = state === 'PLAYING ' ? PAUSE_ICON : PLAY_ICON
229+ susresBtn . innerHTML = state === 'PAUSED ' ? PLAY_ICON : PAUSE_ICON
220230 susresBtn . classList . remove ( 'disabled' )
221231 susresBtn . disabled = false
222232 backBtn . style . display = 'inline-block'
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function activate(context) {
1919 }
2020 const { fullFilePath } = file . selection [ 0 ]
2121 const format = fullFilePath . split ( '.' ) . pop ( )
22- if ( ! [ 'flac' , 'mp3' ] . includes ( format ) ) return
22+ if ( ! [ 'flac' , 'mp3' , 'wav' ] . includes ( format . toLowerCase ( ) ) ) return
2323
2424 const label = path . parse ( file . selection [ 0 ] . label ) . name
2525 const songPath = Uri . file ( fullFilePath )
You can’t perform that action at this time.
0 commit comments