Download the PHP package mainul12501/zego-audio-video-calling without Composer
On this page you can find all versions of the php package mainul12501/zego-audio-video-calling. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mainul12501/zego-audio-video-calling
More information about mainul12501/zego-audio-video-calling
Files in mainul12501/zego-audio-video-calling
Package zego-audio-video-calling
Short Description A complete Laravel package for ZegoCloud audio and video calling with mobile app support
License MIT
Informations about the package zego-audio-video-calling
ZegoCloud Audio & Video Calling Package for Laravel
A complete, production-ready Laravel package for implementing ZegoCloud audio and video calling with mobile app support. Just install, configure credentials, and you're ready to go!
Features
✅ Zero Configuration Setup - Just add your ZegoCloud credentials to .env
✅ Audio & Video Calling - Full support for both audio and video calls
✅ Web & Mobile Support - Works seamlessly across web browsers and mobile apps
✅ Real-time Communication - WebSocket broadcasting for call state synchronization
✅ Push Notifications - FCM (Android) and APNs (iOS) support for incoming calls
✅ Call History - Track and manage call records
✅ Laravel 10-12+ Compatible - Supports Laravel 10, 11, 12 and future versions
✅ Auto-Discovery - Service provider auto-registration
✅ Customizable UI - Beautiful, responsive call interface out of the box
✅ Mobile API - RESTful API endpoints for mobile app integration
Table of Contents
- Requirements
- Installation
- Configuration
- Usage
- Web Integration
- API Integration
- Mobile App Integration
- Customization
- Broadcasting Setup
- Testing
- Troubleshooting
- Contributing
- License
Requirements
- PHP 8.1 or higher
- Laravel 10.0 or higher
- ZegoCloud account (Get one here)
- Laravel Sanctum (for API authentication)
- Laravel Echo & Pusher (for real-time broadcasting)
Installation
Step 1: Install via Composer
Step 2: Publish Package Assets
Or publish individually:
Step 3: Run Migrations
This will create:
callstable - Stores call records- Add device-related columns to
userstable (device_token, device_platform, is_online, last_seen)
Configuration
Step 1: Add ZegoCloud Credentials to .env
Step 2: Get Your ZegoCloud Credentials
- Go to ZegoCloud Console
- Create a new project or select existing one
- Get your App ID and Server Secret from the project settings
That's it! The package is now ready to use.
Usage
Web Integration
Basic Implementation
Add call buttons to your Blade template:
Using Helper Methods
Or use the built-in button creators:
Programmatic Call Initiation
You can also initiate calls programmatically via AJAX:
API Integration
The package provides RESTful API endpoints for both web and mobile applications.
Web API Endpoints
Base URL: /api/call (requires authentication via Sanctum)
Mobile API Endpoints
Base URL: /api/mobile/call (requires authentication via Sanctum)
Example: Initiate Call (API)
Mobile App Integration
For mobile app integration (iOS/Android), see the comprehensive guide:
📱 Mobile Integration Guide
The mobile integration guide includes:
- Complete Android (Kotlin) implementation
- Complete iOS (Swift) implementation
- Push notification setup for both platforms
- WebSocket integration for real-time updates
- ZegoCloud SDK integration
- Code examples and best practices
Quick Start for Mobile Developers
-
Register Device:
-
Listen for Incoming Calls via:
- Push notifications (when app is in background)
- WebSocket events (when app is active)
-
Accept/Reject Calls:
- Join ZegoCloud Room using the provided configuration in the response
Customization
Customizing Routes
Edit config/zego-calling.php:
Customizing the UI
Publish the views:
Then edit the views in resources/views/vendor/zego-calling/.
Customizing the User Model
In config/zego-calling.php:
Call Settings
Broadcasting Setup
The package uses Laravel Broadcasting for real-time call state synchronization. You need to configure broadcasting in your Laravel application.
Step 1: Install Laravel Echo and Pusher
Step 2: Configure Broadcasting
In resources/js/bootstrap.js:
Step 3: Listen for Call Events
Testing
Run the package tests:
Or run specific test suites:
Troubleshooting
Calls Not Connecting
- Check ZegoCloud Credentials: Ensure
ZEGOCLOUD_APP_IDandZEGOCLOUD_SERVER_SECRETare correct in.env - Verify Broadcasting Setup: Make sure Laravel Echo is properly configured
- Check Firewall: Ensure WebSocket ports are open
Push Notifications Not Working
-
FCM (Android):
- Verify
FCM_SERVER_KEYin.env - Check device token registration
- Ensure Firebase is properly configured in your mobile app
- Verify
- APNs (iOS):
- Verify all APN credentials are correct
- Ensure certificates are not expired
- Check bundle ID matches
WebSocket Connection Fails
- Check
.envbroadcasting configuration - Verify Pusher credentials
- Ensure Laravel Echo is imported and initialized
- Check browser console for connection errors
Video/Audio Not Working
- Check Browser Permissions: Ensure camera/microphone access is granted
- HTTPS Required: ZegoCloud requires HTTPS in production
- Check Device Compatibility: Verify browser supports WebRTC
Upgrade Guide
From 1.x to 2.x
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Mainul Hassan
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Support
- 📧 Email: [email protected]
- 🐛 Issues: GitHub Issues
- 📖 Documentation: Full Documentation
- 💬 Discussions: GitHub Discussions
Made with ❤️ by Mainul Islam
All versions of zego-audio-video-calling with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/contracts Version ^10.0|^11.0|^12.0
illuminate/broadcasting Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0