mergeConfigFrom(__DIR__.'/../config/webrtc.php', 'webrtc'); // 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); }); // Room authorization (private/presence) + the call-event log — host-overridable. $this->app->bind(RoomAuthorizer::class, function ($app) { return $app->make((string) config('webrtc.authorizer', DefaultRoomAuthorizer::class)); }); $this->app->bind(CallEventListener::class, function ($app) { return $app->make((string) config('webrtc.events', NullCallEventListener::class)); }); } public function boot(): void { if ($this->app->runningInConsole()) { $this->publishes([ __DIR__.'/../config/webrtc.php' => $this->app->configPath('webrtc.php'), ], 'webrtc-config'); $this->commands([ StartWebRtcServer::class, ]); } } }