• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/textparser.php
  • Класс: CTextParser
  • Вызов: CTextParser::convert_video
protected function convert_video($arParams)
{
	global $APPLICATION;

	if (
		!is_array($arParams)
		|| $arParams["PATH"] == ''
	)
	{
		return false;
	}
	$trustedProviders = [
		'YOUTUBE',
		'RUTUBE',
		'VIMEO',
		'VK',
		'FACEBOOK',
		'INSTAGRAM',
	];

	ob_start();

	if ($this->type == 'mail')
	{
		$pathEncoded = htmlspecialcharsbx($arParams['PATH']);

		?>getHost() == Application::getInstance()->getContext()->getServer()->getServerName())
		{
			// Replace http://someurl, https://someurl by //someurl
			$arParams['PATH'] = preg_replace("/https?:\/\//i", '//', $arParams['PATH']);

			$pathEncoded = htmlspecialcharsbx($arParams['PATH']);

			if ($this->bMobile)
			{
				?>bMobile)
		{
			$playerComponent = 'bitrix:mobile.player';
		}

		$APPLICATION->IncludeComponent(
			$playerComponent, '', $playerParams,
			null,
			[
				'HIDE_ICONS' => 'Y',
			]
		);
	}

	return ob_get_clean();
}