private void BroadcastPosition()
        {
            var temporalInformation = _apiAdapter.GetTemporalInformation();
            var message             = new SocketMessage(Constants.NowPlayingPosition, temporalInformation);

            _hub.Publish(new PluginResponseAvailableEvent(message));
        }
示例#2
0
        public void Execute(IEvent @event)
        {
            var temporalInformation = _apiAdapter.GetTemporalInformation();
            var message             = new SocketMessage(Constants.NowPlayingPosition, temporalInformation);

            _hub.Publish(new PluginResponseAvailableEvent(message, @event.ConnectionId));
        }
示例#3
0
        public void Execute(IEvent receivedEvent)
        {
            if (receivedEvent == null)
            {
                throw new ArgumentNullException(nameof(receivedEvent));
            }

            var temporalInformation = _apiAdapter.GetTemporalInformation();
            var message             = new SocketMessage(Constants.NowPlayingPosition, temporalInformation);

            _hub.Publish(new PluginResponseAvailableEvent(message, receivedEvent.ConnectionId));
        }
        public void Execute(IEvent @event)
        {
            var token = @event.DataToken();

            if (token != null && token.Type == JTokenType.Integer)
            {
                var position = token.Value <int>();
                _apiAdapter.SeekTo(position);
            }

            var message = new SocketMessage(Constants.NowPlayingPosition, _apiAdapter.GetTemporalInformation());

            _hub.Publish(new PluginResponseAvailableEvent(message));
        }