pbmengine/pbm-video-sdk
Composer 安装命令:
composer require pbmengine/pbm-video-sdk
包简介
This package is a PHP Rest Client SDK for PBM Video API
README 文档
README
The PHP SDK provides a convenient way to use the PBM video api.
Installation
You can install the package via composer:
composer require pbmengine/pbm-video-sdk
Usage
Prerequisites
You need an Api Key to use this package!
Create a project
You must create a project to use the api. Actually you'll need only 1 project pr application. So store the project_id somewhere in your config files.
$project = video()->createProject(<project name>, <identifier optional>, <description optional); // your project id $project->data()->id // your project access key $project->data()->access_key // your project secret key $project->data()->secret_key // store these values in config/pbm-video.php
Create a template
A template is a blueprint for each dynamic movie! So if you have several videos in your application, you'll need several templates.
// the data to create a template must contain // please see api documentation for more properties // movie name and movie project id must be known from isw $data = [ 'name' => 'super duper video', 'movie_name' => 'the well known movie name', 'movie_project_id' => 'the well known movie project id', 'protection' => true|false // if protected the video is not publicly accessible ]; $template = video()->createTemplate(<your project id>, array $data);
Check needed params for video
$movie = video()->iswProject(<movie project id>); // response is something like this // important here is the variables -> collection field -> name [ "data" => array:4 [ "id" => "12e2045f-6257-48c7-bdaa-3a975bf74598" "created_at" => "2019-11-21T12:42:01+00:00" "name" => "video_test_api" "dynamic_movies" => array:1 [ 0 => array:9 [ "seconds" => 10 "variable_length" => false "width" => 1920 "height" => 1080 "codec" => "H264/AAC" "created_at" => "2019-11-21T12:51:03+00:00" "updated_at" => "2020-02-04T16:08:15+00:00" "name" => "intro_clip" "variables" => array:1 [ "collection" => array:3 [ 0 => array:4 [ "num_frames" => 250 "default_value" => "hintergrund.jpg" "name" => "hintergrund" "type" => "image" ] 1 => array:4 [ "num_frames" => 250 "default_value" => "Mustervorname" "name" => "vorname" "type" => "text" ] 2 => array:4 [ "num_frames" => 250 "default_value" => "Musternachname" "name" => "nachname" "type" => "text" ] ] ] ] ] ] ]
Create video
// you will need the above mentioned params
// data should be $data = [ 'params' => [ 'key1' => 'value', 'key2' => 'value', 'key3' => 'value', ] ]; $video = video()->createVideo(<projectId>, <templateId>, <name>, <data>)
Status of Video
$status = video()->videoStatus(<video id>, <project id>);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email systems@personal-business-machine.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
pbmengine/pbm-video-sdk 适用场景与选型建议
pbmengine/pbm-video-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 57 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 03 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「pbm」 「PBM Video API」 「php-sdk-video-api」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pbmengine/pbm-video-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pbmengine/pbm-video-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pbmengine/pbm-video-sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.
The yii2-videojs-widget is a Yii 2 wrapper for the [video.js](http://www.videojs.com/). A JavaScript and CSS library that makes it easier to work with and build on HTML5 video. This is also known as an HTML5 Video Player.
A PSR-7 compatible library for making CRUD API endpoints
Display a video using native HTML5 video
SDK for using PBM Stream API
PBM Logger
统计信息
- 总下载量: 57
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-05