Beispiel #1
0
        public void SendSetSourceCommand(INode node)
        {
            VideoSizeHelper sizeHelper = new VideoSizeHelper(node);

            RelatedContentPanelUtil.Instance.LoadRelatedVideoContent(VideoSource, sizeHelper.Size);

            var setSourceCommand = new Command();

            setSourceCommand.Name   = "Play";
            setSourceCommand.Params = new List <Param>();
            setSourceCommand.Params.Add(new Param()
            {
                Name = "Source", Value = VideoSource
            });
            setSourceCommand.Params.Add(new Param()
            {
                Name = "StartTimeCode", Value = "00:00:00"
            });
            setSourceCommand.Params.Add(new Param()
            {
                Name = "AutoPlay", Value = "false"
            });
            setSourceCommand.Params.Add(new Param()
            {
                Name = "NodeId", Value = node.Id.ToString()
            });

            if (_playerInitialised)
            {
                Utilities.SendMessage(MessageSender, setSourceCommand);
            }
            else
            {
                _cachedCommand = setSourceCommand;
            }
        }
Beispiel #2
0
        private void playVideoMenuItem_Click(object sender, RoutedEventArgs e)
        {
            MetadataContext videoSourceKey = new MetadataContext()
            {
                MetadataName = "Video.Source",
                NodeUid = NodeProxy.Id
            };
            string source = NodeProxy.GetNodeMetadata(videoSourceKey).MetadataValue;

            VideoSizeHelper sizeHelper = new VideoSizeHelper(NodeProxy);
            RelatedContentPanelUtil.Instance.LoadRelatedVideoContent(source, sizeHelper.Size);

            string startPosition = null;
            string endPosition = null;
            Command playCommand = new Command();
            playCommand.Name = "Play";
            playCommand.Params = new List<Param>();
            playCommand.Params.Add(new Param() { Name = "Source", Value = source });
            MetadataContext videoStartKey = new MetadataContext()
            {
                MetadataName = "Video.StartPosition",
                NodeUid = NodeProxy.Id
            };
            if (NodeProxy.HasMetadata(videoStartKey))
            {
                startPosition = NodeProxy.GetNodeMetadata(videoStartKey).MetadataValue;
                playCommand.Params.Add(new Param() { Name="StartTimeCode", Value=startPosition});
            }
            MetadataContext videoEndKey = new MetadataContext()
            {
                MetadataName = "Video.EndPosition",
                NodeUid = NodeProxy.Id
            };
            if (NodeProxy.HasMetadata(videoEndKey))
            {
                endPosition = NodeProxy.GetNodeMetadata(videoEndKey).MetadataValue;
                playCommand.Params.Add(new Param() { Name="EndTimeCode", Value=endPosition});
            }
            playCommand.Params.Add(new Param() { Name="NodeId", Value=NodeProxy.Id.ToString()});
            //Utilities.SendMessage<Command>(MessageSender, playCommand);
        }
Beispiel #3
0
        public void SendSetSourceCommand(INode node)
        {
            VideoSizeHelper sizeHelper = new VideoSizeHelper(node);
            RelatedContentPanelUtil.Instance.LoadRelatedVideoContent(VideoSource, sizeHelper.Size);

            var setSourceCommand = new Command();
            setSourceCommand.Name = "Play";
            setSourceCommand.Params = new List<Param>();
            setSourceCommand.Params.Add(new Param() { Name="Source", Value=VideoSource});
            setSourceCommand.Params.Add(new Param() { Name="StartTimeCode", Value="00:00:00"});
            setSourceCommand.Params.Add(new Param() { Name="AutoPlay", Value="false"});
            setSourceCommand.Params.Add(new Param() { Name="NodeId", Value=node.Id.ToString()});

            if (_playerInitialised)
            {
                Utilities.SendMessage(MessageSender, setSourceCommand);
            }
            else
            {
                _cachedCommand = setSourceCommand;
            }
        }