Download the PHP package cschoenfeld/html5video without Composer

On this page you can find all versions of the php package cschoenfeld/html5video. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package html5video

HTML5 Video Class

Writes a properly formatted

ASSUMPTIONS: If these assumptions are not met, there are function calls you can use to override them. However, having things set up this way will mean you spend less time and write less code.

  1. Constant: BASE_URL exists, with trailing slash. Example: http://www.mysite.com/

  2. Constant: BASEPATH exists, with trailing slash. Example: /var/htdocs/mysite/

  3. Your video files and poster image are located in a /media/ directory, at the BASEPATH.

  4. A Flash-based MP4 player called "flvplayer.swf" is located at the BASE_URL.

INSTALLATION: To install via Composer, put the following in your composer.json file: { "require": { "cschoenfeld/html5video": "dev-master" } }

Then, just run "composer install" from the command line.

USAGE:

First, prepare your video files and poster image. You will need 3 video formats: .mp4, .webm, and .ogv. Example: myvideo.mp4 myvideo.webm myvideo.ogv myvideo.jpg

Minimal sample code: (3 lines of code to render a video.)

require_once html5video.php;
try {
    $video = new html5video('videlement', 'myvideo'); // ID of the <video> tag, filename of the video files.
    $video->setDimensions(640, 480); // Width, height
    $video->render();
} catch (Exception $ex) {
    // Replace this code if you want to handle exceptions more gracefully.
    die('ERROR: ' . $ex->getMessage());
}

Extended sample code: (Overriding the class defaults, using additional features.)

require_once html5video.php;
try {
    $video = new html5video('videlement', 'myvideo');
    $video->setDimensions(640, 480);
    $video->setLocalDir('videos/people/charles'); // Specify an alternate local directory for the media files.
    $video->setBaseURL('http://www.mysite.com/'); // Needed if you don't have a BASE_URL constant defined.
    $video->setBasepath('/var/htdocs/mysite/'); // Needed if you don't have a BASEPATH constant defined.
    $vide->changeFilenames('myvideo-filename.mp4', 'thisvideo.ogv'); // Override the names of individual media files.
    $video->setFlashURL('assets/flash/vidplayer.swf'); // Override the default location of the Flash player.
    $video->use_amazon('https://s3.amazonaws.com/mybucket/'); // Pull videos from Amazon S3 storage.
    $video->useControls(false); // Don't show player controls.
    $video->setAutoplay(true); // Make the video start playing as soon as it loads.
    $video->render();
} catch (Exception $ex) {
    // Replace this code if you want to handle exceptions more gracefully.
    die('ERROR: ' . $ex->getMessage());
}

Note: If you need to capture the HTML output to a variable, instead of writing it directly to the page, then replace the "render()" line of the example with this:

$vid_HTML = $video->render(false);

All versions of html5video with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cschoenfeld/html5video contains the following files

Loading the files please wait ....