anhnguyenbk / php-livestream
PHP Livestream
Installs: 71
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/anhnguyenbk/php-livestream
Requires
- firebase/php-jwt: ^v5.2.1
- guzzlehttp/guzzle: ^6.3
This package is not auto-updated.
Last update: 2025-12-12 07:14:51 UTC
README
Laravel package for managing livestream events with the associated streaming platform. Currently the package only supports Zoom platform.
Installation
1. Via Private Packagist
2. Via github
Structure
Database migrations
database\migrations\create_live_event_table
database\migrations\create_register_event_table
Model
Model\LiveEvent
Model\RegisterEvent
Usages
With Zoom platform (currently supports)
-
Create your Zoom JWT application
https://marketplace.zoom.us/docs/guides/build/jwt-app. Store your apiKey and apiSecret, the package will use that later for authentication. -
Run
php artisan migrateto generate package's tables (live_eventsandregister_eventtable). -
Create an livestream event example in
routes\web.phpuse anhnguyenbk\PHPLivestream\LivestreamServiceFactory;Route::get('/createLiveStream', function () { $livestreamServiceFactory = new LivestreamServiceFactory(); $apiKey = 'your-api-key'; $apiSecret = 'your-api-sercret'; $zoomService = $livestreamServiceFactory->createZoomService ($apiKey, $apiSecret); $livestream = new \stdClass(); $livestream->topic = "Example livestream topic"; $livestream->startTime = "2021-05-31T20:30:00"; $livestream->duration = "60"; $livestream->password = "111111"; $userId= 1; $classId = 5; $response = $zoomService->createLivestream($userId, $classId, $livestream); return $response->toJson(); });If the process is successful, a new record with be added to the
live_eventstable.