MediaSFU Angular
    Preparing search index...

    Class MiniCardAudio

    MiniCardAudio component displays an audio card with optional waveform animation and overlay.

    app-mini-card-audio

    true

    CommonModule

    Displays:

    • A customizable card with optional image and name.
    • Overlay with waveform animation and text.
    • Customizable card, overlay, and waveform styles.
    • customStyle (Partial): Custom CSS styles for the card.
    • name (string): Name displayed on the card.
    • showWaveform (boolean): Controls visibility of waveform animation.
    • overlayPosition (string): Position for the overlay on the card.
    • barColor (string): Color of waveform bars.
    • textColor (string): Color of the name text.
    • imageSource (string): URL for the background image.
    • roundedImage (boolean): Rounds image corners if true.
    • imageStyle (Partial): Custom styles for the background image.

    MiniCardAudio

    OnInit, OnDestroy

    • ngOnInit: Initializes the component, starts waveform animation if showWaveform is true.
    • ngOnDestroy: Cleans up intervals.
    • animateWaveform: Starts animation of the waveform bars.
    • resetWaveform: Resets waveform to initial state.
    • clearIntervals: Clears all active intervals.
    • getAnimationDuration: Returns duration for animation at a given index.
    • getImageStyle: Combines custom image styles with rounded corners if enabled.
    • getOverlayPosition: Uses utility to determine the overlay's position.
    <app-mini-card-audio
    [customStyle]="{ backgroundColor: 'blue' }"
    name="Audio Name"
    [showWaveform]="true"
    overlayPosition="bottomRight"
    barColor="red"
    textColor="white"
    imageSource="/path/to/image.jpg"
    [roundedImage]="true"
    [imageStyle]="{ border: '2px solid black' }"
    ></app-mini-card-audio>

    Implements

    • OnInit
    • OnDestroy
    • OnChanges
    Index

    Accessors

    Constructors

    • Parameters

      • injectedCustomStyle: Partial<CSSStyleDeclaration>
      • injectedName: string
      • injectedShowWaveform: boolean
      • injectedOverlayPosition: string
      • injectedBarColor: string
      • injectedTextColor: string
      • injectedImageSource: string
      • injectedRoundedImage: boolean
      • injectedImageStyle: Partial<CSSStyleDeclaration>

      Returns MiniCardAudio

    Methods

    • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

      Returns void

    • A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

      Parameters

      • changes: SimpleChanges

        The changed properties.

      Returns void

    Properties

    customStyle: any
    name: string = ''
    showWaveform: boolean = false
    overlayPosition: string = 'bottomLeft'
    barColor: string = 'white'
    textColor: string = 'white'
    imageSource: string = ''
    roundedImage: boolean = false
    imageStyle: any = {}
    waveformAnimations: number[] = ...
    intervals: Timeout[] = []
    imageLoadFailed: boolean = false