Limbo.Umbraco.Vimeo is a package for Umbraco 10+ that features a property editor for inserting (via URL or embed code) a Vimeo video. The property editor saves a bit of information about the video, which then will be availble in C#.
The latest version (v2.x
) supports Umbraco 10, 11 and 12, whereas older releases (v1.x
) supports Umbraco 9.
License: | MIT License |
Umbraco: | Umbraco 10, 11 and 12 (and Umbraco 9) |
Target Framework: | .NET 6 (and .NET 5) |
Install the package via NuGet - either via the .NET CLI:
dotnet add package Limbo.Umbraco.Vimeo
or the NuGet package manager:
Install-Package Limbo.Umbraco.Vimeo
The package features a property editor that allows users to insert a single Vimeo video - either from the URL of the video or an embed code. The property editor will pull information about the inserted video from the Vimeo API, exposing this information for you in the property value.
When a valid Vimeo has been inserted on a property, the property exposes an instance of VimeoValue
. Details about the video can be accessed via the Details
property, and embed information can be accessed through the Embed
property:
@using Limbo.Umbraco.Vimeo.Models.Videos
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@{
// Get the media from the media cache
var media = Umbraco.Media(1234);
// Get the property value
var vimeo = media.Value<VimeoValue>("video");
// Render the video title
<h1>@vimeo.Details.Title</h1>
// Render the embed code
@vimeo.Embed
}
{
"Limbo": {
"Vimeo": {
"Credentials": [
{
"Key": "8a7a2756-ddc4-486d-978b-a38f116990c1",
"Name": "MyApp",
"Description": "A description about the credentials.",
"AccessToken": "Your access token here"
}
]
}
}
}
The key should be a randomly generated GUID which will be used as a unique identifier for the credentials.
The name and description are currently not used, but are meant to be shown in the UI to identify the credentials to the user.
An access token must be specified in order to authenticate your Vimeo user when making requests to th Vimeo API.
You can generate a new access token either by creating a new Vimeo app or using one of your existing apps. For the desired app, you can then generate a new personal access token:
An access token may also be obtained through an OAuth 2.0 authentication flow. This is currently not supported directly by this package, but you can see the Skybrud.Social documentation on how to set up an authentication page.