• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/view/video.php
  • Класс: BitrixDiskViewVideo
  • Вызов: Video::__construct
public function __construct($name, $fileId, $viewId = null, $previewId = null, $isTransformationEnabledInStorage = true)
{
	parent::__construct($name, $fileId, $viewId, $previewId, $isTransformationEnabledInStorage);
	$preview = $this->getPreviewData();
	if(!empty($preview) && !empty($preview['WIDTH']) && !empty($preview['HEIGHT']))
	{
		$sizes = $this->calculateSizes($preview,
			array('WIDTH' => $this->getJsViewerWidth(), 'HEIGHT' => $this->getJsViewerHeight()),
			array('WIDTH' => self::PLAYER_MIN_WIDTH, 'HEIGHT' => self::PLAYER_MIN_HEIGHT)
		);
		$this->jsViewerHeight = $sizes['HEIGHT'];
		$this->jsViewerWidth = $sizes['WIDTH'];
	}
}