2026-02-22 15:02:41 +03:00
|
|
|
<?php
|
|
|
|
|
|
2026-04-05 22:38:36 +03:00
|
|
|
/**
|
|
|
|
|
* StreamingBootstrap — streaming bootstrap
|
|
|
|
|
*
|
|
|
|
|
* @package XC_VM_Streaming
|
|
|
|
|
* @author Divarion_D <https://github.com/Divarion-D>
|
|
|
|
|
* @copyright 2025-2026 Vateron Media
|
|
|
|
|
* @link https://github.com/Vateron-Media/XC_VM
|
|
|
|
|
* @license AGPL-3.0 https://www.gnu.org/licenses/agpl-3.0.html
|
|
|
|
|
*/
|
|
|
|
|
|
2026-02-22 15:02:41 +03:00
|
|
|
class StreamingBootstrap {
|
|
|
|
|
public static function bootstrap($rFilename, $rSettings) {
|
|
|
|
|
$rProbeEndpoints = array('probe', 'player_api');
|
|
|
|
|
$rDefaultEndpoints = array('live', 'thumb', 'subtitle', 'timeshift', 'vod', 'status');
|
|
|
|
|
$rPrivilegedEndpoints = array('rtmp', 'portal');
|
|
|
|
|
|
|
|
|
|
if (!in_array($rFilename, array_merge($rProbeEndpoints, $rDefaultEndpoints, $rPrivilegedEndpoints), true)) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
require_once INCLUDES_PATH . 'libs/AsyncFileOperations.php';
|
|
|
|
|
require_once MAIN_HOME . 'core/Database/DatabaseHandler.php';
|
|
|
|
|
|
2026-03-03 20:00:34 +03:00
|
|
|
$GLOBALS['rSettings'] = $rSettings;
|
|
|
|
|
$GLOBALS['rAccess'] = $rFilename;
|
|
|
|
|
LegacyInitializer::initStreaming();
|
2026-02-22 15:02:41 +03:00
|
|
|
|
2026-03-03 20:00:34 +03:00
|
|
|
global $db;
|
|
|
|
|
return $db;
|
2026-02-22 15:02:41 +03:00
|
|
|
}
|
|
|
|
|
}
|