diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Services/Rendering/CloudVideoFilter.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Services/Rendering/CloudVideoFilter.cs index 0e04e008e..56d475d85 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Services/Rendering/CloudVideoFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Services/Rendering/CloudVideoFilter.cs @@ -8,6 +8,7 @@ using HtmlAgilityPack; using Orchard.Azure.MediaServices.Models; using Orchard.ContentManagement; using Orchard.DisplayManagement; +using Orchard.MediaLibrary.Models; using Orchard.Services; namespace Orchard.Azure.MediaServices.Services.Rendering { @@ -73,7 +74,9 @@ namespace Orchard.Azure.MediaServices.Services.Rendering { var autoPlay = GetBoolean(node, "data-player-auto-play"); var playerShape = _shapeFactory.Create("CloudVideoPlayer", Arguments.From(new { - CloudVideoPart = part, + ContentPart = part, + ContentItem = part.ContentItem, + AlternateText = part.As().AlternateText, AssetId = default(int?), IgnoreIncludeInPlayer = false, AllowPrivateUrls = false, diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Shapes/CloudVideoPlayerShape.cs b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Shapes/CloudVideoPlayerShape.cs index ecec815ed..b4db4c4d7 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Shapes/CloudVideoPlayerShape.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Shapes/CloudVideoPlayerShape.cs @@ -9,7 +9,7 @@ namespace Orchard.Azure.MediaServices.Shapes { public void Discover(ShapeTableBuilder builder) { builder.Describe("CloudVideoPlayer").OnDisplaying(context => { var shape = context.Shape; - CloudVideoPart cloudVideoPart = shape.CloudVideoPart; // The cloud video item to render a player for. + CloudVideoPart cloudVideoPart = shape.ContentPart; // The cloud video item to render a player for. int? assetId = shape.AssetId; // Set to limit the player to only one particular asset. bool ignoreIncludeInPlayer = shape.IgnoreIncludeInPlayer; // True to ignore the IncludeInPlayer property of assets. bool allowPrivateUrls = shape.AllowPrivateUrls; // True to allow private locator URLs to be used, otherwise false. diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/CloudVideoPlayer.cshtml b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/CloudVideoPlayer.cshtml index e0a0febc4..286bc44d0 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/CloudVideoPlayer.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/CloudVideoPlayer.cshtml @@ -21,8 +21,7 @@ Script.Include("cloudmedia-videoplayer-injectors-alt.js").AtFoot(); Script.Include("cloudmedia-videoplayer-main.js").AtFoot(); - CloudVideoPart cloudVideoPart = Model.CloudVideoPart; - var altText = cloudVideoPart.As().AlternateText; + var altText = Model.AlternateText; var assetData = Model.AssetData; var assetDataJson = JsonConvert.SerializeObject(assetData, Formatting.None); var renderId = Guid.NewGuid().ToString().Replace("-", ""); diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/Assets/Video.Preview.cshtml b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/Assets/Video.Preview.cshtml index 12fdb6245..78fbb1ee7 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/Assets/Video.Preview.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/Assets/Video.Preview.cshtml @@ -1,8 +1,12 @@ @model Orchard.Azure.MediaServices.Models.Assets.VideoAsset +@using Orchard.ContentManagement; +
@Display.CloudVideoPlayer( - CloudVideoPart: Model.VideoPart, + ContentPart: Model.VideoPart, + ContentItem: Model.VideoPart.ContentItem, + AlternateText: Model.VideoPart.As().AlternateText, AssetId: Model.Record.Id, IgnoreIncludeInPlayer: true, AllowPrivateUrls: true, diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/Parts/CloudVideo.cshtml b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/Parts/CloudVideo.cshtml index c256be62b..5de90934b 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/Parts/CloudVideo.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/EditorTemplates/Parts/CloudVideo.cshtml @@ -1,6 +1,7 @@ @using Orchard.Azure.MediaServices.Helpers @using Orchard.Azure.MediaServices.Models.Assets @using Orchard.Azure.MediaServices.ViewModels.Media +@using Orchard.ContentManagement @model CloudVideoPartViewModel @{ var isCreatingItem = Model.Id == 0; @@ -43,7 +44,9 @@
@Display.CloudVideoPlayer( - CloudVideoPart: Model.Part, + ContentPart: Model.Part, + ContentItem: Model.Part.ContentItem, + AlternateText: Model.Part.As().AlternateText, AssetId: null, IgnoreIncludeInPlayer: false, AllowPrivateUrls: true, diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/Parts/CloudVideo.Summary.cshtml b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/Parts/CloudVideo.Summary.cshtml index d2afe987f..8a928890a 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/Parts/CloudVideo.Summary.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/Parts/CloudVideo.Summary.cshtml @@ -1,6 +1,10 @@ -@* TODO: Perhaps only a thumbnail image and some metadata should be rendered in summary view? *@ +@using Orchard.ContentManagement; + +@* TODO: Perhaps only a thumbnail image and some metadata should be rendered in summary view? *@ @Display.CloudVideoPlayer( - CloudVideoPart: Model.ContentPart, + ContentPart: Model.ContentPart, + ContentItem: Model.ContentPart.ContentItem, + AlternateText: Model.ContentPart.As().AlternateText, AssetId: null, IgnoreIncludeInPlayer: false, AllowPrivateUrls: false, diff --git a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/Parts/CloudVideo.cshtml b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/Parts/CloudVideo.cshtml index 6c5a0ab51..86118bba6 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/Parts/CloudVideo.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Azure.MediaServices/Views/Parts/CloudVideo.cshtml @@ -1,5 +1,9 @@ -@Display.CloudVideoPlayer( - CloudVideoPart: Model.ContentPart, +@using Orchard.ContentManagement; + +@Display.CloudVideoPlayer( + ContentPart: Model.ContentPart, + ContentItem: Model.ContentPart.ContentItem, + AlternateText: Model.ContentPart.As().AlternateText, AssetId: null, IgnoreIncludeInPlayer: false, AllowPrivateUrls: false,