Created: 08/24/2014
By: Digital Zoom Studio
Twitter: http://twitter.com/
Facebook: http://facebook.com/dzs
Support Forum: http://dzs.net/support/
Thank you for purchasing my component. If you have any questions that are beyond the scope of this help file, please feel free to apply for membership on the forum, it's the fastest way of support [ link to the left ] and post a thread about your question after your membership is validated.
Zoom Video Player is the only video player you will ever need because it's completely functional and customizable. Why is it called Zoom Video Player ? Because the graphics are rendered crisp even at 3200% zoom thanks to SVG graphics. The player includes all the functions one would want - autoplay, cue, loop, api, touch ready, responsive and plays from different stream providers. It's unique feature is, although being so functional, it's extreme customizablility. You can change player controls position, color and even add your own contorls with the included builder.
This is inspired from the video player of our best selling video gallery and it was rebuilt from scratch based on our customers feedback and requests like full player customizability, preroll, midroll and postroll ads and multiple streams support.
All you have to do for installing on your site (ie. yoursite.com) is copy the contents of the /source folder to a folder (ie. yourfolder) on your site via ftp ( with filezilla ) or any other upload service. You can then access your contents via http://yoursite.com/yourfolder.
In order to install this component in your html page you need to:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel='stylesheet' type="text/css" href="zoomplayer/zoomplayer.css"/>
<script src="zoomplayer/zoomplayer.js"></script>
<script src="https://www.youtube.com/iframe_api"></script>
note: if you already have included jQuery in your document, do not include it again, jQuery should only be included once
<div class="zoomvideoplayer auto-init" data-source="https://www.youtube.com/watch?v=2pQlqeiYWZw">
</div>
_______________
Recommended: Some web servers may not have html5 video support yet. So if you notice your videos do not work ( and were properly uploaded ) an easy fix is to add this to to your .htaccess file:
AddType video/ogg ogv
AddType video/webm .webm
AddType video/mp4 .mp4
Note: if you have created custom skins with the builder you also need to import db/skins.css and db/skins.js
<div id="mainplayer" class="zoomvideoplayer auto-init" data-source="https://www.youtube.com/watch?v=2pQlqeiYWZw">
</div>
This is the item structure. The id must be unique. The source field can be a youtube link ( or id ), a vimeo link ( or id ) or a mp4 video.
<div id="mainplayer" class="zoomvideoplayer auto-init" data-source="video/video.mp4" data-sourceogg="video/video.ogv">
</div>
The format .ogv is not necessary as zoomplayer will initiate a flash player backup on players that do not support mp4 ( like firefox ) . But it's recommended for a smooth playback.
<div id="mainplayer" class="zoomvideoplayer" data-source="https://www.youtube.com/watch?v=2pQlqeiYWZw">
</div>
<script>
jQuery(document).ready(function($)){
dzszvp_init('#mainplayer', { cue: "off", autoplay: "on", settings_otherSocialIcons:""} );
});
</script>
Note that auto-init is no longer necessary as we will initiate the player through javascript. The emptathized text are options you can assign to the players. Described next:
<div id="mainplayer" class="zoomvideoplayer skin-default auto-init " data-source="video/test.m4v" data-hd_source="video/test.m4v" data-options='{ cue: "off", autoplay: "on", settings_otherSocialIcons:"", settings_suggestedQuality: "large", responsive_ratio: "0.565", settings_enableAutoHide:"off"}' data-arg_downloadlink="http://digitalzoomstudio.net" data-arg_logoimg="img/logo.png" data-ad_array='[{"source":"video/advideo.mp4","sourceogg":"video/advideo.ogv","ad_type":"video","ad_time":"3","ad_skip_delay":"5","ad_link":"http://google.com"},{"source":"video/advideo.mp4","sourceogg":"video/advideo.ogv","ad_type":"video","ad_time":"10","ad_skip_delay":"5","ad_link":"http://google.com"}]' data-thumbnaildir="video/imagesfortest/" >
</div>
Note that auto-init is no longer necessary as we will initiate the player through javascript. The emptathized text are options you can assign to the players. Described next:
Note: RTMP / HSL streaming might work with another service provider, but this guide is for WOWZA Streaming Engine
First, you must install WOWZA Streaming Engine. Once installed, when you go to the administration panel, you will see this panel when you click Test Video.
The fields we are interested in are Server and Stream from Adobe RTMP and Stream from Apple HSL - in order for the player to work on all devices.
<div class="zoomvideoplayer auto-init" data-source="mp4:sample.mp4" data-sourceogg="video/test.ogv" data-options='{ cue: "off", autoplay: "on", settings_otherSocialIcons:"", settings_rtmpServer:"rtmp://192.168.0.127:1935/vod"}' data-arg_downloadlink="http://digitalzoomstudio.net" data-sourcehsl="http://192.168.0.127:1935/vod/mp4:sample.mp4/playlist.m3u8">
</div>
If you integrating this into WordPress or a CMS that requires absolute urls, you should also link to the swf file in the options because the swf file is essential to playing RTMP.
<div class="zoomvideoplayer auto-init" data-source="mp4:sample.mp4" data-sourceogg="video/test.ogv" data-options='{ cue: "off", autoplay: "on", settings_otherSocialIcons:"", settings_rtmpServer:"rtmp://192.168.0.127:1935/vod", url_playerlight:"//yourdomain.com/pathto/playerlight.swf"}' data-arg_downloadlink="http://digitalzoomstudio.net" data-sourcehsl="http://192.168.0.127:1935/vod/mp4:sample.mp4/playlist.m3u8">
</div>
screencast - http://screencastle.com/watch/e5b1842d78eb8c884a382c717d08c6e2
Just place a new html file in the db/components folder. The html file must have this format
<span class="pause-btn pause-btn-for-skin-avanti" style="width: 16px; height: 15px; position:absolute;left: 15px; bottom: 10px;">
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="13.415px" height="16.333px" viewBox="0 0 13.415 16.333" enable-background="new 0 0 13.415 16.333" xml:space="preserve">
<path fill="#D2D6DB" d="M4.868,14.59c0,0.549-0.591,0.997-1.322,0.997H2.2c-0.731,0-1.322-0.448-1.322-0.997V1.618
c0-0.55,0.592-0.997,1.322-0.997h1.346c0.731,0,1.322,0.447,1.322,0.997V14.59z"/>
<path fill="#D2D6DB" d="M12.118,14.59c0,0.549-0.593,0.997-1.324,0.997H9.448c-0.729,0-1.322-0.448-1.322-0.997V1.619
c0-0.55,0.593-0.997,1.322-0.997h1.346c0.731,0,1.324,0.447,1.324,0.997V14.59z"/>
</svg> </span>
<span class="preview-img" style="background-image: url(img/preview_pause_avanti.png);">
</span>
Where the preview-img is the image that will show in the editor in the components area.
First you need to import the zoombox/ folder in your project. Then just add this block of code with your desired thumbnail and video
<a href="video/test.mp4" class="zoombox effect-icona for-playbtn">
<img class="thumb-gamma" src="img/v1.png"/></a>
You just need the data-ad_array attribute. The content must look like a json encoded string. Example below:
<div id="mainplayer" class="zoomvideoplayer skin-default auto-init " data-source="video/test.m4v" data-hd_source="video/test.m4v" data-options='{ cue: "off", autoplay: "on", settings_otherSocialIcons:"", settings_suggestedQuality: "large", responsive_ratio: "0.565", settings_enableAutoHide:"off"}' data-arg_downloadlink="http://digitalzoomstudio.net" data-arg_logoimg="img/logo.png" data-ad_array='[{"source":"video/advideo.mp4","sourceogg":"video/advideo.ogv","ad_type":"video","ad_time":"3","ad_skip_delay":"5","ad_link":"http://google.com"},{"source":"video/advideo.mp4","sourceogg":"video/advideo.ogv","ad_type":"video","ad_time":"10","ad_skip_delay":"5","ad_link":"http://google.com"}]' data-thumbnaildir="video/imagesfortest/" >
</div>
There is an example in index-readmrss.php. PHP Code:
<?php
include_once 'class-front.php';
$dzszvp = new DZSzvp_frontend();
echo $dzszvp->read_rss('mrss1.xml','{ cue: "off", autoplay: "on", settings_otherSocialIcons:"", settings_suggestedQuality: "large", settings_enableAutoHide:"on"}');
?>
First, you need the FFMpeg extension - http://ffmpeg.org/. Once it is properly configured, you can test by accessing the Terminal / Command Prompt and typing ffmpeg . The extension can also be called via PHP. This is a wrapper I wrote to generate the instant preview thumbnails:
<?php
//define('FFMPEG_LIBRARY', '/usr/local/bin/ffmpeg ');
$file = '/Applications/MAMP/htdocs/zoomvideoplayer/source/video/test.m4v';
$outputdir = '/Applications/MAMP/htdocs/zoomvideoplayer/source/video/imagesfortest/'; //--dont forget the ending "/"
create_thumbs_for_video($file, $outputdir);
function create_thumbs_for_video($file, $outputdir){
$cmd = '/usr/local/bin/ffmpeg -i '.$file.' -an -ss 00:00:00 -s 60x35 -r 1 -vframes 60 -f image2 -y '.$outputdir.'%01d.jpg';
exec($cmd, $output, $value);
var_dump($output);
var_dump($value);
var_dump($cmd);
}
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel='stylesheet' type="text/css" href="http://yourserver.com/zoomplayer/zoomplayer.css"/>
<script src="http://yourserver.com/zoomplayer/zoomplayer.js"></script>
note: if you already have included jQuery in your document, do not include it again, jQuery should only be included once
<div class="zoomvideoplayer auto-init" data-options={url_playerlight:"//yourdomain.com/pathto/playerlight.swf}" data-source="https://www.youtube.com/watch?v=2pQlqeiYWZw">
</div>
You need your movie converted to two formats in order to make sure the html5 video plays in all browsers.
Browser support & recommended encoding program
We recomend using Handbrake ( open-source ) for generating the mp4 file from your video file. We made a screenshot of some sample settings that we tested to work on iOS, Android, Safari, Chrome. See below:
Then the ogv video is optional but can be generated too for best streaming, you can use an online service called Video-online-convert . You just have to upload the resulted mp4 and it will process it and offer a ogv download. That easy.
IE9, IE8 ( Flash ) & Safari : MP4 / M4V
Chrome & Opera & Firefox : OGG / OGV
When you want to manipulate pictures - ie: you depend on their size - like a ken burns slider or scroller does, it's best to use jQuery(window).load because that executes the code in it AFTER all the images and content has loaded. For everything else, there is jQuery(document).read -which only waits for the html to be parsed corectly & all elements formed.
You can generally use any text editing software [ like notepad ] to edit content/code but this is what I recommend:
If you are a developer you will notice there are some .scss files included too. This is the language for a css preprocessor which makes a developer's life easier. This is optional but if you want to try it here is the site.
Digital Zoom Studio