Download the PHP package kemp/bunny-stream without Composer

On this page you can find all versions of the php package kemp/bunny-stream. 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 bunny-stream

Bunny Stream

Bunny Stream is a Statamic addon that integrates the Bunny Stream API for single Stream libraries in the Statamic CP.

Features

How to Install

1. Install via composer

2. Insert CSS and JS files

For the videos to be displayed properly you need to add the Statamic Tag {{ video_styles:css }} in the <head> section and the {{ video_styles:js }} tag before the </body> element in your layout.

This also includes hls.js to support HLS streaming.

Alternatively you can add these tags only to pages you want to display videos.

How to configure

You need to provide the following config options in your evironment:

To embed the video use the play URL or the direct embed URL (https://yourdomain.com/BUNNY_PLAY_URL/embed/yourvideoID)

You can get all values in your Bunny Stream Dashboard at https://dash.bunny.net/stream/ Delivery > Stream > API

Add a custom CDN hostname

To add a custom hostname to host the videos from the CDN you can do the following:

  1. Login to your bunny dashboard and head over to Delivery > Stream > API
  2. At Pull zone click Manage
  3. Create a CName entry in your DNS settings pointing to the displayed bunny CDN hostname
  4. Enter your custom hostname in the bunny settings and activate SSL
  5. Use your custom hostname in the .env BUNNY_CDN_HOSTNAME=yourcdnhostname

Now your videos are delivered over your custom hostname.

Publish config file (optional)

If you want, you can publish the config file.

How to Use

After you installed the addon you need to add your config options in your .env first.

Upload videos

A new CP navigation item appears: Videobrowser There you can upload and rename your video files. When they are uploaded, they need to be processed. The videos are processed directly at bunny. The given progress indicator displays bunnys progress. After the processing is done the video is available in the videobrowser and in the included fieldtype.

Work with videos

You can embed previously uploaded videos via the provided Statamic Tag {{ bunny_video }} or in the content area via the provided Statamic Fieldtype Bunny.

Video Tag

You should always use the provided Video Tag as it includes all options that are available.

You need to add your own Statamic Fieldset with at least the Bunny Fieldtype included.

You can also add some options:

Video captions

You can add captions to your videos. The captions file needs to be a valid .vtt file. You can host the file in statamic itself or on a different server.

Unfortunately, the Bunny Stream API does not support captions yet. You need to host the file yourself and provide the URL to the video tag.

Currently only one captions file is supported.

Thumbnails

You can get the video's thumbnail URL with the video tag: {{ bunny_video:thumbnail :id="bunny_field" }} It expects the video ID as a parameter.

Example Fieldset

You can use this example fieldset with the provided tag as a layout to include all available options.

How to customize

The included video player is a simple plyr.js player with zero customization.

You can style the whole player to your needs with simple CSS classes: https://github.com/sampotts/plyr?tab=readme-ov-file#customizing-the-css


All versions of bunny-stream with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
statamic/cms Version ^3.2|^4.0|^5.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 kemp/bunny-stream contains the following files

Loading the files please wait ....