Download the PHP package joggapp/laravel-source without Composer
On this page you can find all versions of the php package joggapp/laravel-source. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-source
Installation
-
Only available via our Satis for now.
-
You can install this package via composer using this command:
-
The package will automatically register itself.
- You can publish the config file using the following command:
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:
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
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:
-
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:
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 [email protected] instead of using the issue tracker.
Credits
- Harish Toshniwal
- All Contributors
License
The MIT License (MIT). Please see the License File for more information.