public void CreateFromYouTubeVideo(IYouTubeVideo iYouTubeVideo) { PlaylistItemId = iYouTubeVideo.PlaylistItemId; Title = iYouTubeVideo.Title; VideoId = iYouTubeVideo.VideoId; Url = iYouTubeVideo.Url; }
public void DownloadVideoNonBlocking(IYouTubeVideo video, ISYMMSettings settings) { VideoDownloader downloader = new VideoDownloader(video); downloader.DownloadProgressChanged += (s, e) => { if (OnVideoDownloadProgressChanged != null) OnVideoDownloadProgressChanged(this, e); }; downloader.AudioExtractionProgressChanged += (s, e) => { if (OnVideoAudioExtractionProgressChanged != null) OnVideoAudioExtractionProgressChanged(this, e); }; downloader.VideoDownloadComplete += (s, e) => { if (OnVideoDownloadComplete != null) OnVideoDownloadComplete(this, e); }; downloader.VideoDownloadFailed += (s, e) => { if (OnVideoDownloadFailed != null) OnVideoDownloadFailed(this, e); }; new Thread(() => { downloader.Execute(settings); }).Start(); }
public VideoInformationLoadedEventArgs(IYouTubeVideo video) { this.Video = video; }
public void Execute(IYouTubeVideo video, ISYMMSettings settings) { VideoDownloader downloader = new VideoDownloader(video); downloader.DownloadProgressChanged += (s, e) => { if (OnVideoDownloadProgressChanged != null) OnVideoDownloadProgressChanged(this, e); }; downloader.AudioExtractionProgressChanged += (s, e) => { if (OnVideoAudioExtractionProgressChanged != null) OnVideoAudioExtractionProgressChanged(this, e); }; downloader.VideoDownloadComplete += (s, e) => { if (OnVideoDownloadComplete != null) OnVideoDownloadComplete(this, e); }; downloader.VideoDownloadFailed += (s, e) => { if (OnVideoDownloadFailed != null) OnVideoDownloadFailed(this, e); }; downloader.StreamPositionChanged += (s, e) => { if (OnStreamPostionChanged != null) OnStreamPostionChanged(this, e); }; downloader.StreamFinished += (s, e) => { if (OnStreamComplete != null) OnStreamComplete(this, e); }; downloader.Execute(settings); downloader = null; }
public VideoDownloadFailedEventArgs(IYouTubeVideo video, Exception innerException) { this.Video = video; this.InnerException = innerException; }
public void Remove(IYouTubeVideo video) { _videos.Remove(video); }
public void Add(IYouTubeVideo video) { _videos = _videos ?? new List <IYouTubeVideo>(); _videos.Add(video); }
public VideoDownloader(IYouTubeVideo video) { this.video = video; }
public DownloadProgressEventArgs(double progressPercentage, IYouTubeVideo video = null) { this.ProgressPercentage = progressPercentage; this.Video = video; }