Hiyve Components - v1.0.0
    Preparing search index...

    Interface MediaDeviceManager

    MediaDeviceManager interface (from muziertcclient).

    Provides cross-browser media device management with caching and cleanup. Use this interface when integrating with the Hiyve client library. The DeviceSelector and DevicePreview components can use this manager for better device handling, or fall back to direct browser APIs.

    import { Client } from '@hiyve/rtc-client';

    const client = new Client({ roomToken });
    const mediaDeviceManager = client.getMediaDeviceManager();

    <DeviceSelector mediaDeviceManager={mediaDeviceManager} />
    interface MediaDeviceManager {
        addDeviceChangeListener(listener: () => void): void;
        clearCache(): void;
        dispose(): void;
        getUserMedia(
            constraints: MediaStreamConstraints,
        ): Promise<MediaStream & { _cleanup?: () => void }>;
        listAudioInputDevices(forceRefresh?: boolean): Promise<DeviceInfo[]>;
        listAudioOutputDevices(forceRefresh?: boolean): Promise<DeviceInfo[]>;
        listVideoDevices(forceRefresh?: boolean): Promise<DeviceInfo[]>;
        removeDeviceChangeListener(listener: () => void): void;
    }
    Index

    Methods

    • Get a media stream with the specified constraints

      Parameters

      • constraints: MediaStreamConstraints

      Returns Promise<MediaStream & { _cleanup?: () => void }>