ISchemm.DurationFinder
4.1.0
See the version list below for details.
dotnet add package ISchemm.DurationFinder --version 4.1.0
NuGet\Install-Package ISchemm.DurationFinder -Version 4.1.0
<PackageReference Include="ISchemm.DurationFinder" Version="4.1.0" />
paket add ISchemm.DurationFinder --version 4.1.0
#r "nuget: ISchemm.DurationFinder, 4.1.0"
// Install ISchemm.DurationFinder as a Cake Addin #addin nuget:?package=ISchemm.DurationFinder&version=4.1.0 // Install ISchemm.DurationFinder as a Cake Tool #tool nuget:?package=ISchemm.DurationFinder&version=4.1.0
ISchemm.DurationFinder
This library will attempt detect the duration of a video, given a URL that
points to either a raw video resource (that you might put in a <video>
tag)
or a supported video-sharing site.
Providers
- SchemaOrgDurationProvider (for pages with a
<meta itemprop="duration">
tag) - OpenGraphDurationProvider (for pages with a
<meta property="og:video:duration">
or<meta property="video:duration">
tag) - OEmbedDurationProvider (for pages that provide oEmbed discovery through a
<link>
element to a JSON endpoint which contains a non-standardduration
property) - HlsDurationProvider (for HLS VOD playlists)
- MP4DurationProvider (for MPEG-4 Part 14 containers, such as .mp4 and .m4a - requires HTTP range request support on the remote server)
- VorbisDurationProvider (for Ogg containers - requires HTTP range request support on the remote server, and the file must contains a Vorbis stream)
Additional providers that are not included in Providers.All
but are used internally:
- ChunklistDurationProvider (for HLS VOD chunklists)
- JsonDurationProvider (for JSON files with a numeric
duration
property)
Support
- YouTube (SchemaOrgDurationProvider)
- SoundCloud (SchemaOrgDurationProvider)
- Vimeo (OEmbedDurationProvider)
- Twitch (OpenGraphDurationProvider)
- Dailymotion (OpenGraphDurationProvider)
- HLS (HlsDurationProvider)
- .mp4 (MP4DurationProvider)
- .m4a (MP4DurationProvider)
- .ogg (VorbisDurationProvider)
- .oga (VorbisDurationProvider)
- .ogv (VorbisDurationProvider)
Usage
- Use
ChainedDurationProvider
to combine multiple providers (or just use the static objectProviders.All
) - Call the extension function
GetDurationAsync(Uri)
on the resulting provider object
Each provider will check the content type of the GET response, and only
download what data is necessary. The first provider to come up with a valid
duration value will be used, and any remaining providers will be skipped. If
none of the providers come up with a result, GetDurationAsync(Uri)
will
check for a <link rel="canonical">
tag and try again (provided that the URL
in the tag has not been attempted yet).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- HtmlAgilityPack (>= 1.11.42)
- Microsoft.Bcl.AsyncInterfaces (>= 6.0.0)
- System.Text.Json (>= 6.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ISchemm.DurationFinder:
Package | Downloads |
---|---|
DurationHelper
A .NET library to get duration of a video from its URL. Supports MP4, HLS (VOD), YouTube and Twitch (if you provide API keys), Vimeo, Dailymotion, and SoundCloud. |
GitHub repositories
This package is not used by any popular GitHub repositories.