public void SetStartTimeAndEndTimeFromCommand(VideoPlayerSharedLib.Command command) { if (command.ContainsParam("StartTimeCode")) { TimeSpan startTimeCode; StartTimeCodeProvided = TimeSpan.TryParse(command.GetParamValue("StartTimeCode"), out startTimeCode); StartTime = startTimeCode; } if (command.ContainsParam("EndTimeCode")) { TimeSpan endTimeCode; EndTimeCodeProvided = TimeSpan.TryParse(command.GetParamValue("EndTimeCode"), out endTimeCode); EndTime = endTimeCode; } if (command.ContainsParam("AutoPlay")) { bool autoPlay; Boolean.TryParse(command.GetParamValue("AutoPlay"), out autoPlay); AutoPlay = autoPlay; } else { AutoPlay = true; } }
public void SetSourceFromCommand(VideoPlayerSharedLib.Command command) { if (command.ContainsParam("Source")) { Uri source; Uri.TryCreate(command.GetParamValue("Source"), UriKind.Absolute, out source); Source = source; } }
private void InitializeVideoNode(VideoPlayerSharedLib.Command command) { InitializeState(); if (command.ContainsParam("NodeId")) { Guid nodeId; if (Guid.TryParse(command.GetParamValue("NodeId"), out nodeId)) { NodeId = nodeId; } } SetStartTimeAndEndTimeFromCommand(command); }