承接 afloeter/laravel-cloudflare-stream 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

afloeter/laravel-cloudflare-stream

Composer 安装命令:

composer require afloeter/laravel-cloudflare-stream

包简介

Manage the Cloudflare Stream API with ease.

README 文档

README

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

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

  • 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

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

1.0.0 - 2020-06-12

  • initial release

License

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

afloeter/laravel-cloudflare-stream 适用场景与选型建议

afloeter/laravel-cloudflare-stream 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 217 次下载、GitHub Stars 达 11, 最近一次更新时间为 2020 年 06 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 afloeter/laravel-cloudflare-stream 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 afloeter/laravel-cloudflare-stream 我们能提供哪些服务?
定制开发 / 二次开发

基于 afloeter/laravel-cloudflare-stream 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 217
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 2
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-12