private bool ExecuteEmptyResponse(IMediaPlayer mediaPlayer, BaseRequest message, Stream outStream) { switch (message) { case SetVolume m: mediaPlayer.SetVolume(m.Volume); break; case SetMute m: mediaPlayer.SetMute(m.IsMuted); break; case SetPlaybackSpeed m: mediaPlayer.SetPlaybackSpeed(m.Speed); break; case SetAudioTrack m: mediaPlayer.SetAudioTrack(m.TrackId); break; case SetVideoTrack m: mediaPlayer.SetVideoTrack(m.TrackId); break; case Play _: mediaPlayer.Play(); break; case Pause _: mediaPlayer.Pause(); break; case LocalFileStreamDisconnect _: mediaPlayer.DisconnectLocalFileStream(); break; case StepForward _: mediaPlayer.StepForward(); break; case StepBack _: mediaPlayer.StepBack(); break; case Seek m: mediaPlayer.Seek(m.Position); break; default: return(false); } responseService.ReturnEmptyResponse(outStream, message); return(true); }