public RemoteFileStream(IProtoService protoService, File file, int duration) { _protoService = protoService; _file = file; _source = new RemoteVideoSource(protoService, file, duration); }
private void UpdateSource(MessageViewModel message, File file, int duration) { if (message == null || file == null || !SettingsService.Current.IsAutoPlayVideosEnabled) { Player.Source = _source = null; } else { if (_source?.Id != file.Id) { Player.Source = _source = new RemoteVideoSource(message.ProtoService, file, duration); message.Delegate.ViewVisibleMessages(false); } } }