Skip to content

Commit

Permalink
V10.1 (#11)
Browse files Browse the repository at this point in the history
* Add a custom computed index field for the video labels field to support full text search

* Content updates

* Mock a response for the GetLabels method until support for labels is actually enabled

* Add a pull pipeline for labels

* Content Updates

* Update the video pull/push pipelines to support labels

* Content updates

* Add pipeline processor for resolving labels

* Add support for updating labels (renaming) labels

* Add support for deleting labels and some bug fixes/tweaks

* Content changes

* Enable full text search for the new brightcove folder field

* Content updates

* Create pull pipeline for folders

* Content updates

* Create push pipeline for folders

* Content updates

* Add support for syncing the folder field on video items

* Content updates

* Add a computed index field for the video folder field

* Content updates

* Content updates

* Add 10.1.3 package manifest to solution

* Update experience rendering to use a Url rendering parameter instead of reading from the context item

* Configure the experience rendering to support the sitecore experience editor

* Move experience rendering into sitecore_modules and remove views folder

* Add null check to folder computed field to prevent unnecessary logging

* Add 10.1.3.1 package to solution

Co-authored-by: Cody Rodgers <[email protected]>
  • Loading branch information
codrod and rdacrodgers authored Nov 15, 2022
1 parent a857765 commit 146598a
Show file tree
Hide file tree
Showing 30 changed files with 1,393 additions and 95 deletions.
10 changes: 9 additions & 1 deletion Brightcove.Sitecore.Connector.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{6398
Scripts\migration-cleanup.ps1 = Scripts\migration-cleanup.ps1
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Installation", "Installation", "{AC767D45-025B-4B75-B124-FDE3BA6E9B18}"
ProjectSection(SolutionItems) = preProject
Installation\brightcove.video.connect.10.1.0.1.xml = Installation\brightcove.video.connect.10.1.0.1.xml
Installation\brightcove.video.connect.10.1.2.0.xml = Installation\brightcove.video.connect.10.1.2.0.xml
Installation\brightcove.video.connect.10.1.3.0.xml = Installation\brightcove.video.connect.10.1.3.0.xml
Installation\brightcove.video.connect.10.1.3.1.xml = Installation\brightcove.video.connect.10.1.3.1.xml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -53,7 +61,7 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9E646E94-C8E4-4C67-8244-EB7810F19469}
EnterpriseLibraryConfigurationToolBinariesPathV6 = packages\EnterpriseLibrary.Common.6.0.1304.0\lib\NET45;packages\EnterpriseLibrary.TransientFaultHandling.6.0.1304.0\lib\portable-net45+win+wp8;packages\EnterpriseLibrary.TransientFaultHandling.Caching.6.0.1304.0\lib\NET45;packages\EnterpriseLibrary.TransientFaultHandling.Data.6.0.1304.1\lib\NET45;packages\EnterpriseLibrary.TransientFaultHandling.ServiceBus.6.0.1304.0\lib\NET45;packages\EnterpriseLibrary.TransientFaultHandling.WindowsAzure.Storage.6.0.1304.0\lib\NET45;packages\EnterpriseLibrary.TransientFaultHandling.Configuration.6.0.1304.0\lib\NET45
SolutionGuid = {9E646E94-C8E4-4C67-8244-EB7810F19469}
EndGlobalSection
EndGlobal
6 changes: 3 additions & 3 deletions Brightcove.Web/Brightcove.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -780,8 +780,7 @@
<Content Include="sitecore\shell\Themes\Standard\Brightcove\24x24\logo.png" />
<Content Include="sitecore\shell\Themes\Standard\Brightcove\32x32\logo.png" />
<Content Include="sitecore\shell\Themes\Standard\Brightcove\48x48\logo.png" />
<Content Include="Views\BrightCove\ExperienceRendering.cshtml" />
<Content Include="Views\BrightCove\BasicLayout.cshtml" />
<Content Include="sitecore modules\Web\Brightcove\Views\ExperienceRendering.cshtml" />
<Content Include="App_Config\Include\Unicorn\Unicorn.AutoPublish.config" />
<Content Include="App_Config\Include\Unicorn\Unicorn.config" />
<Content Include="App_Config\Include\Unicorn\Unicorn.DataProvider.10.1.config" />
Expand Down Expand Up @@ -817,6 +816,7 @@
<Compile Include="Commands\MediaPreview.cs" />
<Compile Include="Commands\OpenUploader.cs" />
<Compile Include="Commands\TextTracks.cs" />
<Compile Include="Controllers\ExperienceController.cs" />
<Compile Include="Controllers\UploadController.cs" />
<Compile Include="misc\EmbedMediaController.cs" />
<Compile Include="misc\EmbedMediaPlayer.ascx.cs">
Expand All @@ -837,6 +837,7 @@
<Compile Include="misc\OtherFieldIDs.cs" />
<Compile Include="misc\PlaybackEvents.cs" />
<Compile Include="misc\Settings.cs" />
<Compile Include="Models\ExperienceModel.cs" />
<Compile Include="Models\WebApiResponse.cs" />
<Compile Include="Pipelines\RegisterRoutes.cs" />
<Compile Include="Pipelines\WebApiInitializer.cs" />
Expand Down Expand Up @@ -911,7 +912,6 @@
<Content Include="sitecore modules\Web\Brightcove\js\bootstrap.esm.min.js.map" />
<Content Include="sitecore modules\Web\Brightcove\js\bootstrap.js.map" />
<Content Include="sitecore modules\Web\Brightcove\js\bootstrap.min.js.map" />
<Content Include="Views\web.config" />
<Content Include="sitecore\shell\client\Applications\ExperienceAnalytics\Common\Layouts\Renderings\Brightcove\ExperienceAnalyticsListControl.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
Expand Down
35 changes: 35 additions & 0 deletions Brightcove.Web/Controllers/ExperienceController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Brightcove.Core.Models;
using Brightcove.Core.Services;
using Brightcove.MediaFramework.Brightcove;
using Brightcove.Web.Models;
using Newtonsoft.Json;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Mvc.Controllers;
using Sitecore.Mvc.Names;
using Sitecore.Sites;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Sitecore.Diagnostics;

namespace Brightcove.Web.Controllers
{
public class ExperienceController : SitecoreController
{
public ActionResult Render()
{
var renderingContext = Sitecore.Mvc.Presentation.RenderingContext.CurrentOrNull;
ExperienceModel model = new ExperienceModel();

if (renderingContext != null)
{
model.Url = renderingContext.Rendering.Parameters["Url"];
}

return PartialView("/sitecore modules/Web/Brightcove/Views/ExperienceRendering.cshtml", model);
}
}
}
12 changes: 12 additions & 0 deletions Brightcove.Web/Models/ExperienceModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Brightcove.Web.Models
{
public class ExperienceModel
{
public string Url = "";
}
}
6 changes: 5 additions & 1 deletion Brightcove.Web/Search/ComputedFields/FolderComputedField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ public object ComputeFieldValue(IIndexable indexable)
{
Item video = (Item)(indexable as SitecoreIndexableItem);
ReferenceField folder = video.Fields["BrightcoveFolder"];
return folder.TargetItem["Name"];

if(folder != null && folder.TargetItem != null)
{
return folder.TargetItem["Name"];
}
}
catch(Exception ex)
{
Expand Down
18 changes: 0 additions & 18 deletions Brightcove.Web/Views/BrightCove/BasicLayout.cshtml

This file was deleted.

4 changes: 0 additions & 4 deletions Brightcove.Web/Views/BrightCove/ExperienceRendering.cshtml

This file was deleted.

56 changes: 0 additions & 56 deletions Brightcove.Web/Views/web.config

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@using Brightcove.Web.Models
@using Sitecore
@model ExperienceModel

@if (Sitecore.Context.PageMode.IsExperienceEditor)
{
if (!string.IsNullOrWhiteSpace(Model.Url))
{
<div style="padding: 1em">
<iframe style="display:block;border:none;margin-left:auto;margin-right:auto;" src="@Model.Url" allow="autoplay; fullscreen; geolocation; encrypted-media" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
</div>
}
else
{
<div style="margin: 1em; padding: 1em; background-color: lightgrey">No URL set has been set for this experience. Configure the rendering using the "More->Edit component properties" option.</div>
}
}
else if (!string.IsNullOrWhiteSpace(Model.Url))
{
<iframe style="display:block;border:none;margin-left:auto;margin-right:auto;" src="@Model.Url" allow="autoplay; fullscreen; geolocation; encrypted-media" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
}
Loading

0 comments on commit 146598a

Please sign in to comment.