2026-07-07 11:07:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
feat: WebRTC MVP to Blax standard (namespace, README, tests, scaffolding)
- Rename namespace BlaxSoftware\LaravelWebRtc -> Blax\WebRtc (house standard) +
update kernel imports to Blax\ReactPhpKernel
- README rewritten to the Blax OSS package principles: OSS banner, title+badges,
emoji feature list, quick start, wire shape, config, architecture, star history
- Add PHPUnit suite (8 tests / 18 assertions, green): SignalingHandler routing
(offer/ice/record/connect/bridge/close/error paths via a fake engine) +
NullMediaEngine behaviour
- Add pint.json (laravel preset, applied), composer scripts, .gitattributes,
test.sh (nix), CHANGELOG
- Verified end-to-end: composer install resolves blax-software/reactphp-kernel
from Forgejo VCS and the suite runs green on it
rel learn-atc #1055 #1051 #1019
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 11:28:49 +00:00
|
|
|
namespace Blax\WebRtc;
|
2026-07-07 11:07:59 +00:00
|
|
|
|
feat: WebRTC MVP to Blax standard (namespace, README, tests, scaffolding)
- Rename namespace BlaxSoftware\LaravelWebRtc -> Blax\WebRtc (house standard) +
update kernel imports to Blax\ReactPhpKernel
- README rewritten to the Blax OSS package principles: OSS banner, title+badges,
emoji feature list, quick start, wire shape, config, architecture, star history
- Add PHPUnit suite (8 tests / 18 assertions, green): SignalingHandler routing
(offer/ice/record/connect/bridge/close/error paths via a fake engine) +
NullMediaEngine behaviour
- Add pint.json (laravel preset, applied), composer scripts, .gitattributes,
test.sh (nix), CHANGELOG
- Verified end-to-end: composer install resolves blax-software/reactphp-kernel
from Forgejo VCS and the suite runs green on it
rel learn-atc #1055 #1051 #1019
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 11:28:49 +00:00
|
|
|
use Blax\WebRtc\Console\Commands\StartWebRtcServer;
|
|
|
|
|
use Blax\WebRtc\Contracts\MediaEngine;
|
|
|
|
|
use Blax\WebRtc\Media\NullMediaEngine;
|
2026-07-07 11:07:59 +00:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
|
|
class WebRtcServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
public function register(): void
|
|
|
|
|
{
|
feat: WebRTC MVP to Blax standard (namespace, README, tests, scaffolding)
- Rename namespace BlaxSoftware\LaravelWebRtc -> Blax\WebRtc (house standard) +
update kernel imports to Blax\ReactPhpKernel
- README rewritten to the Blax OSS package principles: OSS banner, title+badges,
emoji feature list, quick start, wire shape, config, architecture, star history
- Add PHPUnit suite (8 tests / 18 assertions, green): SignalingHandler routing
(offer/ice/record/connect/bridge/close/error paths via a fake engine) +
NullMediaEngine behaviour
- Add pint.json (laravel preset, applied), composer scripts, .gitattributes,
test.sh (nix), CHANGELOG
- Verified end-to-end: composer install resolves blax-software/reactphp-kernel
from Forgejo VCS and the suite runs green on it
rel learn-atc #1055 #1051 #1019
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 11:28:49 +00:00
|
|
|
$this->mergeConfigFrom(__DIR__.'/../config/webrtc.php', 'webrtc');
|
2026-07-07 11:07:59 +00:00
|
|
|
|
|
|
|
|
// Resolve the configured media engine wherever a MediaEngine is type-hinted.
|
|
|
|
|
$this->app->bind(MediaEngine::class, function ($app) {
|
|
|
|
|
$class = (string) config('webrtc.media_engine', NullMediaEngine::class);
|
|
|
|
|
|
|
|
|
|
return $app->make($class);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function boot(): void
|
|
|
|
|
{
|
|
|
|
|
if ($this->app->runningInConsole()) {
|
|
|
|
|
$this->publishes([
|
feat: WebRTC MVP to Blax standard (namespace, README, tests, scaffolding)
- Rename namespace BlaxSoftware\LaravelWebRtc -> Blax\WebRtc (house standard) +
update kernel imports to Blax\ReactPhpKernel
- README rewritten to the Blax OSS package principles: OSS banner, title+badges,
emoji feature list, quick start, wire shape, config, architecture, star history
- Add PHPUnit suite (8 tests / 18 assertions, green): SignalingHandler routing
(offer/ice/record/connect/bridge/close/error paths via a fake engine) +
NullMediaEngine behaviour
- Add pint.json (laravel preset, applied), composer scripts, .gitattributes,
test.sh (nix), CHANGELOG
- Verified end-to-end: composer install resolves blax-software/reactphp-kernel
from Forgejo VCS and the suite runs green on it
rel learn-atc #1055 #1051 #1019
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 11:28:49 +00:00
|
|
|
__DIR__.'/../config/webrtc.php' => $this->app->configPath('webrtc.php'),
|
2026-07-07 11:07:59 +00:00
|
|
|
], 'webrtc-config');
|
|
|
|
|
|
|
|
|
|
$this->commands([
|
|
|
|
|
StartWebRtcServer::class,
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|