I am using DWT and trying to stream the videos using JW player TBB. The code to detect the video component from the rich text box is as follows. Mind this code is generic for the video with-in multimedia files and RTF.
private string InjectVideo(string outputToConvert)
{
string convertedOutput = outputToConvert;
string[] outputContainer = new string[] { outputToConvert };
//look for anchor tags with 'tridion:href'
string regEx = @"(<a.+?tridion:href[^>]+?(?<x>>).*?\k<x>)";
Regex TridionHrefExpression = new Regex(regEx, RegexOptions.Multiline | RegexOptions.Compiled);
foreach (Match matchingElement in TemplateUtilities.GetRegexMatches(outputContainer, TridionHrefExpression))
{
string tridionComponentLink = matchingElement.Groups[0].Value; //gets <a tridion:href="/url">link text</a>
//Component c = this.GetComponent();
Component c = ExtractComponentFromAnchorTag(tridionComponentLink);
//only do stuff for video components
if (IsVideoLink(c))
{
//Found a video link.
//Replace it with Video Div from the parameters schema
string videoDiv = SetupVideoDiv(c);
var regex = new Regex(Regex.Escape(tridionComponentLink));
convertedOutput = regex.Replace(convertedOutput, videoDiv, 1);
// convertedOutput = convertedOutput.Replace(tridionComponentLink, videoDiv);
}
}
}
This code was working fine earlier, per my colleagues. But now the rich text box source has changed somehow.
Though I can change the logic from my TBB to read the new source. But I need to know how the RTF source got changed and revert it back to earlier behavior.