youtube-umbraco - YouTube.Umbraco 1.0.4
A YouTube video picker for Umbraco.
PM> Install-Package YouTube.Umbraco -Version 1.0.4 -Source https://www.myget.org/F/youtube-umbraco/api/v3/index.json
> nuget.exe install YouTube.Umbraco -Version 1.0.4 -Source https://www.myget.org/F/youtube-umbraco/api/v3/index.json
> dotnet add package YouTube.Umbraco --version 1.0.4 --source https://www.myget.org/F/youtube-umbraco/api/v3/index.json
source https://www.myget.org/F/youtube-umbraco/api/v3/index.json
nuget YouTube.Umbraco ~> 1.0.4
Copy to clipboard
> choco install YouTube.Umbraco --version 1.0.4 --source https://www.myget.org/F/youtube-umbraco/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "youtube-umbraco" -SourceLocation "https://www.myget.org/F/youtube-umbraco/api/v2"
Install-Module -Name "YouTube.Umbraco" -RequiredVersion "1.0.4" -Repository "youtube-umbraco"
Copy to clipboard
YouTube for Umbraco (v7+)
This is a project for adding YouTube videos to your Umbraco site. Currently it only consists of a single property editor that allows you to easily pick videos from a specific YouTube channel.
YouTube Channel Picker
Currently this package consists of the Google .NET C# Library for YouTube API's along with a v7 Angular Property Editor for selecting video/s from a YouTube channel.
Installation
- Umbraco Package http://our.umbraco.org/projects/backoffice-extensions/youtube
- NuGet http://www.nuget.org/packages/YouTube.Umbraco/
- MyGet (for latest prerelase build) - https://www.myget.org/gallery/youtube-umbraco
Current AppVeyor build status:
###Using your own YouTube API key
- Follow the instructions at https://developers.google.com/youtube/v3/getting-started
- Add the following
appSettingkey to yourweb.configfile:
<appSettings>
<add key="YouTube-Umbraco:ApiKey" value="<APIKEY>" />
</appSettings>
Settings (Prevalues)
The YouTube Channel picker has two settings or prevalues as it's more commonly known:
Order By
Order the videos by:
- Date
- Title
- Views
- Ratings
Channel/Username
Enter the usename of channel username you wish to display videos from in the picker. Press the button to validate & check the channel is correct.
Min & Max
You can enable a minimum number of items to be selected along with a maximum number of items. You can enable both values or just set a minimum or a maximum. The choice is yours.
Debug
Enable this checkbox to show debug informatiom, JSON objects & other debug information in the browser console along with the JSON object we save to Umbraco is shown.
Package File Contents
DLLs in the Bin Folder
- bin/System.Net.Http.Primitives.dll
- bin/Microsoft.Threading.Tasks.dll
- bin/Microsoft.Threading.Tasks.Extensions.dll
- bin/Google.Apis.Auth.dll
- bin/Google.Apis.Auth.PlatformServices.dll
- bin/Google.Apis.Core.dll
- bin/Google.Apis.Core.pdb
- bin/Google.Apis.dll
- bin/Google.Apis.pdb
- bin/Google.Apis.PlatformServices.dll
- bin/Google.Apis.YouTube.v3.dll
- bin/Google.Apis.YouTube.v3.pdb
- bin/YouTube.Umbraco.dll
- bin/YouTube.Umbraco.pdb
Package Files
- App_Plugins/YouTube/package.manifest
- App_Plugins/YouTube/css/YouTube.css
- App_Plugins/YouTube/js/YouTube.js
- App_Plugins/YouTube/views/preValues/YouTube.ChannelInfo.html
- App_Plugins/YouTube/views/preValues/YouTube.MinMax.html
- App_Plugins/YouTube/views/preValues/YouTube.OrderBy.html
- App_Plugins/YouTube/views/propertyEditors/YouTube.Channel.html
Use in templates
With the thanks to Jeavon Leopold he has created a property value converter that takes our simple JSON that we save to the Umbraco DB and makes a more useful strongly typed object to work with.
@using YouTube.Models
@foreach (var typedVideo in Model.Content.GetPropertyValue<YouTube>("video"))
{
<div>@Html.Raw(typedVideo.Player.EmbedHtml)</div>
@typedVideo.Snippet.Title<br/>
@typedVideo.Statistics.ViewCount<br/>
@typedVideo.Snippet.PublishedAt.Value.ToShortDateString()
}
Or override the sort order and order by values on the video, such as view count
@foreach (var typedVideo in Model.Content.GetPropertyValue<YouTube>("video").OrderByDescending(x => x.Statistics.ViewCount))
{
<div>@Html.Raw(typedVideo.Player.EmbedHtml)</div>
@typedVideo.Snippet.Title<br />
@typedVideo.Statistics.ViewCount<br />
@typedVideo.Snippet.PublishedAt.Value.ToShortDateString()
}
You can use the new extension method to use the YouTube player API options here: https://developers.google.com/youtube/youtube_player_demo
@foreach (var typedVideo in Model.Content.GetPropertyValue<YouTube>("video"))
{
<div>@Html.Raw(typedVideo.EmbedVideoWithOptions(modestBranding: true, theme: YouTubeExtensionMethods.Theme.light))</div>
@typedVideo.Snippet.Title<br />
@typedVideo.Statistics.ViewCount<br />
@typedVideo.Snippet.PublishedAt.Value.ToShortDateString()
}
Thanks
Many thanks to Jeavon Leopold who helped collab on this project and creating the C# PropertyValue Convertor, which enables us to turn the simple JSON object we store in Umbraco of YouTube IDs and Video Titles and turn them into a collection of strongly typed YouTube video objects, allowing you to get much more detailed info on the video.
For example such as thumbnails, view counts, likes, tags and more.
-
Any 0.0
- Microsoft.Bcl (>= 1.1.9)
- Microsoft.Bcl.Async (>= 1.0.168)
- Microsoft.Net.Http (>= 2.2.28)
- Newtonsoft.Json (>= 6.0.6)
- UmbracoCms.Core (>= 7.1.4)
- .NETFramework 4.5: 4.5.0.0
OwnersWarren Buckley Jeavon Leopold |
AuthorsWarren Buckley, Jeavon Leopold |
Project URLhttps://github.com/warrenbuckley/YouTube-Umbraco |
LicenseMIT |
Tagsumbraco |
Info154 total downloads |
| 5 downloads for version 1.0.4 |
| Download (177.43 KB) |
| Found on the current feed only |
Package history
| Version | Size | Last updated | Downloads | Mirrored? | |||
|---|---|---|---|---|---|---|---|
|
|
1.0.4 | 177.43 KB | Thu, 21 Apr 2016 20:24:07 GMT | 5 |
|
||
|
|
1.0.4-build92 | 177.58 KB | Fri, 29 Apr 2016 18:56:58 GMT | 1 |
|
||
|
|
1.0.4-build91 | 177.5 KB | Fri, 29 Apr 2016 18:50:04 GMT | 2 |
|
||
|
|
1.0.4-build85 | 177.5 KB | Thu, 21 Apr 2016 20:06:08 GMT | 1 |
|
||
|
|
1.0.4-build84 | 177.49 KB | Thu, 21 Apr 2016 19:51:32 GMT | 1 |
|
||
|
|
1.0.4-build83 | 177.5 KB | Thu, 21 Apr 2016 19:36:35 GMT | 1 |
|
||
|
|
1.0.4-build80 | 177.41 KB | Sun, 14 Jun 2015 20:03:41 GMT | 36 |
|
||
|
|
1.0.3 | 177.34 KB | Fri, 17 Apr 2015 23:12:15 GMT | 17 |
|
||
|
|
1.0.3-build78 | 177.41 KB | Fri, 17 Apr 2015 22:55:29 GMT | 1 |
|
||
|
|
1.0.3-build77 | 177.41 KB | Fri, 17 Apr 2015 18:22:49 GMT | 1 |
|
||
|
|
1.0.2 | 177.33 KB | Fri, 17 Apr 2015 17:44:37 GMT | 1 |
|
||
|
|
1.0.2-build75 | 177.41 KB | Fri, 17 Apr 2015 14:59:38 GMT | 1 |
|
||
|
|
1.0.2-build74 | 167.12 KB | Fri, 27 Mar 2015 20:56:54 GMT | 17 |
|
||
|
|
1.0.2-build73 | 166.03 KB | Fri, 27 Mar 2015 16:52:48 GMT | 1 |
|
||
|
|
1.0.2-build72 | 166.03 KB | Fri, 27 Mar 2015 16:29:07 GMT | 1 |
|
||
|
|
1.0.2-build69 | 166.03 KB | Thu, 26 Mar 2015 19:27:01 GMT | 1 |
|
||
|
|
1.0.2-build67 | 166.01 KB | Thu, 15 Jan 2015 10:25:28 GMT | 3 |
|
||
|
|
1.0.2-build66 | 163.63 KB | Thu, 15 Jan 2015 09:49:24 GMT | 1 |
|
||
|
|
1.0.2-build65 | 163.63 KB | Mon, 01 Sep 2014 12:41:43 GMT | 17 |
|
||
|
|
1.0.2-build63 | 163.46 KB | Sun, 24 Aug 2014 18:17:10 GMT | 2 |
|
||
|
|
1.0.2-build62 | 163.46 KB | Fri, 15 Aug 2014 20:44:50 GMT | 4 |
|
||
|
|
1.0.2-build61 | 163.47 KB | Fri, 15 Aug 2014 16:11:46 GMT | 1 |
|
||
|
|
1.0.2-build60 | 163.47 KB | Fri, 15 Aug 2014 16:05:50 GMT | 1 |
|
||
|
|
1.0.2-build59 | 163.47 KB | Fri, 15 Aug 2014 15:09:44 GMT | 12 |
|
||
|
|
1.0.2-build56 | 163.09 KB | Tue, 12 Aug 2014 18:36:30 GMT | 1 |
|
||
|
|
1.0.2-build55 | 163.09 KB | Tue, 12 Aug 2014 18:22:13 GMT | 1 |
|
||
|
|
1.0.2-build54 | 163.1 KB | Wed, 06 Aug 2014 17:45:43 GMT | 1 |
|
||
|
|
1.0.2-build53 | 162.8 KB | Mon, 04 Aug 2014 13:08:19 GMT | 1 |
|
||
|
|
1.0.2-build52 | 162.18 KB | Sun, 03 Aug 2014 20:59:04 GMT | 1 |
|
||
|
|
1.0.2-build51 | 162.08 KB | Sat, 02 Aug 2014 20:23:01 GMT | 1 |
|
||
|
|
1.0.2-build50 | 154.63 KB | Fri, 01 Aug 2014 10:50:56 GMT | 1 |
|
||
|
|
1.0.1 | 162.01 KB | Fri, 01 Aug 2014 10:21:53 GMT | 2 |
|
||
|
|
1.0.1-build47 | 162.04 KB | Fri, 01 Aug 2014 09:55:38 GMT | 1 |
|
||
|
|
1.0.1-build46 | 162.05 KB | Fri, 01 Aug 2014 09:46:46 GMT | 1 |
|
||
|
|
1.0.1-build45 | 162.13 KB | Fri, 01 Aug 2014 08:30:12 GMT | 1 |
|
||
|
|
1.0.1-build44 | 162.06 KB | Thu, 31 Jul 2014 18:01:02 GMT | 1 |
|
||
|
|
1.0.1-build43 | 162 KB | Thu, 31 Jul 2014 17:07:15 GMT | 1 |
|
||
|
|
1.0.1-build42 | 154.63 KB | Thu, 31 Jul 2014 16:45:30 GMT | 1 |
|
||
|
|
1.0.1-build41 | 162 KB | Thu, 31 Jul 2014 15:53:10 GMT | 2 |
|
||
|
|
1.0.1-build40 | 161.96 KB | Thu, 31 Jul 2014 15:03:35 GMT | 2 |
|
||
|
|
1.0.1-build39 | 161.44 KB | Wed, 30 Jul 2014 08:38:34 GMT | 1 |
|
||
|
|
1.0.1-build38 | 161.1 KB | Wed, 30 Jul 2014 07:42:28 GMT | 1 |
|
||
|
|
1.0.1-build37 | 160.77 KB | Tue, 29 Jul 2014 16:45:27 GMT | 1 |
|
||
|
|
1.0.0-build35 | 160.77 KB | Tue, 29 Jul 2014 16:10:21 GMT | 1 |
|
||
|
|
1.0.0-alpha | 160.76 KB | Tue, 29 Jul 2014 16:27:51 GMT | 2 |
|