joggapp/laravel-source
Composer 安装命令:
composer require joggapp/laravel-source
包简介
Laravel package for Jogg Source API
README 文档
README
-
Only available via our Satis for now.
-
You can install this package via composer using this command:
composer require joggapp/laravel-source
-
The package will automatically register itself.
-
You can publish the config file using the following command:
php artisan vendor:publish --provider="JoggApp\Source\SourceServiceProvider"
This will create the package's config file called laravel-source.php in the config directory. These are the contents of the published config file:
return [ 'access_token' => env('LARAVEL_SOURCE_ACCESS_TOKEN'), 'secret_key' => env('LARAVEL_SOURCE_SECRET_KEY'), 'webhook_processing_queue' => 'default', ];
API
All methods return an Illuminate\Http\Client\Response object, allowing you to access status codes, headers, and the response body.
-
Encoding:
Source::encode(string $clientReferenceId, string $url, array $config): Response -
Transcription:
Source::transcribe(string $clientReferenceId, string $url, array $config): Response -
Caption:
Source::caption(string $clientReferenceId, string $url, array $config): Response -
Add Caption to Video:
Source::addCaptionToVideo(string $clientReferenceId, array $config): Response -
Clipping:
Source::clip(string $clientReferenceId, string $url, array $config): Response -
Stitching:
Source::stitch(string $clientReferenceId, array $files, array $config): Response -
Video Info:
Source::info(string $url): VideoInfo
Example Usage
$response = Source::encode('unique-ref-id', 'https://example.com/video.mp4', []); if ($response->successful()) { $data = $response->json(); } $statusCode = $response->status(); $headers = $response->headers();
Events on placing order
All the following events have the string $clientReferenceId and an Illuminate\Http\Client\Response $response properties which you can access in your listeners.
The $response property contains the full HTTP response object, allowing you to access the status code, headers, and body:
event->response->status() event->response->json() event->response->headers()
-
Captions:
SourceCaptionOrderPlaced&SourceCaptionOrderFailed -
Encoding:
SourceEncodingOrderPlaced&SourceEncodingOrderFailed -
Transcriptions:
SourceTranscriptionOrderPlaced&SourceTranscriptionOrderFailed -
Burn Captions:
SourceAddCaptionToVideoOrderPlaced&SourceAddCaptionToVideoOrderFailed -
Clipping:
SourceClipOrderPlaced&SourceClipOrderFailed -
Stitching:
SourceStitchOrderPlaced&SourceStitchOrderFailed
Webhooks
-
You can define the webhook route in the
sourceWebhookroute macro that is provided by this package:Route::sourceWebhook('your-webhook-route')->middleware('validate.source.signature'); -
The middleware above will automatically verify the webhook signature using the webhook secret set in the
laravel-source.phpconfig file. -
The following events fire when their respective webhook is received. All the events have a
array $requestprop that contains the payload from the webhook. -
'encode.pending' =>
SourceEncodingPendingWebhookReceived -
'encode.working' =>
SourceEncodingWorkingWebhookReceived -
'encode.finished' =>
SourceEncodingFinishedWebhookReceived -
'encode.failed' =>
SourceEncodingFailedWebhookReceived -
'encode.files' =>
SourceEncodingFilesWebhookReceived -
'transcribe.pending' =>
SourceTranscriptionPendingWebhookReceived -
'transcribe.working' =>
SourceTranscriptionWorkingWebhookReceived -
'transcribe.finished' =>
SourceTranscriptionFinishedWebhookReceived -
'transcribe.failed' =>
SourceTranscriptionFailedWebhookReceived -
'transcribe.files' =>
SourceTranscriptionFilesWebhookReceived -
'caption.pending' =>
SourceCaptionPendingWebhookReceived -
'caption.working' =>
SourceCaptionWorkingWebhookReceived -
'caption.finished' =>
SourceCaptionFinishedWebhookReceived -
'caption.failed' =>
SourceCaptionFailedWebhookReceived -
'caption.files' =>
SourceCaptionFilesWebhookReceived
Testing
You can run the tests with:
vendor/bin/phpunit
Changelog
Please see the CHANGELOG for more information about what has changed recently.
Security
If you discover any security related issues, please email them to harish@jogg.co instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see the License File for more information.
joggapp/laravel-source 适用场景与选型建议
joggapp/laravel-source 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 75 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「package」 「source」 「api」 「laravel」 「jogg」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 joggapp/laravel-source 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 joggapp/laravel-source 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 joggapp/laravel-source 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel 5 Package for Using & Working With Emojis
A Laravel 5 Package Provider to Identify/detect a user's browser, device, operating system and Language
A PSR-7 compatible library for making CRUD API endpoints
Thepeer official Laravel SDK
Simple ASCII output of array data
统计信息
- 总下载量: 75
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-19