Class MediaSettingsModal

MediaSettingsModal component renders a modal interface for managing media settings. Users can switch between different audio and video input devices and adjust other settings.

app-media-settings-modal

true

[CommonModule, FontAwesomeModule, FormsModule]

<app-media-settings-modal
[isMediaSettingsModalVisible]="true"
[onMediaSettingsClose]="closeModal"
[switchCameraOnPress]="handleCameraSwitch"
[switchVideoOnPress]="handleVideoSwitch"
[switchAudioOnPress]="handleAudioSwitch"
[parameters]="mediaSettingsParams"
position="topRight"
backgroundColor="#83c0e9">
</app-media-settings-modal>

isMediaSettingsModalVisible - Indicates whether the modal is visible.

onMediaSettingsClose - Function to close the modal.

switchCameraOnPress - Function to handle camera switching.

switchVideoOnPress - Function to handle video switching.

switchAudioOnPress - Function to handle audio switching.

parameters - Parameters for the modal.

position - Position of the modal on the screen (default: 'topRight').

backgroundColor - Background color of the modal (default: '#83c0e9').

Service for switching audio.

Service for switching video.

Alternative service for switching video.

ngOnInit - Initializes the component and sets up default selections and services.

ngOnChanges - Updates component state based on input changes.

setupDefaultServices - Configures default services for switching camera, video, and audio.

updateParameters - Updates the modal parameters.

ensureDefaultSelections - Ensures default selections for video and audio inputs.

initializeModalSettings - Initializes the modal settings.

modalContentStyle - Returns the style object for the modal content.

handleSwitchCamera - Initiates camera switching.

handleVideoSwitch - Initiates video input switching.

handleAudioSwitch - Initiates audio input switching.

handleModalClose - Closes the modal.

showVirtual - Toggles the virtual background modal.

Implements

  • OnInit
  • OnChanges

Constructors

Methods

  • Returns {
        backgroundColor: string;
        borderRadius: string;
        padding: string;
        width: string;
        maxHeight: string;
        overflowY: string;
        top: string;
        bottom: string;
        left: string;
        right: string;
    }

    • backgroundColor: string
    • borderRadius: string
    • padding: string
    • width: string
    • maxHeight: string
    • overflowY: string
    • top: string
    • bottom: string
    • left: string
    • right: string

Properties

isMediaSettingsModalVisible: boolean = false
onMediaSettingsClose: (() => void)
switchCameraOnPress: ((params: any) => Promise<void>)
switchVideoOnPress: ((params: any) => Promise<void>)
switchAudioOnPress: ((params: any) => Promise<void>)
position: string = 'topRight'
backgroundColor: string = '#83c0e9'
faTimes: IconDefinition = faTimes

FontAwesome icon for closing the modal.

faSyncAlt: IconDefinition = faSyncAlt

FontAwesome icon for sync.

faCamera: IconDefinition = faCamera

FontAwesome icon for camera.

faMicrophone: IconDefinition = faMicrophone

FontAwesome icon for microphone.

faPhotoFilm: IconDefinition = faPhotoFilm

FontAwesome icon for photo film.

selectedVideoInput: string

Currently selected video input device ID.

selectedAudioInput: string

Currently selected audio input device ID.

prevSelectedVideoInput: string

Previously selected video input device ID.

prevSelectedAudioInput: string

Previously selected audio input device ID.