Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plat 24912:Add support in V2 to V7 redirect #12849

Open
wants to merge 127 commits into
base: Tucana-20.18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
1ba5350
PLAT-24912: v2 to v7
MosheMaorKaltura Jul 21, 2024
6141087
PLAT-24912: add support in redirection player v2 to v7
MosheMaorKaltura Aug 8, 2024
106a9f3
PLAT-24912: add support in v2 to v7
MosheMaorKaltura Aug 8, 2024
231426a
PLAT-24912: code review remarks
MosheMaorKaltura Aug 8, 2024
93f13ad
PLAT-24912: support redirect v2 to v7
MosheMaorKaltura Aug 8, 2024
fa1f089
PLAT-24912: v2 to v7
MosheMaorKaltura Aug 8, 2024
7564a5b
PLAT-24912: v2 to v7
MosheMaorKaltura Aug 8, 2024
ccc7228
PLAT-24912: v2 to v7
MosheMaorKaltura Aug 8, 2024
9996a86
PLAT-24912: Add support in caching of v2tov7 facade
MosheMaorKaltura Aug 11, 2024
9cd4d19
PLAT-24912: Code review remarks
MosheMaorKaltura Aug 12, 2024
937fae0
Code review remarks
MosheMaorKaltura Aug 12, 2024
45a92c5
PLAT-24912: support v2 to v7
MosheMaorKaltura Aug 12, 2024
0a98ae3
1. Map entryId filter to contextId for queries over cnc datasource 2.…
Aug 13, 2024
0b1ca2e
REACH2-1235: Display all reach tasks in Reach Requests tab
drorsou Aug 13, 2024
4d1a6d5
PLAT-24912: add config tp the bundle
MosheMaorKaltura Aug 14, 2024
898c528
REACH2-1236: Require source language captions via API
drorsou Aug 19, 2024
ae2f00e
PLAT-24912: Add support in flash vars translations
MosheMaorKaltura Aug 19, 2024
633d309
PLAT-24912: code review remarks
MosheMaorKaltura Aug 19, 2024
9852f8f
PLAT-24912: code review
MosheMaorKaltura Aug 19, 2024
b09fb6a
REACH2-1267: Add search Catalog Items by id
drorsou Aug 20, 2024
b6fe8aa
REACH2-1266: Allow renaming Catalog Items from Admin Console
drorsou Aug 20, 2024
4c8a141
Updated version - Tucana-20.18.0
inbal-ben-david Aug 12, 2024
2311910
SUP-43860: Purify multilingual fields
drorsou Aug 11, 2024
ca9d5fb
SUP-43860: Remove print
drorsou Aug 11, 2024
cbe60d5
PLAT-24840 burn subs (ongoing)
salma2222 Jul 18, 2024
ee90983
PLAT-24840 burn subs (ongoing)
salma2222 Jul 18, 2024
9e47b43
multi clip burn captions
salma2222 Aug 4, 2024
d4f445c
multi clip burn captions
salma2222 Aug 4, 2024
90a5ed5
multi clip burn captions
salma2222 Aug 4, 2024
fe816fc
multi clip burn captions
salma2222 Aug 4, 2024
113c90f
multi clip refactor
salma2222 Aug 6, 2024
85a162e
multi clip refactor
salma2222 Aug 6, 2024
e390270
caption attributes
salma2222 Aug 6, 2024
828e634
multi clip refactor
salma2222 Aug 6, 2024
cf2b074
remove font style , should be font name
salma2222 Aug 6, 2024
9701834
edge case fix and crop optimization
salma2222 Aug 6, 2024
10b8ed0
multi clip comments
salma2222 Aug 10, 2024
ea8a811
sync subtitles
salma2222 Aug 11, 2024
9f531f3
multi clip refactor
salma2222 Aug 11, 2024
0e2dd0c
indent
salma2222 Aug 11, 2024
2f71403
expose setting crop data
salma2222 Aug 13, 2024
8c3e554
remove log lines
salma2222 Aug 13, 2024
8e3ba57
check fields subtitlesData
salma2222 Aug 13, 2024
c8163d3
Update chunk timeout logic
anatolkaltura Aug 13, 2024
57ae9c3
PLAT-24923: Add fields to exported catalog items CSV
drorsou Aug 13, 2024
dece8da
ONPREM-911 block running scripts in parallel (#12835)
GElkayam Aug 14, 2024
57a8226
CR-19: Clips vendor task
rkreich Aug 6, 2024
921e06d
VCP-15234: delete local thumb tmp file of resizeEntryImage dies for w…
amiras89 Nov 7, 2023
877573a
PLAT-24912:integration issues
MosheMaorKaltura Aug 20, 2024
7e6093b
Merge remote-tracking branch 'origin/Tucana-20.18.0' into Tucana-20.1…
MosheMaorKaltura Aug 21, 2024
664e877
SUP-43987: fix the retry when uploading via s3 multipart upload
amiras89 Aug 22, 2024
d9c6ae8
SUP-44075: extract kuser id without init
coralburg12 Aug 25, 2024
9bc7125
Merge pull request #12854 from kaltura/master-merge-Tucana-20.18.0
inbal-ben-david Aug 28, 2024
aaff267
Updated version - Tucana-20.19.0
inbal-ben-david Aug 28, 2024
fc70507
Merge pull request #12855 from kaltura/Tucana-20.19.0-update-version
inbal-ben-david Aug 28, 2024
0afe31d
fix copyts flag
salma2222 Aug 28, 2024
98a1e53
fix copyts flag
salma2222 Aug 28, 2024
8fc005e
Merge pull request #12856 from kaltura/Tucana-20.19.0-PLAT-24840-1
salma2222 Aug 28, 2024
e0722aa
VCP-18589: add 'updated_at' index to schemas
amiras89 Aug 28, 2024
e532074
FOUN-1911: Avoid fatal error when hosts in sphinx lag ky do not match…
yossipapi Aug 28, 2024
345cf6f
VCP-18577: when importing files, if no 'filesize' from headers defaul…
amiras89 Aug 28, 2024
7125ad6
Merge pull request #12859 from kaltura/Tucana-20.19.0-FOUN-1911
yossipapi Aug 28, 2024
d1df7b5
PLAT-24912: Move v2Redirect to be a plugin
MosheMaorKaltura Aug 28, 2024
ecb9813
PLAT-24912: redirect v2 to v7
MosheMaorKaltura Aug 28, 2024
7da53ac
Merge pull request #12847 from kaltura/Tucana-20.18.0-REACH2-1266
drorsou Aug 29, 2024
c016c3c
KME-2084: add templateRoomEntryId to RoomEntry
Amirhalfon1 Aug 29, 2024
320a53b
Pass default values for optional params before passing file to delete
yossipapi Aug 30, 2024
5cd239d
Merge pull request #12862 from kaltura/yossipapi-patch-7
yossipapi Aug 30, 2024
b20566d
CR changes - fix indent, handle receive of "0" and ""
Amirhalfon1 Sep 2, 2024
7e6270e
SUP-43308: Enable recycle bin will force enable scheduled task permis…
coralburg12 Sep 2, 2024
8363fa9
Merge pull request #12846 from kaltura/Tucana-20.18.0-REACH2-1267
drorsou Sep 2, 2024
0d45b6c
SUP-43308: Enable recycle bin will force enable scheduled task permis…
coralburg12 Sep 2, 2024
1a1e045
move logic to same if condition
amiras89 Sep 2, 2024
0f074f0
REACH2-1236: Moved code to kReachUtils
drorsou Sep 2, 2024
e9e85b3
Merge pull request #12861 from kaltura/Tucana-20.19.0-KME-2084
Amirhalfon1 Sep 2, 2024
f4b0f36
CR-19: Added eventSessionContextId to clips vendor task
rkreich Aug 19, 2024
60b74b3
SUP-43308: Enable recycle bin will force enable scheduled task permis…
coralburg12 Sep 2, 2024
5a0fb6e
Merge pull request #12850 from kaltura/Tucana-20.18.0-SUP-43987
amiras89 Sep 2, 2024
71ed3e0
Merge pull request #12858 from kaltura/Tucana-20.19.0-VCP-18589
amiras89 Sep 3, 2024
92ef0b7
REACH2-1235: Improved datepicker functionality
drorsou Sep 3, 2024
6d65a70
REACH2-1236: Renamed utility function
drorsou Sep 3, 2024
f15055c
add media repurposing metadata profile for enabling media repurposing…
salma2222 Sep 3, 2024
7f2f12c
Merge pull request #12860 from kaltura/Tucana-20.19.0-VCP-18577
amiras89 Sep 3, 2024
a6c457e
Merge pull request #12869 from kaltura/Tucana-20.19.0-PLAT-24928
salma2222 Sep 3, 2024
5c54398
Merge pull request #12844 from kaltura/Tucana-20.18.0-REACH2-1235
drorsou Sep 3, 2024
e67475a
Merge pull request #12845 from kaltura/Tucana-20.18.0-REACH2-1236
drorsou Sep 3, 2024
e66cff4
PLAT-24930: Add enum value "reels-player" to the ui-confs types
danbar0kal Sep 3, 2024
e6aee33
KME-2117: allow setting of templateRoomEntry from "global" partner
Amirhalfon1 Sep 4, 2024
0535a09
remove spaces
Amirhalfon1 Sep 4, 2024
5b56b26
remove spaces #2
Amirhalfon1 Sep 4, 2024
be6ceed
PLAT-24912: indentation
MosheMaorKaltura Sep 4, 2024
36c2789
REACH2-1284: Add fields to admin console for Partner Catalog Items
drorsou Sep 8, 2024
6ac5fc1
REACH2-1284: Fix whitespace
drorsou Sep 8, 2024
a2afa61
REACH2-1284: Fix tabs
drorsou Sep 8, 2024
398d5ce
PLAT-24937: Add Unisphere endpoint to KMC server config object
danbar0kal Sep 8, 2024
97d0906
PLAT-24930: fix readme
danbar0kal Sep 8, 2024
f4d027a
PLAT-24926: requireSource does not change from bulk CSV
drorsou Sep 8, 2024
6e72686
Merge pull request #12878 from kaltura/master-merge-Tucana-20.19.0
inbal-ben-david Sep 9, 2024
6fe8a38
Updated version - Tucana-20.20.0
inbal-ben-david Sep 9, 2024
5e1d436
Merge pull request #12879 from kaltura/Tucana-20.20.0-update-version
inbal-ben-david Sep 9, 2024
014f75f
Merge pull request #12875 from kaltura/Tucana-20.19.0-PLAT-24937-unis…
danbar0kal Sep 9, 2024
41f9952
Merge pull request #12842 from kaltura/Tucana-20.18.0-AN-23365
olampert Sep 9, 2024
1c9f97c
Merge pull request #12867 from kaltura/Tucana-20.19.0-CR-19-ContextId
rkreich Sep 9, 2024
69a72d3
Merge pull request #12870 from kaltura/Tucana-20.20.0-PLAT-24930-UiCo…
danbar0kal Sep 9, 2024
8950a45
Merge pull request #12873 from kaltura/Tucana-20.19.0-REACH2-1284
drorsou Sep 9, 2024
dd564fc
Merge pull request #12876 from kaltura/Tucana-20.19.0-PLAT-24926
drorsou Sep 9, 2024
905353e
PLAT-24926: Add Reach pricing per hour
drorsou Sep 9, 2024
573e049
Merge pull request #12880 from kaltura/Tucana-20.20.0-PLAT-24929
drorsou Sep 9, 2024
62b010b
PLAT-24940: Enable Content Lab feature
danbar0kal Sep 10, 2024
3aa0c0c
Merge pull request #12872 from kaltura/Tucana-20.19.0-KME-2117
Amirhalfon1 Sep 10, 2024
87d3e60
Merge pull request #12884 from kaltura/Tucana-20.20.0-PLAT-24940-Enab…
danbar0kal Sep 10, 2024
cc7ba7e
Merge pull request #12853 from kaltura/Tucana-20.18.0-SUP-44075
coralburg12 Sep 10, 2024
76cef4a
Merge pull request #12866 from kaltura/Tucana-20.19.0-SUP-43308
coralburg12 Sep 10, 2024
10f993a
SUP-43308: Correct function call name
drorsou Sep 11, 2024
3d43ea0
Merge pull request #12885 from kaltura/Tucana-20.19.0-SUP-43308-TypoFix
drorsou Sep 11, 2024
b1d3e78
PLAT-24937: unisphere uri fix
danbar0kal Sep 11, 2024
b85cd4c
Merge pull request #12886 from kaltura/Tucana-20.20.0-PLAT-24937-1
danbar0kal Sep 11, 2024
ab7ebc4
Merge remote-tracking branch 'origin/Tucana-20.20.0' into Tucana-20.1…
MosheMaorKaltura Sep 11, 2024
5e5d8b8
Update v2RedirectUtils.class.php
MosheMaorKaltura Sep 12, 2024
490fd66
Update v2RedirectUtils.class.php
MosheMaorKaltura Sep 12, 2024
dbe1517
Update embedIframeJsAction.class.php
MosheMaorKaltura Sep 12, 2024
8fd9b40
Update embedPlaykitJsAction.class.php
MosheMaorKaltura Sep 15, 2024
55e51b4
Update embedPlaykitJsAction.class.php
MosheMaorKaltura Sep 15, 2024
5d19c66
Update v2RedirectUtils.class.php
MosheMaorKaltura Sep 16, 2024
b21d86b
Update v2RedirectUtils.class.php
MosheMaorKaltura Sep 16, 2024
b3850e5
Update v2RedirectUtils.class.php
MosheMaorKaltura Sep 16, 2024
27c2322
Update KalturaUiConfV2Redirect.php
MosheMaorKaltura Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Tucana-20.18.0
Tucana-20.20.0
1 change: 1 addition & 0 deletions admin_console/configs/lang/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@
'Kaltura_Client_Enum_UiConfObjType::WEBCASTING' => 'Kaltura Webcasting Studio',
'Kaltura_Client_Enum_UiConfObjType::CLIPPER' => 'KMC Clipper',
'Kaltura_Client_Enum_UiConfObjType::SAP' => 'Slim Audio Player',
'Kaltura_Client_Enum_UiConfObjType::REELS' => 'Reels Player',

//audit trail
'Kaltura_Client_Enum_AuditTrailObjectType::ACCESS_CONTROL' => 'ACCESS_CONTROL',
Expand Down
2 changes: 1 addition & 1 deletion alpha/apps/kaltura/lib/KSecureEntryHelper.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function validateApiAccessControl()
public function validateForPlay($performApiAccessCheck = true)
{
if ($this->entry->getDisplayInSearch() === EntryDisplayInSearchType::RECYCLED &&
!($this->entry->isOwnerActionsAllowed(kCurrentContext::getCurrentKsKuserId()) || $this->isKsAdmin()))
!($this->entry->isOwnerActionsAllowed($this->ks->getKuserId()) || $this->isKsAdmin()))
{
KExternalErrors::dieError(KExternalErrors::RECYCLED_ENTRY_UNAVAILABLE);
}
Expand Down
11 changes: 9 additions & 2 deletions alpha/apps/kaltura/lib/clipconcat/kClipManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,14 @@ protected function setConversionParamsOnResourcesData(&$resourcesData, $conversi
{
$imageToVideo = $resourceData[self::IMAGE_TO_VIDEO];
$mediaInfoObj = $resourceData[self::MEDIA_INFO_OBJECT];
$subtitles = isset($resourceData[self::SUBTITLES_DATA_ARRAY]) && count($resourceData[self::SUBTITLES_DATA_ARRAY]) > 0;
$subtitles = false;
if(isset($resourceData[self::SUBTITLES_DATA_ARRAY]))
{
foreach ($resourceData[self::SUBTITLES_DATA_ARRAY] as $subtitlesArray)
{
$subtitles = $subtitles || count($subtitlesArray) > 0;
}
}

$currentConversionParams = array();
$currentConversionParams[self::TARGET_HEIGHT] = $targetHeight;
Expand Down Expand Up @@ -968,7 +975,7 @@ protected function setConversionParamsOnResourcesData(&$resourcesData, $conversi
if($subtitles)
{
$prevParams = isset($currentConversionParams[self::EXTRA_CONVERSION_PARAMS]) ? $currentConversionParams[self::EXTRA_CONVERSION_PARAMS] : "";
$currentConversionParams[self::EXTRA_CONVERSION_PARAMS] = $prevParams . " -copyts";
$currentConversionParams[self::EXTRA_CONVERSION_PARAMS] = "$prevParams -copyts ";
}

$resourcesData[$key][self::CONVERSION_PARAMS] = json_encode($currentConversionParams, true);
Expand Down
6 changes: 6 additions & 0 deletions alpha/apps/kaltura/lib/db/DbManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ protected static function getSphinxConnIndexByLastUpdatedAt($dataSources)
}

list($hostToLag, $hostToIndex) = self::filterLagsAndHosts($dataSources, $lastUpdatedAtPerSphinx);
if(!count($hostToLag))
{
KalturaLog::debug("failed to map sphinx host to sphinx lag data, no sphinx index will be chosen by updatedAt");
return false;
}

return self::getPreferredSphinxIndexByWeight($hostToLag, $hostToIndex);
}

Expand Down
31 changes: 27 additions & 4 deletions alpha/apps/kaltura/lib/kPermissionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1093,20 +1093,32 @@ public function objectCreated(BaseObject $object)
return true;
}

protected static function handlePermissions($object)
protected static function handlePermissions($permission)
{
switch ($object->getName())
switch ($permission->getName())
{
case PermissionName::FEATURE_RECYCLE_BIN:
self::handleRecycleBinPermission($object);
self::handleRecycleBinPermission($permission);
return;

case PermissionName::GAME_PLUGIN_PERMISSION:
self::handleGamePluginPermission($object);
self::handleGamePluginPermission($permission);
return;

case PermissionName::FEATURE_MEDIA_REPURPOSING_NG_PERMISSION:
self::handleMediaRepurposingNGPermission($permission);
return;
}
}

protected static function handleMediaRepurposingNGPermission($permission)
{
if ($permission->getStatus() == PermissionStatus::ACTIVE)
{
MediaRepurposingHandler::enableMrPermission($permission->getPartnerId());
}
}

protected static function handleGamePluginPermission($permission)
{
$partner = PartnerPeer::retrieveByPK($permission->getPartnerId());
Expand All @@ -1120,12 +1132,23 @@ protected static function handleRecycleBinPermission($permission)
if ($permission->getStatus() == PermissionStatus::ACTIVE)
{
self::enableRecycleBinScheduledTaskProfile($permission->getPartnerId());
self::enableRequiredPluginsPermissions($permission->getPartnerId(), PermissionName::SCHEDULEDTASK_PLUGIN_PERMISSION);
}
elseif ($permission->getStatus() == PermissionStatus::BLOCKED)
{
self::disableRecycleBinScheduledTaskProfile($permission->getPartnerId());
}
}

protected static function enableRequiredPluginsPermissions($partnerId, $permissionName)
{
$requiredPluginPermission = PermissionPeer::getByNameAndPartner($permissionName, array($partnerId));
if ($requiredPluginPermission->getStatus() != PermissionStatus::ACTIVE)
{
$requiredPluginPermission->setStatus(PermissionStatus::ACTIVE);
$requiredPluginPermission->save();
}
}

protected static function enableRecycleBinScheduledTaskProfile($partnerId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private function generateSession($partnerId)
* @return string
* @throws Exception
*/
public static function buildServiceUrl($hostName, $serviceName)
public static function buildServiceUrl($hostName, $serviceName, $isApi = true)
{
$serviceUrl = kConf::get("microservice_url", 'local', null);
if(!$serviceUrl)
Expand All @@ -61,6 +61,10 @@ public static function buildServiceUrl($hostName, $serviceName)
{
$serviceUrl = $serviceUrl . '/' . trim($serviceName, "\/");
}
if(!$isApi)
{
return str_replace('/api', '', $serviceUrl);
}
return $serviceUrl;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* Unisphere Micro Service
*/
class MicroServiceUnisphereLoader extends MicroServiceBaseService
{
public static $host = 'unisphere';
public static $service = '';

public function __construct()
{
$this->hostName = self::$host;
parent::__construct();
}
}
2 changes: 1 addition & 1 deletion alpha/apps/kaltura/lib/myEntryUtils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ public static function resizeEntryImage( entry $entry, $version, $width, $height

if (!$success)
{
$success = self::captureLocalThumb($entry, $capturedThumbPath, $calc_vid_sec, $cache, $cacheLockKey, $cacheLockKeyProcessing, $flavorAssetId, $fileToDelete);
$success = self::captureLocalThumb($entry, $capturedThumbPath, $calc_vid_sec, $cache, $cacheLockKey, $cacheLockKeyProcessing, $flavorAssetId, -1, -1, $fileToDelete);
}
}

Expand Down
23 changes: 23 additions & 0 deletions alpha/apps/kaltura/lib/reports/kKavaEventPlatformReports.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,29 @@ class kKavaEventPlatformReports extends kKavaReportsMgr
self::METRIC_UNIQUE_VOD_VIEW_PERIOD_USERS,
self::METRIC_VOD_UNIQUE_PERCENTILES_RATIO
)
),

ReportType::EP_WEBCAST_ENGAGEMENT_OVER_TIME => array(
self::REPORT_DIMENSION_MAP => array(
'position' => self::DIMENSION_POSITION
),
self::REPORT_FILTER => array(
self::DRUID_TYPE => self::DRUID_NOT,
self::DRUID_FILTER => array(
self::DRUID_DIMENSION => self::DIMENSION_POSITION,
self::DRUID_VALUES => array(self::VALUE_UNKNOWN, "0", "")
)
),
self::REPORT_JOIN_REPORTS => array(
array(
self::REPORT_UNION_DATA_SOURCES => array(self::DATASOURCE_HISTORICAL, self::DATASOURCE_MEETING_HISTORICAL),
self::REPORT_METRICS => array(self::METRIC_UNIQUE_COMBINED_LIVE_VIEW_PERIOD_USERS, self::METRIC_COMBINED_LIVE_ENGAGED_USERS_RATIO)
),
array(
self::REPORT_DATA_SOURCE => self::DATASOURCE_CNC_EVENTS,
self::REPORT_METRICS => array(self::EVENT_TYPE_MESSAGE_LIKED, self::EVENT_TYPE_REACTION_CLICKED, self::EVENT_TYPE_GROUP_MESSAGE_SENT)
)
)
)

);
Expand Down
13 changes: 10 additions & 3 deletions alpha/apps/kaltura/lib/reports/kKavaReportsMgr.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2833,6 +2833,12 @@ protected static function getEntryKuserDimension($data_source)
return in_array($data_source, array(self::DATASOURCE_ENTRY_LIFECYCLE, self::DATASOURCE_STORAGE_USAGE)) ? self::DIMENSION_KUSER_ID : self::DIMENSION_ENTRY_OWNER_ID;
}

protected static function getEntryIdDimension($data_source)
{
return $data_source === self::DATASOURCE_CNC_EVENTS ? self::DIMENSION_CONTEXT_ID : self::DIMENSION_ENTRY_ID;
}


protected static function getDruidFilter($partner_id, $report_def, $input_filter, $object_ids, $response_options)
{
$druid_filter = array();
Expand Down Expand Up @@ -2888,6 +2894,7 @@ protected static function getDruidFilter($partner_id, $report_def, $input_filter
);
}

$entry_id_dimension = self::getEntryIdDimension($data_source);
$field_dim_map = array(
'categoriesIds' => array(self::DRUID_DIMENSION => self::DIMENSION_CATEGORIES),
'countries' => array(self::DRUID_DIMENSION => self::DIMENSION_LOCATION_COUNTRY),
Expand All @@ -2906,8 +2913,8 @@ protected static function getDruidFilter($partner_id, $report_def, $input_filter
'cities' => array(self::DRUID_DIMENSION => self::DIMENSION_LOCATION_CITY),
'media_types' => array(self::DRUID_DIMENSION => self::DIMENSION_MEDIA_TYPE),
'source_types' => array(self::DRUID_DIMENSION => self::DIMENSION_SOURCE_TYPE),
'entries_ids' => array(self::DRUID_DIMENSION => self::DIMENSION_ENTRY_ID),
'entries_ids_not_in' => array(self::DRUID_DIMENSION => self::DIMENSION_ENTRY_ID, self::DRUID_TYPE => self::DRUID_NOT),
'entries_ids' => array(self::DRUID_DIMENSION => $entry_id_dimension),
'entries_ids_not_in' => array(self::DRUID_DIMENSION => $entry_id_dimension, self::DRUID_TYPE => self::DRUID_NOT),
'playback_context_ids' => array(self::DRUID_DIMENSION => self::DIMENSION_PLAYBACK_CONTEXT),
'root_entries_ids' => array(self::DRUID_DIMENSION => self::DIMENSION_ROOT_ENTRY_ID),
'event_var1' => array(self::DRUID_DIMENSION => self::DIMENSION_EVENT_VAR1),
Expand Down Expand Up @@ -3066,7 +3073,7 @@ protected static function getDruidFilter($partner_id, $report_def, $input_filter
if (count($entry_ids_from_db))
{
$druid_filter[] = array(
self::DRUID_DIMENSION => self::DIMENSION_ENTRY_ID,
self::DRUID_DIMENSION => $entry_id_dimension,
self::DRUID_VALUES => array_values(array_unique($entry_ids_from_db))
);
}
Expand Down
106 changes: 106 additions & 0 deletions alpha/apps/kaltura/lib/v2RedirectUtils.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?php

class v2RedirectUtils
{
const V2REDIRECT_PARAM_NAME = 'v2Redirect';
const FLASHVARS_PARAM_NAME = 'flashvars';
const SHOULD_TRANSLATE_PLUGINS = self::V2REDIRECT_PARAM_NAME .'translate';
const SCRIPT_PLUGIN_NAME = 'playkit-player-scripts';
const SCRIPT_PLUGIN_VERSION = '{latest}';

static private function getV7PluginInfo($v2PluginName): array
{
$translation = ["info" => ["playkitscreen", "playkit-js-info"],
"quiz" => ["playkit-ivq", "ivq"],
"moderation" => ["playkit-moderation", "playkit-js-moderation"],
"playlistAPI" => ["playkit-playlist", "playlist"],
"liveStatus" => ["playkit-kaltura-live","kaltura-live"],
"related" => ["playkit-related", "related"],
"dualScreen" => ["playkit-dual-screen", "dualscreen"],
"video360" => ["playkit-vr" ,"vr"],
"raptMedia" => ["rapt", "rapt"],
"transcript" => ["playkit-transcript", "playkit-js-transcript"],
"qna" => ["playkit-qna", "qna"],
"bumper" => [ "playkit-bumper" , "bumper" ],
"infoScreen" => ["playkit-info", "playkit-js-info"]];

if(isset($translation[$v2PluginName]))
{
$v7PluginInfo = $translation[$v2PluginName];
KalturaLog::log("Found " . print_r($v7PluginInfo, true));
return $v7PluginInfo;
}
else
{
throw new Exception ($v2PluginName);
}
}

static function addV2toV7plugins($flashvars, &$bundleConfig, &$playerConfig)
{
if(!$flashvars)
{
return;
}
$unHandledPlugins = array();

//Merge v7 config
foreach ($flashvars as $key => $value)
{
if(self::isVarPlugin($key))
{
//get plugin name
KalturaLog::log("V2 to V7 adding plugin: " . $key. " value:" . $value);
if ($value)
{
if (!$bundleConfig)
{
$bundleConfig = [];
}
$key = trim(trim($key, '"'), "'");
$v2PluginName = explode(".", $key);
try
{
$v7PluginName = self::getV7PluginInfo($v2PluginName[0]);
$bundleConfig = array_merge($bundleConfig, [$v7PluginName[0] => "{latest}"]);
$v7PluginConfig = $v7PluginName[1];
if (!isset($playerConfig->plugins))
{
$playerConfig->plugins = new stdClass();
}
if (!isset($playerConfig->plugins->$v7PluginConfig))
{
$playerConfig->plugins->$v7PluginConfig = new stdClass();
}
}
catch (Exception $e){
$unHandledPlugins[] = $e->getMessage();
}
}
}
}
if(sizeof($unHandledPlugins))
{
throw new Exception ("Unhandled plugins: " . implode(", ", $unHandledPlugins));
}
}

static function addV2toV7config($flashvars, $uiconfId)
{
$config = [];
if($flashvars)
{ foreach ($flashvars as $key => $value)
{
$key = trim(trim($key, '"'), "'");
$config[$key] = json_decode($value);
}
}
$config["uiconf_id"] = $uiconfId;
return $config;
}

private static function isVarPlugin($varKeyName)
{
return str_contains($varKeyName, ".plugin");
}
}
Loading