Ejemplo n.º 1
0
 private void OnMediaStatusChanged(MediaStatus status)
 {
     if (MediaStatusChanged != null)
     {
         MediaStatusChanged(this, status);
     }
 }
Ejemplo n.º 2
0
        public void Seek(double position)
        {
            EnsureChannelIsConnected();
            Application runningApplication = EnsureApplicationIsRunning();
            MediaStatus mediaStatus        = GetMediaStatus(runningApplication.TransportId);

            if (mediaStatus == null)
            {
                throw new InvalidOperationException("No media running");
            }

            StartSession(runningApplication.TransportId);
            Response response = _channel.SendRequest(Channel.NS_CAST_MEDIA, new SeekRequest(runningApplication.SessionId, mediaStatus.MediaSessionId, position), runningApplication.TransportId);

            HandleResponse(response);
        }