private void OnMediaStatusChanged(MediaStatus status) { if (MediaStatusChanged != null) { MediaStatusChanged(this, status); } }
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); }