Skip to content
xbgmsharp edited this page Mar 16, 2015 · 31 revisions

HTML5 tag

Those settings allow you to define the default behavior of the player, like Autoplay, Loop, Volume, etc...

Plugin settings

Skin

The Player Skin Designer allows you to watch changes happen to the skin live as you edit the CSS, making it easier to create a custom look.

Using the http://designer.videojs.com/ mean you create a template.

Check out this familiar looking example.

It’s probably easiest if you start by forking this unedited example.

Additional documentation for skins is available at VideoJS Skins

You can add your own skin into your gallery, to do so you have multiple options.

  1. Hardcoded in the template your skin.

https://github.com/xbgmsharp/piwigo-videojs/blob/master/template/vjs-player.tpl#L2

  1. Make it dynamic for reading in main.inc.php

https://github.com/xbgmsharp/piwigo-videojs/blob/master/main.inc.php#L183

  1. Make it dynamic for writing in admin/admin_config.php

https://github.com/xbgmsharp/piwigo-videojs/blob/master/admin/admin_config.php#L33

  1. When you have modify all the code you can send a pull request so I add you skin.

CustomCSS

If don't want to create your own style.

CustomCSS field allow you to create your own skin directly from the VideoJS website.

Once customize, click on "Embed This Player" and copy the custom HTML style code section into the CustomCSS textarea.

Sample style to copy and paste:

<style type="text/css">
  .vjs-default-skin { color: #b05757 }
  .vjs-play-progress, .vjs-volume-level { background-color: #3881a9 }
  .vjs-control-bar, .vjs-big-play-button { background: rgba(146,63,63,0.7) }
</style>

Please note that CustomCSS field only apply to the default skin.

Max Width

The original video size is keep as long as it is below the max_width parameter in the admin panel.

If the video width is higher, the height will be scale and the width equal the max_width parameter.

Upscale

If checked and if the video is smaller than max_width parameter, it will upscale the video size to max width.

The width equal the max_width parameter and the height will be scale.

VideoJS Plugin

I develop some VideoJS plugin for my need. I integrate them into Piwigo.

Those only work using the HTML5 player and not when the player fallback to Flash.

More plugins are available at VideoJS Plugins

videojs-zoomrotate

There is 2 possibles scenarios: The video has the rotation metadata. No action are require. On sync it will populate the data. The video does not the rotation metadata, then you must specify manually you want the video to be rotate. To do use the rotate tab of the VideoJS plugin.

Then when you play the video and if the videojs-zoomrotate plugin is enable. It will read the data from PWG database and then rotate and zoom the video. This only work on video play inside the HTML5 player and not when the player fallback to Flash.

It will rotate the video as per the screenshot section.

Note that iOS device does have the rotation metadata), therefor have the correct orientation.

videojs-thumbnails

To use this plugin, you need to create one or multiple thumbnail every specified second.

It will displays the thumbnail in the progress bar as per the screenshot section.

You can change the thumbnail layout by modifying the class '.vjs-thumbnail' in the file 'video-js/videojs.thumbnails.css' to your need.

For example:

border-style: solid;
border-width: 1px;
border-color: red;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;

or:

border:5px solid red;

videojs-watermark

To use this plugin you need to activated watermark in the Piwigo configuration, 'Administration' -> 'Configuration' -> 'Options' -> 'Watermark'.

You can change the watermark layout by modifying the class '.vjs-watermark' in the file 'video-js/videojs.watermark.css' to your need.

It will displays the watermark over the video as per the screenshot section.

Screenshot

Sample configuration menu

Sample configuration menu

Sample output

Sample output

Sample output with videojs-zoomrotate

Sample output with videojs-zoomrotate

Sample output with videojs-thumbnails

Sample output with videojs-thumbnails

Sample output with videojs-watermark

Sample output with videojs-watermark