Download the PHP package raqmeyat/webrtc without Composer

On this page you can find all versions of the php package raqmeyat/webrtc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package webrtc

raqmeyat/webrtc

WebRTC signaling, call-session lifecycle and ICE/TURN credentials for Laravel 12 & 13 (PHP 8.4 & 8.5).

Laravel never touches media. This package does the server half of a call:

Concern What it does
ICE / TURN Per-user, time-limited coturn credentials (TURN REST API), or a static STUN list
Call sessions ringing → active → ended / declined / missed / cancelled, row-locked transitions, busy detection, ring timeout
Signaling Validates and relays SDP offers/answers and ICE candidates to exactly one peer over a private broadcast channel (Reverb, Pusher, Ably...)
Late joiners Short-lived signal buffer + pull endpoint, so a callee woken by a push notification still gets the offer
Mobile safety X-Idempotency-Key replay on session mutations, per-call rate limit on signals, JSON:API shaped responses

Install

Requirements: a broadcaster (php artisan install:broadcasting for Reverb), a cache store with atomic locks (Redis recommended), model:prune scheduled if you want old calls removed.

Map the models that can take part in calls in config/webrtc.php:

Keys must be strings (ULID/UUID, up to 36 chars). The alias (user, staff) is what clients send and what is stored.

Environment

coturn needs use-auth-secret, static-auth-secret=<secret> and a realm. Never ship the secret to clients; they only receive derived, expiring credentials.

HTTP API

Default prefix webrtc, middleware ['api', 'auth:sanctum'] (configurable via config/webrtc.php or WEBRTC_ROUTE_PREFIX). Mutating session routes require X-Idempotency-Key.

Method Path Purpose
GET /webrtc/ice-servers RTCConfiguration.iceServers + ice_transport_policy, ttl, expires_at
POST /webrtc/sessions { "call_type": 1\|2\|3, "invitees": [{"type":"user","id":"..."}], "subject": {"type":"trip","id":"..."}? }
GET /webrtc/sessions/{id} Session with participants
POST /webrtc/sessions/{id}/accept · /decline · /end Lifecycle transitions
POST /webrtc/sessions/{id}/signals { "type": "offer\|answer\|candidate\|rollback", "payload": {...}, "target"?: {...} } → 202
GET /webrtc/sessions/{id}/signals Buffered signals addressed to the caller

call_type: 1 audio, 2 video, 3 data. Session status: 1 ringing, 2 active, 3 ended, 4 declined, 5 missed, 6 cancelled.

Errors: { "errors": [{ "status": "409", "code": "participant_busy", "detail": "..." }] }.

Real-time events

Each participant subscribes to one private channel, webrtc.inbox.{participantId}, and receives:

Authorize the channel through your normal /broadcasting/auth route (the package registers the channel callback; disable with webrtc.broadcasting.register_channels).

Client flow (browser)

Rules the server enforces: a callee must accept (HTTP) before it can send answer/candidate; signals only flow while the session is ringing/active; only whitelisted payload keys are relayed.

Extending

Who may call whom - implement Raqmeyat\WebRtc\Contracts\InvitationPolicy and set webrtc.invitation_policy:

Push notifications - listen to SessionStateChanged and send FCM/APNs when $event->event === SessionEvent::Ringing. The event fires after the DB commit.

Another ICE provider (Twilio, Cloudflare...):

Custom Models & Database Connection: You can swap the session and participant models or point them to a dedicated database connection via config/webrtc.php:

Architecture: Actions, DTOs, Services & Enums

The package adheres to strict layering: FormRequest → DTO → Action → Service → Model.

Actions

Single-purpose, invocable action classes that authorize operations and orchestrate business logic:

Action Description
CreateSessionAction Initiates a new call session from CreateSessionData
ShowSessionAction Authorizes and loads details for a session
AcceptSessionAction Authorizes and accepts an incoming invitation
DeclineSessionAction Authorizes and declines an incoming invitation
EndSessionAction Authorizes and hangs up or cancels a session
RelaySignalAction Authorizes and relays SDP/ICE signals using RelaySignalData
PullSignalsAction Authorizes and retrieves buffered signals for a participant
GetIceServersAction Resolves time-limited ICE/TURN configuration
ExpireSessionsAction Expires ringing sessions past timeout (used by webrtc:expire)

Example: Invoking Actions from your own code

Operations

Testing

License

The MIT License (MIT). Please see LICENSE for more information.


All versions of webrtc with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3|^8.4|^8.5
ext-hash Version *
ext-json Version *
illuminate/auth Version ^12.0|^13.0
illuminate/broadcasting Version ^12.0|^13.0
illuminate/cache Version ^12.0|^13.0
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/events Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
illuminate/validation Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package raqmeyat/webrtc contains the following files

Loading the files please wait ...