Skip to content

Commit

Permalink
Add debug mode switch
Browse files Browse the repository at this point in the history
  • Loading branch information
usox committed Oct 5, 2021
1 parent d060779 commit 54f7bf9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_API_URL=http://localhost:8888/
VITE_API_URL=http://localhost:8888/
VITE_DEBUG_MODE=true
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VITE_API_URL=/api/
VITE_DEBUG_MODE=false
3 changes: 2 additions & 1 deletion src/components/Lib/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SongListItemInterface from '../../model/SongListItemInterface';
export default class Player {

static init(app: DefineComponent, songList: Array<Object> = [{url: ''}]) {

amplitudejs.stop();

amplitudejs.init({
Expand All @@ -23,7 +24,7 @@ export default class Player {
Player.scrollPlaylist(song.index);
},
},
debug: true,
debug: import.meta.env.VITE_DEBUG_MODE == 'true',
delay: 250,
continue_next: true
});
Expand Down

0 comments on commit 54f7bf9

Please sign in to comment.