1, Create a new .NET Class Library (dll) project
2, Add a reference to the VideoInfoManager.dll file. The classes are namespaced as NXU.WebVideoDownloader.VideoInfoManager
3, Create the plugin class. It must inherit the [WebVideoStream class]:
:::csharp
using NXU.WebVideoDownloader.VideoInfoManager;
public class YouTubeStream : WebVideoStream
{
// ...
}
4, Implement the constructor and the abstract methods of the base class as following
:::csharp
public YouTubeStream(string streamUri)
: base(streamUri)
{
}
public override VideoInformation GetVideoInformation()
{
// ...
// The return value is a VideoInformation object. See below.
}
To read more about the VideoInformation class, visit [VideoInformation class].
5, Add the necessary and optional attributes to your class
:::csharp
[StreamUriPattern(@"http[s]?://(www\.)youtube.com/.*")]
[PluginAuthorInfo(AuthorName = "John Smith", AuthorUrl = "http://www.my-page.com")]
[PluginDetails(PluginName = "YouTube Downloader", PluginVersion = "0.5",
PluginDescription = "Downloader plugin for YouTube videos")]
public class YouTubeStream : WebVideoStream
{
// ...
}
6, Compile. You are done.
Wiki: Home
Wiki: Plugin FAQ
Wiki: VideoInformation class
Wiki: WebVideoStream class