Download the PHP package afloeter/laravel-cloudflare-stream without Composer

On this page you can find all versions of the php package afloeter/laravel-cloudflare-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 laravel-cloudflare-stream

laravel-cloudflare-stream

Manage Cloudflare Stream with ease by using this handy PHP API wrapper. The laravel-cloudflare-stream package gives ability to...

Feel free to check out the Cloudflare Stream documentation and API documentation for further information.

Installation

Step 1: Install using Composer

Add the following to your root composer.json and install with composer install or composer update.

{
  "require": {
    "afloeter/laravel-cloudflare-stream": "~1.0.0"
  }
},
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/afloeter/laravel-cloudflare-stream"
    }
]

...or use composer require afloeter/laravel-cloudflare-stream in your console after just adding the repository to your composer.json file.

Step 2: Publish the config file for Laravel projects

Publish the config file with php artisan vendor:publish --provider="AFloeter\CloudflareStreamServiceProvider".

Step 3: Add informationen to Laravel's .env file

Add the following lines to your root .env file of your Laravel instance.

CLOUDFLARE_STREAM_ACCOUNT_ID=
CLOUDFLARE_STREAM_AUTH_KEY=
CLOUDFLARE_STREAM_AUTH_EMAIL=
CLOUDFLARE_STREAM_PRIVATE_KEY_ID=
CLOUDFLARE_STREAM_PRIVATE_KEY_TOKEN=

Complete the following information.

Leave CLOUDFLARE_STREAM_PRIVATE_KEY_ID and CLOUDFLARE_STREAM_PRIVATE_KEY_TOKEN blank if you don't use signed URLs at all.

Otherwise: Check the documentation on how to create a signing key and get RSA private key in PEM format.

Usage

Laravel

If you have done the vendor:publish step, your credentials will be grabbed from the config/cloudflare-stream.php and / or .env file. So, you can use CloudflareStreamLaravel() without providing your information once again.

use AFloeter\CloudflareStream\CloudflareStreamLaravel;

...

$cfs = new CloudflareStreamLaravel();
$listOfVideos = $cfs->list();

...

Generic PHP

If you are on composer-enabled projects use CloudflareStream(). Without composer try requiring src/CloudflareStream.php directly into your project.

use AFloeter\CloudflareStream\CloudflareStream;

...

$cfs = new CloudflareStream($accountId, $authKey, $authEMail);
$listOfVideos = $cfs->list();

...

If you are using signed URLs for your videos, simply add the $privateKey and $privateKeyToken variables.

use AFloeter\CloudflareStream\CloudflareStream;

...

$cfs = new CloudflareStream($accountId, $authKey, $authEMail, $privateKey, $privateKeyToken);
$signedToken = $cfs->getSignedToken($videoId);

...

To Do

It's planned to add support to...

Changelog

All notable changes to laravel-cloudflare-stream will be documented here.

1.0.0 - 2020-06-12

License

laravel-cloudflare-stream is distributed under the terms of the MIT License.


All versions of laravel-cloudflare-stream with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
firebase/php-jwt Version ^5.2
guzzlehttp/guzzle Version ^6.3
laravel/framework Version ^7.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 afloeter/laravel-cloudflare-stream contains the following files

Loading the files please wait ....