private static void Connection_StreamFrameReceived(StreamFrame frame) { if (frame.StreamId == streamId && frame.FrameType == FrameType.Video) { // Console.WriteLine("Frame received"); // Console.WriteLine("Attrib: 0x{0}", Convert.ToString((uint)frame.FrameAttrib, 16)); fs.Write(frame.Data, 0, frame.Data.Length); if (frame.KeyFrame) { Console.WriteLine("Keyframe received"); connection.StreamChange(streamId); // Should send this to KeepAlive every few seconds, so anytime a keyframe is received works! } } else { Console.WriteLine("Non-frame received"); } }