aggiunto metodo di render per i video locali

This commit is contained in:
Lorenzo Giacomelli
2017-02-16 17:03:28 +01:00
parent 859bb696f4
commit d3490cbe2b
2 changed files with 25 additions and 1 deletions
@@ -8,11 +8,23 @@ class MediaLocalVideo extends MediaRenderer{
}
public function asText(array $opt = array()){
return $this->id;
$size = MediaRendererInterface::SIZE_ORIGINAL;
if(array_key_exists("size", $opt) && array_key_exists($opt["size"], self::$SIZES)){
$size = $opt["size"];
}
return '<video width="'.$size["width"].'" height="'.$size["height"].'" controls >'.
'<source src="'.$this->getPath().'" type="video/'.$this->extension.'" >'.
'</video>';
}
public function render(array $opt = array()){
echo $this->asText($opt);
}
public function getPath(){
$basepath = GlobalVariables::get("config")->paths->media;
return $basepath."/".$this->id.".".$this->extension;
}
}
?>
+12
View File
@@ -6,6 +6,7 @@ font-weight: normal;
src: local('Bebas Neue'), url('BebasNeue.woff') format('woff');
}
a{text-decoration:none;}
body{font-family:lato, arial;}
@@ -609,4 +610,15 @@ Password Recovery
color:white;
text-decoration:none;
cursor:pointer;
}
/**
DISABILITAZIONE TASTO DOWNLOAD DAL PLAYER VIDEO
*/
video::-internal-media-controls-download-button {
display:none;
}
video::-webkit-media-controls-enclosure {
overflow:hidden;
}