Download the PHP package modularavel/cloudflare-stream-video without Composer

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

modularavel/cloudflare-stream-video

Packagist PHP from Packagist Laravel versions GitHub Workflow Status (main) Total Downloads

A Laravel package that provides an idiomatic, strongly typed interface to the Cloudflare Stream Video API. Upload, manage, and stream videos with signed URLs, watermark overlays, and webhook-driven processing — all from within your Laravel application.

Features

Installation

You can install the package via Composer:

Publishing Resources

You may publish all of the package's resources at once:

Or, publish each resource individually:

Configuration

After publishing, edit config/cloudflare-stream-video.php to configure your Cloudflare account.

Migrations

This will create:

Views

Translations

Public Assets

Configuration

After publishing the config file, edit config/cloudflare-stream-video.php to match your Cloudflare account credentials and preferences. Environment variables (with CLOUDFLARE_STREAM_ prefix) take precedence over config file values.

🔑 Required Settings

🔧 Key 🌿 Env Variable 📝 Description
account_id CLOUDFLARE_STREAM_ACCOUNT_ID Your Cloudflare account identifier
api_token CLOUDFLARE_STREAM_API_TOKEN API token with "Stream Edit" or "Stream Read" permissions

⚙️ Optional Settings

🔧 Key 🌿 Env Variable 💡 Default 📝 Description
timeout CLOUDFLARE_STREAM_TIMEOUT 120 HTTP request timeout in seconds
defaults [] Default key-value pairs merged into every API request body
require_signed_urls CLOUDFLARE_STREAM_REQUIRE_SIGNED_URLS false Whether videos require signed URLs for playback
signing_key CLOUDFLARE_STREAM_SIGNING_KEY '' HMAC-SHA256 signing key for signed URL generation
customer_domain CLOUDFLARE_STREAM_CUSTOMER_DOMAIN '' Custom Cloudflare Stream customer domain for signed URLs
watermark.default_position 'bottom-right' Default watermark position on the video frame
watermark.default_opacity 1.0 Default watermark opacity (0.0–1.0)
watermark.default_width 0 Default watermark width in pixels
watermark.default_height 0 Default watermark height in pixels
webhook.secret CLOUDFLARE_STREAM_WEBHOOK_SECRET '' Secret used to verify incoming webhook signatures
webhook.route CLOUDFLARE_STREAM_WEBHOOK_ROUTE 'cloudflare-stream-video/webhook' Route path for receiving webhook notifications

🔐 Environment Example

Usage

Basic Video Operations

The CloudflareStreamVideo facade (or inject CloudflareStreamVideoInterface) provides the full API surface.

Upload a Video (TUS)

Copy a Video from a URL

Create a Direct Upload

List Videos

Get a Single Video

Update a Video

Delete a Video

Signed URLs

When a signing key is configured, you can generate signed playback URLs and tokens.

Watermarking

Watermarks are overlay images (typically PNG or SVG with transparency) that can be applied to videos during playback. They are managed per-account and associated with videos via their UID.

Create a Watermark

List All Watermarks

Get a Single Watermark

Update a Watermark

Delete a Watermark

Apply a Watermark to a Video

Remove a Watermark from a Video

Webhook Integration

Cloudflare Stream can send webhook notifications when video processing events occur (e.g. video.ready, video.error). The package provides a webhook endpoint, a background job for async processing, and an event for broadcasting completion.

Setup

  1. Configure the webhook secret in your .env:

  2. Configure the webhook route (optional, defaults to cloudflare-stream-video/webhook):

  3. Register the webhook URL in the Cloudflare Stream dashboard under Notifications -> Webhooks. The URL will be:

Handling Webhook Events

The package dispatches a StreamVideoProcessed event whenever a webhook is received. You can listen for this event in your application:

Webhook Payload Structure

Cloudflare Stream sends webhook payloads with the following structure:

Webhook Signature Verification

The webhook controller verifies incoming requests using HMAC-SHA256 signatures. The signature is sent in the X-Cloudflare-Signature header as a hex-encoded HMAC digest of the raw request body.

If no CLOUDFLARE_STREAM_WEBHOOK_SECRET is configured, signature verification is skipped (not recommended for production).

Webhook Database Table

The package includes a migration that creates the cloudflare_stream_webhooks table for auditing webhook deliveries:

The table stores:

Blade Player Component

The package includes a responsive Blade component for embedding Cloudflare Stream videos.

Basic Usage

Signed Mode

Custom Dimensions and Styling

The component renders a responsive iframe wrapper with the Cloudflare Stream embed player. When signed is true, the component generates a signed embed URL using the configured signing key.

Artisan Commands

Placeholder Command

A basic command that confirms the package is installed and working.

Import Video from URL

Sync Videos

Syncs videos from Cloudflare Stream with your local database.

Generate Signed URL

Watermark Management

🧪 Testes

O pacote conta com 86 testes e 150 assertions usando Pest PHP:

📚 Contribute

We welcome your contributions! Please check out our contributing guide for details.


🔒 Security Policy

Report security vulnerabilities responsibly through our security policy.


👨‍💻 Author

Casimiro Rocha
Casimiro Rocha
📧 [email protected]


📄 License

This project is licensed under the MIT License — see the LICENSE.md file for details.


✨ Support

If you've found this package useful, please ⭐ the repository to show your support!


Made with ❤️ by Modularavel

Version 0.1.0


All versions of cloudflare-stream-video with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^12.0||^13.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 modularavel/cloudflare-stream-video contains the following files

Loading the files please wait ...