Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #144 from jellyfin/vol
Browse files Browse the repository at this point in the history
Fix volume manager until it can be toggled
  • Loading branch information
dkanada authored Jun 3, 2019
2 parents df1ebb9 + a4fe911 commit a64e5b4
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/NativeShell/src/RemotePlayerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,18 +305,6 @@ private void initMediaSessions() {

mediaSession.setActive(true);
mediaSession.setFlags(MediaSession.FLAG_HANDLES_TRANSPORT_CONTROLS | MediaSession.FLAG_HANDLES_MEDIA_BUTTONS);
// handle volume button presses from i.e. wear notifications, this will only generate up/down events, so the absolute values do not matter
mediaSession.setPlaybackToRemote(new VolumeProvider(VolumeProvider.VOLUME_CONTROL_RELATIVE, 100, 50) {
@Override
public void onAdjustVolume(int direction) {
if (direction > 0) {
sendCommand("volumeup");
}
else {
sendCommand("volumedown");
}
}
});
mediaSession.setCallback(new Callback() {
@Override
public void onPlay() {
Expand Down

0 comments on commit a64e5b4

Please sign in to comment.