Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Webrtc Laravel Package

raqmeyat/webrtc

Laravel WebRTC toolkit for adding peer-to-peer audio, video, and data channels to your app, with signaling, configurable STUN/TURN, and simple helpers to get real-time connections running fast.

View on GitHub
Deep Wiki
Context7

Getting Started

At v0.1.0 with only a changelog entry published, this is a greenfield package — treat the README and the src/ tree as the source of truth, since release notes carry no migration or feature detail.

  1. Require it: composer require loai-k/laravel-webrtc (confirm the exact vendor string from Packagist before installing; the repo slug and package name may differ).
  2. Publish config if present: php artisan vendor:publish --tag=webrtc-config (check src/*ServiceProvider.php for the actual tag).
  3. Scan the service provider first — it tells you which routes, config keys, events, and facades the package binds. This is faster than reading every class.
  4. First use case: stand up the signaling endpoint and connect a single browser peer via RTCPeerConnection. Get one offer/answer round-trip working before touching multi-peer or auth.

Because there is no tagged documentation yet, pin to v0.1.0 exactly ("loai-k/laravel-webrtc": "0.1.0") and expect to read source rather than docs.

Implementation Patterns

  • Signaling over Laravel broadcasting. Most WebRTC Laravel packages layer on top of your broadcast driver (Pusher, Reverb, Ably, Redis). Configure BROADCAST_DRIVER first and verify a plain broadcast(new TestEvent(...)) works before wiring offer/answer/ICE payloads through the package.
  • Server-side TURN/STUN config. Keep ICE server credentials in config/webrtc.php (or config/broadcasting.php) sourced from .env — never hard-code TURN secrets into the JS bundle. Rotate TURN credentials via a short-lived-token controller if the package exposes it.
  • Events over direct calls. If the package fires PeerConnected / SignalReceived-style events, hook listeners in EventServiceProvider (or auto-discovery) rather than calling package classes from controllers. This keeps you decoupled from a v0.x API that will move.
  • Wrap the package behind your own service. Create app/Services/WebRtc.php that delegates to the package façade. When v0.2.0 renames a method, you patch one file instead of every controller.
  • Testing pattern. Use Laravel's Event::fake() to assert signaling events fire without a real socket. For end-to-end, script two RTCPeerConnection instances in a Pest/Dusk test hitting a local TURN (coturn in Docker).

Gotchas and Tips

  • No meaningful release notes. The v0.1.0 changelog is a link with no entries. Check the actual commit list before upgrading anything — breaking changes will not be announced at this stage.
  • 0.x semver. Under Composer's default rules, ^0.1 allows 0.1.x patches but a 0.2.0 bump is a breaking change by convention. Pin tightly, and consider "0.1.*" rather than ^0.1.
  • HTTPS is mandatory. WebRTC getUserMedia and many peer operations are blocked on plain HTTP except localhost. If signaling "works" locally but not on staging, check your TLS and the secure cookie/session config first.
  • Mixed content with TURN. TURN over turns: (TLS) on port 5349; turn: on 3478 often fails behind corporate firewalls. Provide both in ICE servers.
  • CORS and CSRF on signaling routes. If the package registers POST endpoints for SDP exchange, ensure the route is in VerifyCsrfToken::$except for API-style calls, or use Sanctum token auth.
  • Debugging: enable Laravel's broadcast log (LOG_CHANNEL=stack, BROADCAST_CONNECTION), and in the browser use chrome://webrtc-internals to inspect ICE candidate gathering and DTLS handshake failures — that view is far more informative than the package's own logs.
  • Extension point: the package's config file is the intended customization surface at v0.1.0. If a behavior you need isn't configurable, prefer publishing and overriding the config (or binding a replacement class in the container) over editing vendor/.

Given the sparse release notes and 0.1.0 status, re-evaluate this assessment on the next tagged release — expect API and config churn.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console