Skip to content

Commit

Permalink
Merge pull request kaltura#6542 from kaltura/revert-6473-Mercury-13.9…
Browse files Browse the repository at this point in the history
….0-PLAT8354

Revert of PLAT-8354: caption for  SUP-13040 - HOTFIX
  • Loading branch information
david-winder-kaltura authored Dec 18, 2017
2 parents 99b615d + c6ccf4f commit 4cd050f
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -645,15 +645,13 @@ protected function addCaptionSequences($entryIds, $captionFiles, $captionLangaug
$captionLangaugesArr = explode(',', $captionLangauges);
foreach ($captionLangaugesArr as $captionLang)
{
$labelEntryId = null;
$hasCaptions = false;
$captionClips = array();
foreach ($entryIds as $entryId)
{
if (isset($captionFiles[$entryId][$captionLang]))
{
$hasCaptions = true;
$labelEntryId = $entryId;
$captionClips[] = array('type' => 'source', 'path' => $captionFiles[$entryId][$captionLang][myPlaylistUtils::CAPTION_FILES_PATH]);
}
else
Expand All @@ -667,11 +665,9 @@ protected function addCaptionSequences($entryIds, $captionFiles, $captionLangaug
if (isset(CaptionPlugin::$captionsFormatMap[$langString]))
$langString = CaptionPlugin::$captionsFormatMap[$langString];
$currSequence = array('clips' => $captionClips, 'language' => $langString);
if (isset($captionFiles[$labelEntryId][$captionLang][myPlaylistUtils::CAPTION_FILES_LABEL]))
{
$currSequence['label'] = $captionFiles[$labelEntryId][$captionLang][myPlaylistUtils::CAPTION_FILES_LABEL];
$currSequence['id'] = $this->getServeUrlForFlavor($captionFiles[$labelEntryId][$captionLang][myPlaylistUtils::CAPTION_FILES_ID], $mainEntry->getId());
}
if (!is_null($captionFiles[$entryId][$captionLang][myPlaylistUtils::CAPTION_FILES_LABEL]))
$currSequence['label'] = $captionFiles[$entryId][$captionLang][myPlaylistUtils::CAPTION_FILES_LABEL];
$currSequence['id'] = $this->getServeUrlForFlavor($captionFiles[$entryId][$captionLang][myPlaylistUtils::CAPTION_FILES_ID], $mainEntry->getId());
$sequences[] = $currSequence;
}
}
Expand Down

0 comments on commit 4cd050f

Please sign in to comment.