/// <summary> /// Creates an instance of <see cref="YoutubeConverter"/>. /// </summary> public YoutubeConverter(IYoutubeClient youtubeClient, string ffmpegFilePath) { _youtubeClient = youtubeClient.GuardNotNull(nameof(youtubeClient)); ffmpegFilePath.GuardNotNull(nameof(ffmpegFilePath)); _ffmpeg = new FfmpegCli(ffmpegFilePath); }
/// <summary> /// Creates an instance of <see cref="YoutubeConverter"/>. /// </summary> public YoutubeConverter(IYoutubeClient youtubeClient, string ffmpegFilePath) { _youtubeClient = youtubeClient; _ffmpeg = new FfmpegCli(ffmpegFilePath); // Ensure running on desktop OS if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { throw new PlatformNotSupportedException("YoutubeExplode.Converter works only on desktop operating systems."); } }
/// <summary> /// Creates an instance of <see cref="YoutubeConverter"/>. /// </summary> public YoutubeConverter(IYoutubeClient youtubeClient, string ffmpegFilePath) { _youtubeClient = youtubeClient; _ffmpeg = new FfmpegCli(ffmpegFilePath); }