use Fluidbook\Tools\Compiler\CompilerInterface;
use Illuminate\Support\Facades\Cache;
-class VideoLink extends Link {
+class VideoLink extends Link
+{
public $defaultZIndex = 50;
public $backgroundColor = '#000000';
+ public $repeat = -1;
- public static function addVideoJS($compiler) {
+ public static function addVideoJS($compiler)
+ {
$compiler->addVideoJs();
}
- public function getClasses() {
+ public function getClasses()
+ {
return array_merge(['videoLink'], parent::getClasses());
}
- public function getCSS() {
+ public function getCSS()
+ {
$res = parent::getCSS();
$res .= 'background-color:' . $this->backgroundColor . ';';
return $res;
}
- public function getHTMLContent() {
+ public function getHTMLContent()
+ {
if (!Url::isDistant($this->to)) {
$this->copyExternalFile($this->to, true);
return self::makeVideoTag($this, $w, $h, $this->compiler);
}
- public static function makeVideoTag($linkDatas, $w = null, $h = null, $compiler = null) {
+ public static function makeVideoTag($linkDatas, $w = null, $h = null, $compiler = null)
+ {
static::addVideoJS($compiler);
$attributes = static::getVideoAttributes($linkDatas, $w, $h, $compiler);
* @param $compiler CompilerInterface
* @return array
*/
- public static function getVideoAttributes($data, $w = null, $h = null, $compiler = null) {
+ public static function getVideoAttributes($data, $w = null, $h = null, $compiler = null)
+ {
$attr['name'] = VideoPopupLink::getBasename($data->to);
$attr['stats-name'] = $attr['name'];
$attr['stats-type'] = 'video';
$attr['hidelinksonplay'] = $data->hidelinksonplay;
$attr['link-id'] = $data->uid;
$attr['backgroundcolor'] = $data->backgroundColor ?? '#000000';
+ $attr['repeat'] = $data->repeat??-1;
if (!is_null($w) && !is_null($h)) {
$attr['width'] = $w;