Skip to content

Commit

Permalink
removed Spicetify.Platform optionals
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsojramos committed Jan 30, 2022
1 parent 6d17b0e commit ea93db3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jsHelper/spicetifyWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const Spicetify = {
getProgress: () => (Spicetify.Player.origin._state.isPaused ? 0 : Date.now() - Spicetify.Player.origin._state.timestamp) + Spicetify.Player.origin._state.positionAsOfTimestamp,
getProgressPercent: () => (Spicetify.Player.getProgress()/Spicetify.Player.origin._state.duration),
getDuration: () => Spicetify.Player.origin._state.duration,
setVolume: (v) => { Spicetify.Platform?.PlaybackAPI.setVolume(v) },
increaseVolume: () => { Spicetify.Platform?.PlaybackAPI.raiseVolume() },
decreaseVolume: () => { Spicetify.Platform?.PlaybackAPI.lowerVolume() },
getVolume: () => Spicetify.Platform?.PlaybackAPI._volume,
setVolume: (v) => { Spicetify.Platform.PlaybackAPI.setVolume(v) },
increaseVolume: () => { Spicetify.Platform.PlaybackAPI.raiseVolume() },
decreaseVolume: () => { Spicetify.Platform.PlaybackAPI.lowerVolume() },
getVolume: () => Spicetify.Platform.PlaybackAPI._volume,
next: () => { Spicetify.Player.origin.skipToNext() },
back: () => { Spicetify.Player.origin.skipToPrevious() },
togglePlay: () => { Spicetify.Player.isPlaying() ? Spicetify.Player.pause() : Spicetify.Player.play() },
Expand Down

0 comments on commit ea93db3

Please sign in to comment.