Video

Skip to end of metadata
Go to start of metadata

Configuration

Name
Type
Description
width
integer
Width of the video in pixel
height
integer
Height of the video in pixel
config
string/array
Configuration for the flowplayer
Either as string or as array, use string if you want to refer to a local Javascript var, which contains the configuration. (more see examples)
swfPath
string
Define a different flowplayer path (eg. if you have a commercial license)
scriptPath
string
Define a different flowplayer embed script path.
thumbnail string Name of the video-thumbnail (required when using automatic-transcoding of videos) see: Video Thumbnails (since v 1.4.3)
html5 bool Only works in combination with the thumbnail configuration, if specified pimcore generates HTML5 markup for the video, this can then be used with HTML5-Videoplayers like Mediaelement.js, Projekktor, VideoJS, ... (not included)
When using the HTML5 player don't forget your sever to set the right mime-type. To do this, put the following lines into your .htaccess:

AddType video/mp4 .mp4
AddType video/webm .webm

Accessable Properties

Name
Type
Description
id
string
Asset-ID, YouTube-URL, Vimeo-URL, External-URL, ...
type
string
One of asset, youtube, vimeo, url, ...

Example (default configuration)

<?php // with direct configuration as array ?>
<?php echo $this->video("myVideo", array(
    "width" => 670,
    "height" => 400,
    "config" => array(
        "clip" => array(
            "autoPlay" => false
        )
    )
)); ?>



<?php // with configuration as local javascaript variable ?>
<script type="text/javascript">
    var myVideoConf = {
        clip: {
            autoPlay: false,
            autoBuffering: true
        },
        key: "xxxxxxx",
        canvas: {backgroundColor: "transparent"},
        plugins: {
           controls: {
              durationColor: '#ffffff',
              tooltipTextColor: '#ffffff',
              sliderColor: '#000000',
              tooltipColor: '#5F747C',
              volumeSliderGradient: 'none',
              buttonOverColor: '#00466e',
              backgroundGradient: [0.6,0.3,0,0,0],
              progressGradient: 'none',
              buttonColor: '#00466e',
              timeColor: '#ffffff',
              timeBgColor: '#00466e',
              borderRadius: '0px',
              bufferGradient: 'none',
              backgroundColor: '#a4c1d4',
              volumeSliderColor: '#000000',
              progressColor: '#112233',
              bufferColor: '#00466e',
              sliderGradient: 'none',
              height: 24,
              opacity: 1.0
           }
        }
    };
    
</script>

<?php echo $this->video("myVideo", array(
    "width" => 670,
    "height" => 400,
    "config" => "myVideoConf"
)); ?>

Automatic Video transcoding (using default Flowplayer with iDevice Fallback)

<?php // using thumbnails with automatic video transcoding (requires FFMPEG) ?><?php echo $this->video("myVideo", array(
 "width" => 670,
 "height" => 400,
 "thumbnail" => "example"
)); ?>

HTML 5 Example with automatic Video transcoding (using mediaelement.js)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

    <?php if (!$this->editmode) { ?>
        <script type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript" src="mediaelement-and-player.min.js"></script>
        <link rel="stylesheet" href="mediaelementplayer.css" type="text/css" media="screen" />
    <?php } ?>

</head>
<body>

    <?=  $this->video("myVideo", array(
        "thumbnail" => "example",
        "html5" => true,
        "width" => 400,
        "height" => 300
    )); ?>

    <?php if (!$this->editmode) { ?>
        <script type="text/javascript">
            $('video,audio').mediaelementplayer(/* Options */);
        </script>
    <?php } ?>

</body>
</html>
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.