# Interface Media

All Known Implementing Classes:
  `AudioBook`, `EBook`, `VideoMaterial`

public interface Media
Interface for materials with multimedia content. Demonstrates interface segregation principle and multiple inheritance through interfaces.

This interface defines behavior for audio and video materials, including duration, format, and playback capabilities.

Since:
  2024-09-15
Version:
  2.0
Author:
  Navid Mohaghegh

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static enum`
  `Media.MediaQuality`
  Quality levels for media content.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default int`
  `estimateDownloadTime(double mbps)`
  Calculates estimated download time based on connection speed.
  `int`
  `getDuration()`
  Gets the duration of the media in minutes.
  `double`
  `getFileSize()`
  Gets the file size in megabytes.
  `String`
  `getFormat()`
  Gets the file format of the media.
  `default String`
  `getPlaybackInfo()`
  Gets playback information as a formatted string.
  `Media.MediaQuality`
  `getQuality()`
  Gets the quality setting for the media.
  `boolean`
  `isStreamingOnly()`
  Checks if the media requires an internet connection.

- ## Method Details

  - ### getDuration

    int getDuration()
    Gets the duration of the media in minutes.
    Returns:
      duration in minutes

  - ### getFormat

    String getFormat()
    Gets the file format of the media.
    Returns:
      format string (e.g., "MP3", "MP4", "WAV")

  - ### getFileSize

    double getFileSize()
    Gets the file size in megabytes.
    Returns:
      size in MB

  - ### isStreamingOnly

    boolean isStreamingOnly()
    Checks if the media requires an internet connection.
    Returns:
      true if streaming required, false if downloadable

  - ### getQuality

    Media.MediaQuality getQuality()
    Gets the quality setting for the media.
    Returns:
      quality descriptor

  - ### getPlaybackInfo

    default String getPlaybackInfo()
    Gets playback information as a formatted string.
    Returns:
      playback details

  - ### estimateDownloadTime

    default int estimateDownloadTime(double mbps)
    Calculates estimated download time based on connection speed.
    Parameters:
      `mbps` - download speed in megabits per second
    Returns:
      estimated time in seconds