From 591601f81fb5f4477cc659b41dfbb95e163201d1 Mon Sep 17 00:00:00 2001 From: John Sedlak Date: Thu, 8 Jul 2021 15:32:41 -0400 Subject: [PATCH] Fixes embed functionality for brightcove media items in experience editor Forces custom markup generator to pass Item ID through to command handler (EmbedMedia). Further work may be done here to reduce/remove dependency on HTML Agility Pack. Signed-off-by: John Sedlak --- .../MediaGenerateMarkup/GenerateMarkup.cs | 7 ++++++ .../Commands/EmbedMedia.cs | 24 +++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/Brightcove.MediaFramework.Brightcove/Pipelines/MediaGenerateMarkup/GenerateMarkup.cs b/src/Brightcove.MediaFramework.Brightcove/Pipelines/MediaGenerateMarkup/GenerateMarkup.cs index 514bb606..bd4b75ca 100644 --- a/src/Brightcove.MediaFramework.Brightcove/Pipelines/MediaGenerateMarkup/GenerateMarkup.cs +++ b/src/Brightcove.MediaFramework.Brightcove/Pipelines/MediaGenerateMarkup/GenerateMarkup.cs @@ -78,6 +78,12 @@ public virtual string GenerateBrightcoveUrl(MediaGenerateMarkupArgs args, bool i { var resource = isJs ? "index.min.js" : $"index.html?videoId={args.MediaItem[BrightcovePlayerParameters.MediaId]}"; var url = new UrlString($"//players.brightcove.net/{args.AccountItem[BrightcovePlayerParameters.PublisherId]}/{args.PlayerItem[BrightcovePlayerParameters.PlayerId]}_default/{resource}"); + + foreach (string arg in args.Properties.Collection) + { + url[arg] = args.Properties.Collection[arg]; + } + return url.ToString(); } @@ -112,6 +118,7 @@ protected virtual string GenerateJavascriptEmbed(MediaGenerateMarkupArgs args)