Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove volume command handlers #648

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 1 addition & 37 deletions src/components/commandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export abstract class CommandHandler {
DisplayContent: CommandHandler.displayContentHandler,
Identify: CommandHandler.IdentifyHandler,
InstantMix: CommandHandler.instantMixHandler,
Mute: CommandHandler.MuteHandler,
NextTrack: CommandHandler.nextTrackHandler,
Pause: CommandHandler.PauseHandler,
PlayLast: CommandHandler.playLastHandler,
Expand All @@ -40,14 +39,9 @@ export abstract class CommandHandler {
SetAudioStreamIndex: CommandHandler.setAudioStreamIndexHandler,
SetRepeatMode: CommandHandler.SetRepeatModeHandler,
SetSubtitleStreamIndex: CommandHandler.setSubtitleStreamIndexHandler,
SetVolume: CommandHandler.SetVolumeHandler,
Shuffle: CommandHandler.shuffleHandler,
Stop: CommandHandler.StopHandler,
ToggleMute: CommandHandler.ToggleMuteHandler,
Unmute: CommandHandler.MuteHandler,
Unpause: CommandHandler.UnpauseHandler,
VolumeDown: CommandHandler.VolumeDownHandler,
VolumeUp: CommandHandler.VolumeUpHandler
Unpause: CommandHandler.UnpauseHandler
};

static configure(playerManager: framework.PlayerManager): void {
Expand Down Expand Up @@ -114,26 +108,6 @@ export abstract class CommandHandler {
);
}

// VolumeUp, VolumeDown and ToggleMute commands seem to be handled on the sender in the current implementation.
// From what I can tell there's no convenient way for the receiver to get its own volume.
// We should probably remove these commands in the future.
static VolumeUpHandler(): void {
console.log('VolumeUp handler not implemented');
}

static VolumeDownHandler(): void {
console.log('VolumeDown handler not implemented');
}

static ToggleMuteHandler(): void {
console.log('ToggleMute handler not implemented');
}

static SetVolumeHandler(): void {
// This is now implemented on the sender
console.log('SetVolume handler not implemented');
}

static IdentifyHandler(): void {
if (!PlaybackManager.isPlaying()) {
if (!PlaybackManager.isBuffering()) {
Expand All @@ -159,16 +133,6 @@ export abstract class CommandHandler {
);
}

static MuteHandler(): void {
// CommandHandler is now implemented on the sender
console.log('Mute handler not implemented');
}

static UnmuteHandler(): void {
// CommandHandler is now implemented on the sender
console.log('Unmute handler not implemented');
}

static StopHandler(): void {
this.playerManager.stop();
}
Expand Down
Loading