- Implemented the InternalWHIP component for managing WHIP server configurations. - Added functionality to load live WHIP state from Core and handle OBS URL generation. - Included polling for active streams and notifying parent components of state changes. - Created comprehensive tests for the InternalWHIP component covering various scenarios including fallback mechanisms and state changes. test: add integration tests for WHIP source component - Developed end-to-end tests for the InternalWHIP component to verify its behavior under different configurations. - Ensured that the component correctly handles the loading of WHIP state, displays appropriate messages, and emits the correct onChange events. test: add Settings WHIP configuration tests - Implemented tests for the WHIP settings tab to validate loading and saving of WHIP configurations. - Verified that the correct values are sent back to the Core when the user saves changes. - Ensured that the UI reflects the current state of the WHIP configuration after Core restarts or changes.
57 lines
1.3 KiB
JavaScript
57 lines
1.3 KiB
JavaScript
import * as ALSA from './ALSA';
|
|
import * as AVFoundation from './AVFoundation';
|
|
import * as Network from './Network';
|
|
import * as NoAudio from './NoAudio';
|
|
import * as Raspicam from './Raspicam';
|
|
import * as Video4Linux from './V4L';
|
|
import * as VideoAudio from './VideoAudio';
|
|
import * as VideoLoop from './VideoLoop';
|
|
import * as AudioLoop from './AudioLoop';
|
|
import * as VirtualAudio from './VirtualAudio';
|
|
import * as VirtualVideo from './VirtualVideo';
|
|
// WebRTCRoom removed — WHIP is handled via Network source (push.type = 'whip')
|
|
|
|
class Registry {
|
|
constructor() {
|
|
this.services = new Map();
|
|
}
|
|
|
|
Register(service) {
|
|
this.services.set(service.id, service);
|
|
}
|
|
|
|
Get(id) {
|
|
const service = this.services.get(id);
|
|
if (service) {
|
|
return service;
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
IDs() {
|
|
return Array.from(this.services.keys());
|
|
}
|
|
|
|
List() {
|
|
return Array.from(this.services.values());
|
|
}
|
|
}
|
|
|
|
const registry = new Registry();
|
|
|
|
registry.Register(Network);
|
|
registry.Register(ALSA);
|
|
registry.Register(AVFoundation);
|
|
registry.Register(Video4Linux);
|
|
registry.Register(Raspicam);
|
|
registry.Register(VirtualAudio);
|
|
registry.Register(VirtualVideo);
|
|
registry.Register(NoAudio);
|
|
registry.Register(VideoAudio);
|
|
registry.Register(VideoLoop);
|
|
registry.Register(AudioLoop);
|
|
|
|
|
|
export default registry;
|