Example #1
0
        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;
            }
        }
Example #2
0
 public void SetSourceFromCommand(VideoPlayerSharedLib.Command command)
 {
     if (command.ContainsParam("Source"))
     {
         Uri source;
         Uri.TryCreate(command.GetParamValue("Source"), UriKind.Absolute, out source);
         Source = source;
     }
 }
Example #3
0
 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);
 }
Example #4
0
        //public TimeSpan PlayingTime { get; set; }

        public VideoNode(VideoPlayerSharedLib.Command command)
        {
            InitializeVideoNode(command);
            //PlayingTime = TimeSpan.Parse("00:00:00");
            SetSourceFromCommand(command);
        }