예제 #1
0
        public async void StartStream(CancellationToken ct)
        {
            LogUtil.Write("Lifx: Starting stream.");
            var col = new Color {
                R = 0x00, G = 0x00, B = 0x00
            };

            Streaming = true;
            await _client.SetLightPowerAsync(B, TimeSpan.Zero, true).ConfigureAwait(false);

            await _client.SetColorAsync(B, col, 2700).ConfigureAwait(false);

            LogUtil.Write("Lifx: Streaming is active...");
            while (!ct.IsCancellationRequested)
            {
                Streaming = true;
            }

            StopStream();
        }