PHPackages                             afloeter/laravel-cloudflare-stream - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. afloeter/laravel-cloudflare-stream

ActiveLibrary[API Development](/categories/api)

afloeter/laravel-cloudflare-stream
==================================

Manage the Cloudflare Stream API with ease.

1.0.1(6y ago)112177[1 issues](https://github.com/afloeter/laravel-cloudflare-stream/issues)[1 PRs](https://github.com/afloeter/laravel-cloudflare-stream/pulls)MITPHPCI failing

Since Jun 12Pushed 3y ago2 watchersCompare

[ Source](https://github.com/afloeter/laravel-cloudflare-stream)[ Packagist](https://packagist.org/packages/afloeter/laravel-cloudflare-stream)[ RSS](/packages/afloeter-laravel-cloudflare-stream/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (3)Used By (0)

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...

- ✓ **List your videos**
    - optionally using parameters to filter results
        - *after*
        - *before*
        - *include\_counts*
        - *search*
        - *limit*
        - *asc*
        - *status*
- ✓ **Details of your videos**
    - Meta information (read / write)
    - Video name (read / write)
    - Require signed URLs (read-only)
    - Width and height (read-only)
- ✓ **Get embed code of your videos**
    - With or without signed URLs
    - Add attributes to embed code
        - *controls*
- ✓ **Get playback URLs of your videos**
    - With or without signed token
- ✓ **Generate signed tokens for your videos**
- ✓ **Delete your videos**

Feel free to check out the Cloudflare Stream [documentation](https://developers.cloudflare.com/stream/) and [API documentation](https://api.cloudflare.com/#stream-videos-properties) for further information.

Installation
------------

[](#installation)

### Step 1: Install using Composer

[](#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

[](#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

[](#step-3-add-informationen-to-laravels-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.

- `CLOUDFLARE_STREAM_ACCOUNT_ID` is your [Cloudflare account](https://dash.cloudflare.com/) ID.
- `CLOUDFLARE_STREAM_AUTH_KEY` is your [Cloudflare API key](https://dash.cloudflare.com/profile/api-tokens).
- `CLOUDFLARE_STREAM_AUTH_EMAIL` is the email address of your [Cloudflare account](https://dash.cloudflare.com/profile).

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

- `CLOUDFLARE_STREAM_PRIVATE_KEY_ID` is the ID of your signing key
- `CLOUDFLARE_STREAM_PRIVATE_KEY_TOKEN` is the related RSA private key.

Otherwise: Check the [documentation](https://developers.cloudflare.com/stream/security/signed-urls/) on [how to create a signing key and get RSA private key](https://developers.cloudflare.com/stream/security/signed-urls/#creating-a-signing-key) in PEM format.

Usage
-----

[](#usage)

### Laravel

[](#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

[](#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
-----

[](#to-do)

It's planned to add support to...

- **Upload a video**
    - From a URL
    - Using a single HTTP request
    - Using `ankitpokhrel/tus-php`
- **User uploads**
    - Create a video and get authenticated direct upload URL
- **Create and revoke signing keys.**
- **Add, get and remove `.vtt` caption files.**
- **Set, get and remove allowed origins**

Changelog
---------

[](#changelog)

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

### 1.0.0 - 2020-06-12

[](#100---2020-06-12)

- initial release

License
-------

[](#license)

`laravel-cloudflare-stream` is distributed under the terms of the [MIT License](LICENSE).

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2212d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3304815?v=4)[Alexander Flöter](/maintainers/afloeter)[@afloeter](https://github.com/afloeter)

---

Top Contributors

[![afloeter](https://avatars.githubusercontent.com/u/3304815?v=4)](https://github.com/afloeter "afloeter (2 commits)")[![michaelchora](https://avatars.githubusercontent.com/u/19279510?v=4)](https://github.com/michaelchora "michaelchora (2 commits)")

---

Tags

api-wrappercloudflare-streamcloudflare-streamslaravellaravel-packagelaravel7

### Embed Badge

![Health badge](/badges/afloeter-laravel-cloudflare-stream/health.svg)

```
[![Health](https://phpackages.com/badges/afloeter-laravel-cloudflare-stream/health.svg)](https://phpackages.com/packages/afloeter-laravel-cloudflare-stream)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M986](/packages/statamic-cms)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[firefly-iii/data-importer

Firefly III Data Import Tool.

8035.8k](/packages/firefly-iii-data-importer)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.8k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
