public static CastMessage ReceiverStatusMessage(int requestId) { var receiverStatusMessage = new MessageReceiverStatus { type = "RECEIVER_STATUS", requestId = requestId, status = new ReceiverStatus { volume = new Volume { controlType = "master", level = SystemCalls.GetVolume(), muted = SystemCalls.IsMuted(), stepInterval = .01f }, applications = new List <Application> { new Application { appId = "CC1AD845", sessionId = Guid.NewGuid().ToString(), transportId = Guid.NewGuid().ToString() } } } }; return(GetCastMessage(receiverStatusMessage, namespaceMedia)); }
public static CastMessage MediaStatusMessage(int requestId, DeviceState state, float secondsPlaying) { var mediaStatusMessage = new MessageMediaStatus { type = "MEDIA_STATUS", requestId = requestId, status = new List <MediaStatus>() { new MediaStatus { currentTime = secondsPlaying, playerState = state.ToString().ToUpper(), volume = new Volume { controlType = "master", level = SystemCalls.GetVolume(), muted = SystemCalls.IsMuted(), stepInterval = .01f } } }, }; return(GetCastMessage(mediaStatusMessage, namespaceReceiver)); }