Ejemplo n.º 1
0
        /// <summary>
        /// Set the current volume
        /// </summary>
        public async Task <int> SetVolume(XBMCRPC.Global.IncrementDecrement volume)
        {
            var jArgs = new JObject();

            if (volume != null)
            {
                var jpropvolume = JToken.FromObject(volume, _client.Serializer);
                jArgs.Add(new JProperty("volume", jpropvolume));
            }
            return(await _client.GetData <int>("Application.SetVolume", jArgs));
        }
Ejemplo n.º 2
0
        public int SetVolume2(XBMCRPC.Global.IncrementDecrement volume = 0)
        {
            var jArgs = new JObject();

            if (volume != null)
            {
                var jpropvolume = JToken.FromObject(volume, _client.Serializer);
                jArgs.Add(new JProperty("volume", jpropvolume));
            }
            var jRet = _client.GetData <int>("Application.SetVolume", jArgs);

            return(jRet);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Set the speed of the current playback
        /// </summary>
        public async Task <XBMCRPC.Player.Speed> SetSpeed(XBMCRPC.Global.IncrementDecrement speed, int playerid = 0)
        {
            var jArgs = new JObject();

            if (playerid != null)
            {
                var jpropplayerid = JToken.FromObject(playerid, _client.Serializer);
                jArgs.Add(new JProperty("playerid", jpropplayerid));
            }
            if (speed != null)
            {
                var jpropspeed = JToken.FromObject(speed, _client.Serializer);
                jArgs.Add(new JProperty("speed", jpropspeed));
            }
            return(await _client.GetData <XBMCRPC.Player.Speed>("Player.SetSpeed", jArgs));
        }
Ejemplo n.º 4
0
        public XBMCRPC.Player.Speed SetSpeed2(int playerid = 0, XBMCRPC.Global.IncrementDecrement speed = 0)
        {
            var jArgs = new JObject();

            if (playerid != null)
            {
                var jpropplayerid = JToken.FromObject(playerid, _client.Serializer);
                jArgs.Add(new JProperty("playerid", jpropplayerid));
            }
            if (speed != null)
            {
                var jpropspeed = JToken.FromObject(speed, _client.Serializer);
                jArgs.Add(new JProperty("speed", jpropspeed));
            }
            var jRet = _client.GetData <XBMCRPC.Player.Speed>("Player.SetSpeed", jArgs);

            return(jRet);
        }